Commit Graph

650 Commits

Author SHA1 Message Date
Karel Zak 2483c4c9da column: fix typo
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-05-02 12:18:00 +02:00
Karel Zak 9624f6157c column: add --table-hide
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-05-02 12:18:00 +02:00
Karel Zak 68916af3b9 column: add --table-wrap
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-05-02 12:18:00 +02:00
Karel Zak 1ae24ec239 column: add --table-noextreme
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-05-02 12:18:00 +02:00
Karel Zak 3ba01db0ab column: add --table-truncate
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-05-02 12:18:00 +02:00
Karel Zak 01e335c9e4 column: rename options
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-05-02 12:18:00 +02:00
Karel Zak f05593e100 column: fix greedy initialization
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-05-02 12:18:00 +02:00
Karel Zak dbed2f8c63 column: add --table-colright
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-05-02 12:18:00 +02:00
Karel Zak be03f65232 column: use err_exclusive_options()
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-05-02 12:18:00 +02:00
Karel Zak 86399c3306 column: make mbs/wcs conversions more robust
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-05-02 12:18:00 +02:00
Karel Zak 9dbe8e1c02 column: add --json
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-05-02 12:18:00 +02:00
Karel Zak 11a1092ad6 column: add --table-colnames
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-05-02 12:18:00 +02:00
Karel Zak 739e58ffe0 column: rename too generic macro
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-05-02 12:18:00 +02:00
Karel Zak 4762ae9d60 column: use libsmartcols for --table
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-05-02 12:18:00 +02:00
Karel Zak 8f1be58816 column: clean up multi-byte #ifelse
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-05-02 12:18:00 +02:00
Karel Zak 37d84d6d26 column: reorder functions
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-05-02 12:18:00 +02:00
Karel Zak d6b63b9f1d column: rename functions
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-05-02 12:18:00 +02:00
Karel Zak 3cc2ade826 column: don't ignore mbs_to_wcs() errors
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-05-02 12:17:59 +02:00
Karel Zak 0784187d14 column: make input() more generic
* remove line size limit
* use multi-byte rather than wchar when read input
* prepare for future libsmartcols use in input() for table

Signed-off-by: Karel Zak <kzak@redhat.com>
2017-05-02 12:17:59 +02:00
Karel Zak 2593c13998 column: use colntrol struct on more places
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-05-02 12:17:59 +02:00
Karel Zak 7d07df62a2 columns: add control struct
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-05-02 12:17:59 +02:00
Karel Zak 38d691921c column: split old and new code
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-05-02 12:17:59 +02:00
Sami Kerola 70ca1a7772
tailf: remove deprecated utility
March 2017 is gone, it is time to remove this utility as scheduled in
earlier commit, and promised in manual page.

Reference: 3f8478a71c
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2017-04-02 16:51:00 +01:00
Sami Kerola c308e2050f misc: stop mixing declarations and code
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2017-03-13 14:48:04 +01:00
Karel Zak 3e094e5fe2 column: make more obvious what is default behavior
The man page contains mistakes. The default is to fill columns before
lines:

$ printf 'aaaaaaaaaaaaaaaaaaaaaa\nBBBBBBBBBBBBBBBBBBBBB\nXXXXXXX\nYYYYYYYYYYY\nZZZZZ' > data

$ column --columns 80 < data
aaaaaaaaaaaaaaaaaaaaaa	XXXXXXX			ZZZZZ
BBBBBBBBBBBBBBBBBBBBB	YYYYYYYYYYY

$ column  --fillrows --columns 80 < data
aaaaaaaaaaaaaaaaaaaaaa	BBBBBBBBBBBBBBBBBBBBB	XXXXXXX
YYYYYYYYYYY		ZZZZZ

The patch also rename functions in the code to make it more obvious
for code readers.

Signed-off-by: Karel Zak <kzak@redhat.com>
2017-03-01 12:25:16 +01:00
Sami Kerola 2ba641e5f3 misc: add static keyword to where needed [smatch scan]
text-utils/rev.c:68:9: warning: symbol 'buf' was not declared. Should it be
static?

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2017-02-20 12:58:49 +01:00
Sami Kerola 8791804065 misc: do not use plain 0 as NULL [smatch scan]
text-utils/tailf.c:69:21: warning: Using plain integer as NULL pointer

Since many 'struct option' has used zero as NULL make them more readable in
same go by reindenting, and using named argument requirements.

Reference: https://lwn.net/Articles/93577/
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2017-02-20 12:58:49 +01:00
Carlos Santos 9ea8ded37b build-sys: fix compilation with ncurses and uClibc or musl libc
Compiling util-linux with musl and uClibc-ng toolchains when wide-char
support is not enabled in ncurses results in compilation failures with
the following message:

    error: two or more data types in declaration specifiers
    #define
     wchar_t char

The problem occurs because util-linux #defines its own wchar_t (as char)
when configured without widechar support. This conflicts with definition
of wchar_t contained in stddef.h.

This error can be reproduced running "<toolchain-cc -o test test.c" with
the following test program:

    #include <ctype.h>
    #define wchar_t char
    #include <stddef.h>

    int main()
    {
        return 0;
    }

The only way to avoid the problem it to reorder the inclusion of headers
in some files under the text-utils directory.

Addresses:
  http://autobuild.buildroot.net/results/3a2f228e0fa7b5cc28a13d49f48f1a6aef8d9d7a
  http://autobuild.buildroot.net/results/99e96069f652d511c6212a5bb6be29e68fb1747c
  http://autobuild.buildroot.net/results/2dc5721aef93b7b410153bafad78248fac3db941
  http://autobuild.buildroot.net/results/8a9e197ba7a292b18f8c0c36dca974685556a38a

Signed-off-by: Carlos Santos <casantos@datacom.ind.br>
2017-01-20 11:07:46 +01:00
Karel Zak d7a3bf949b column: rename --columns to --output-width
* rename to use less confusing option name
* cleanup usage()
* update man page

Addresses: https://github.com/karelzak/util-linux/pull/327
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-01-17 13:14:05 +01:00
Grady Martin 26c91027b2
col: backspacing widechars
Until now, backspace characters have not accounted for characters of widths
other than one.  This single line amends that.

Requsted-by: Grady Martin <admin@nosuck.org>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2017-01-04 22:01:40 +00:00
Karel Zak 677ec86cef Use --help suggestion on invalid option
The current default is to print all usage() output. This is overkill
in many case.

Addresses: https://github.com/karelzak/util-linux/issues/338
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-12-19 13:13:34 +01:00
Sébastien Helleu d673b74e9d docs: replace FTP by HTTPS in kernel.org URLs
The links to ftp://ftp.kernel.org/ are replaced by
https://www.kernel.org/.

Signed-off-by: Karel Zak <kzak@redhat.com>
2016-12-19 11:22:26 +01:00
Karel Zak 0ed2a95471 more: avoid double free() on exit
On 'q' command more(1) calls end_it() function with _exit(). The
_exit() may suspend program execution due to pending I/O on very
loaded server. In this time SIGINT may be delivered due to impatient
user who will press ^C.

And then end_it() cleanup function may be executed by signal handler
too. The result is double free()...

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1403971
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-12-15 14:40:26 +01:00
Michael Kerrisk (man-pages) 42632a90c1 Correctly format page cross references
Most pages in util-linux follow the standard convention
of formatting page cross references in bold. Fix the
few exceptions that use italic.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-29 10:44:19 +01:00
Michael Kerrisk (man-pages) f053ff1e3a Place SEE ALSO entries in order
This patch does only the following:

* Order SEE ALSO entries first by section name, then alphabetically
  within section
* Adds one or two missing commas in SEE ALSO lists
* Removes one or two periods that were (inconsistently) used
  at the end of SEE ALSO lists.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-29 10:44:19 +01:00
Ruediger Meier 332123f2b6 misc: fix some compiler warnings
libsmartcols/samples/fromfile.c:59:2: warning: passing argument 3 of 'string_to_bitmask' from incompatible pointer type
  text-utils/pg.c:79:0: warning: "TABSIZE" redefined
  libblkid/src/read.c:455:13: warning: 'debug_dump_dev' defined but not used [-Wunused-function]
  libblkid/src/probe.c:769:13: warning: unused function 'cdrom_size_correction' [-Wunused-function]
  /usr/include/sys/termios.h:3:2: warning: "this file includes <sys/termios.h> which is deprecated, use <termios.h> instead" [-W#warnings]

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-10-27 11:03:24 +02:00
Tobias Stoeckmann b56b13684e rev: Avoid out of boundary read
Check if the length of the parsed string is at least 1,
otherwise an out of boundary read would occur.
2016-10-06 14:56:39 +02:00
Tobias Stoeckmann 2571cf0f9b rev: Avoid calling free in a signal handler
free() is not a safe function for a signal handler. The next
line calls _exit() anyway, so there is no need for resource
management.
2016-10-06 14:56:39 +02:00
Tobias Stoeckmann f20b214edc ul: Fix buffer overflow
The text-utility ul can run into a buffer overflow on very long lines.
See this proof of concept how to reproduce the issue:

$ dd if=/dev/zero bs=1M count=10 | tr '\000' '\041' > poc.txt
$ echo -ne '\xe\x5f\x8\x5f\x61\x2\xf\x5f\x8\x5f' | dd of=poc.txt conv=notrunc
$ ul -i poc.txt > /dev/null # output would take ages
Segmentation fault
$ _

The problem manifests by using alloca with "maxcol", which can be as
large as INT_MAX, based on the input line.

A very long line (> 8 MB) with modes must be supplied to ul, as seen in
my proof of concept byte sequence above.

It is rather easy to fix this issue: allocate space on the heap instead.
maxcol could overflow here, but in that case no system will have enough
space to handle the request, properly ending ul through an err() call.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
2016-09-29 11:49:08 +02:00
Sami Kerola 74ce680a3e
misc: simplify if clauses [oclint]
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2016-07-21 21:14:33 +01:00
Tobias Stoeckmann 3f0e7f371a tailf: Fix previously adjusted segfault patch
Casting the value to be checked to size_t renders the check useless.
If st_size is SIZE_MAX+1, it will be truncated to 0 and the check
succeeds. In fact, this check can never be false because every value
stored in a size_t is smaller or equal to SIZE_MAX.

I think this adjustment was meant to fix a compiler warning for 64 bit
systems for which sizeof(off_t) is sizeof(size_t), but the signedness
differs.

Going unconditionally to the greatest possible unsigned int type if
st_size is positive (off_t is signed) will fix this issue.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
2016-07-19 11:01:18 +02:00
Tobias Stoeckmann e368476050 tailf: Fix segmentation fault in tailf on 32 bit
tailf crashes with a segmentation fault when used with a file that is
exactly 4GB in size due to an integer overflow between off_t and size_t:

$ dd if=/dev/zero of=tailf.crash bs=1 count=1 seek=4294967295
$ tailf tailf.crash
Segmentation fault
$ _

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-07-14 12:09:51 +02:00
Karel Zak 324e52a5cf more: don't include ncurses.h, fix for non-widechar
It seems our crazy widechar.h is in conflict with ncurses, but it
seems that nothing in more.c requires anything from ncurses. All we
need is probably <term.h>.

Signed-off-by: Karel Zak <kzak@redhat.com>
2016-06-03 14:51:01 +02:00
Sebastian Rasmussen 9e93004171 misc: Fix various typos
Fix various typos in error messages, warnings, debug strings,
comments and names of static functions.

Signed-off-by: Sebastian Rasmussen <sebras@gmail.com>
2016-05-31 23:40:21 +02:00
Sebastian Rasmussen d35df4db5b docs: Fix various typos
Signed-off-by: Sebastian Rasmussen <sebras@gmail.com>
2016-05-31 23:40:21 +02:00
Sami Kerola 962a7dc3b0 colcrt: avoid the command getting hung [afl]
Some inputs make getwc(3) not to progress file descriptor and neither to
report EILSEQ.  Detect such situation and skip the bad input.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2016-04-13 12:29:16 +02:00
Benno Schulenberg 49b7f95e43 docs: miscellaneous tiny tweaks of man pages
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2016-03-17 12:18:54 +01:00
Ruediger Meier fea1cbf748 misc: never cast void* from malloc(3) and friends
Such cast could hide serious compiler warnings in case we are
missing includes (e.g. <stdlib.h> or "xalloc.h").

See
http://stackoverflow.com/questions/605845/do-i-cast-the-result-of-malloc

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-03-07 23:29:27 +01:00
Karel Zak 8f18a9142c Merge branch 'master' of https://github.com/Rufflewind/util-linux 2016-03-07 16:04:27 +01:00
Phil Ruffwind 925ced8353 hexdump: certain long options should not accept arguments
As documented in the manual and the usage info, the long options
--one-byte-char, --canonical, and --two-bytes-octal should not accept
any arguments.

Signed-off-by: Phil Ruffwind <rf@rufflewind.com>
2016-03-06 13:47:32 -05:00
Ruediger Meier eaac9f88f9 misc: fix some includes
features.h:  any glibc header includes this already
libgen.h:    was unused there
sys/uio.h:   for writev(3p)
sys/queue.h  seems like it was never used

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-02-29 13:04:56 +01:00
Ruediger Meier 2013b33f40 build-sys: disable unused parameter warnings for some test progs
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-02-23 03:20:22 +01:00
Ruediger Meier b0b54cc582 build-sys: always add AM_CFLAGS
We were missing our nice compliler warnings for many programs
and libs. See next commits how many trivial and non-trival
warnings have to be fixed.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-02-23 01:17:29 +01:00
Ruediger Meier b0b24b11f8 lib: rename strmode() and setmode()
On BSD they are part of the standard C library.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-02-18 12:53:48 +01:00
Karel Zak 79c101427f colcrt: minor cosmetic changes
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-02-11 12:21:22 +01:00
Sami Kerola ea4ccc9ea1
colcrt: reimplementation
This implementation aims to be easier to read, more robust dealing all sorts
of unexpected inputs, and possibly even more correct.  The correctness
refers to last line handling this implementation does differently than the
previous.  With the previous last line that ended to EOF without \n was not
printed.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2016-02-02 17:27:28 +00:00
Karel Zak bb7803e971 more: remove unnecessary compatibility layer
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-01-26 11:51:04 +01:00
Sami Kerola b4566a8a8d build-sys: remove libtermcap support
It is unlikely anyone is going to build this project on system where
libtermcap is available.  Fedora project obsoleted libtermcap 2007-12-12 in
favour of ncurses.  Debian made same move 2005.

Reference: https://fedoraproject.org/wiki/Deprecated_packages
Reference: https://www.debian.org/doc/manuals/debian-faq/ch-compat.en.html#s-termcap
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2016-01-26 11:45:14 +01:00
Karel Zak 683ddbd5c4 column: ignore non-printable chars
echo -e '\033[33mb\033[mXFoo\n\033[33mbar\033[mXFoo' | column -s X -t

old version:

	b   Foo
	bar   Foo

fixed version:

	b    Foo
	bar  Foo

References: https://github.com/karelzak/util-linux/issues/252
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-01-13 10:08:39 +01:00
Boris Egorov 43b4f7ea5f lib/tty: Pass default width to get_terminal_width()
Almost any code calling get_terminal_width() checks returned width for
non-positive values and sets it to some default value (say, 80). So,
let's pass this default value directly to the function.

[kzak@redhat.com: - get_terminal_width() refactoring]

Signed-off-by: Karel Zak <kzak@redhat.com>
2016-01-06 12:22:07 +01:00
Karel Zak e03f29b694 line: keep stdin unbuiffered
$ printf 'a\nb\n' | echo $(./line) :: $(./line)

broken version:

 a ::

fixed version:

 a :: b

Addresses: https://github.com/karelzak/util-linux/issues/236
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-12-02 15:01:23 +01:00
Benno Schulenberg e8cf378e48 hexdump: fix a typo and tweak some wordings in the manpage
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2015-11-09 10:03:58 +01:00
Sami Kerola 70e3fcf293 colcrt: allocate enough space for data moves [afl & asan]
==2807==ERROR: AddressSanitizer: global-buffer-overflow on address 0x0000013a31f0 at pc 0x0000004e3047 bp 0x7fffcb7df8d0 sp 0x7fffcb7df8c8
READ of size 4 at 0x0000013a31f0 thread T0
    #0 0x4e3046 in move /home/src/util-linux/text-utils/colcrt.c:309:13
    #1 0x4e25b1 in pflush /home/src/util-linux/text-utils/colcrt.c:264:3
    #2 0x4e246d in colcrt /home/src/util-linux/text-utils/colcrt.c:157:4
    #3 0x4e17d4 in main /home/src/util-linux/text-utils/colcrt.c:141:3
    #4 0x7fb0cb2ee60f in __libc_start_main (/usr/lib/libc.so.6+0x2060f)
    #5 0x4362c8 in _start (/home/src/util-linux/colcrt+0x4362c8)

0x0000013a31f0 is located 0 bytes to the right of global variable 'page' defined in 'text-utils/colcrt.c:73:9' (0x1380b40) of size 140976
SUMMARY: AddressSanitizer: global-buffer-overflow /home/src/util-linux/text-utils/colcrt.c:309 move

And another crash:

==4578==ERROR: AddressSanitizer: global-buffer-overflow on address 0x0000013a3d24 at pc 0x0000004e2510 bp 0x7ffc9257b0e0 sp 0x7ffc9257b0d8
READ of size 4 at 0x0000013a3d24 thread T0
    #0 0x4e250f in colcrt /home/src/util-linux/text-utils/colcrt.c:218:8
    #1 0x4e17d4 in main /home/src/util-linux/text-utils/colcrt.c:141:3
    #2 0x7fe0ac94160f in __libc_start_main (/usr/lib/libc.so.6+0x2060f)
    #3 0x4362c8 in _start (/home/src/util-linux/colcrt+0x4362c8)

0x0000013a3d24 is located 8 bytes to the right of global variable 'page' defined in 'text-utils/colcrt.c:73:9' (0x1381240) of size 142044
SUMMARY: AddressSanitizer: global-buffer-overflow /home/src/util-linux/text-utils/colcrt.c:218 colcrt

Reported-by: Alaa Mubaied <alaamubaied@gmail.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2015-08-10 21:48:42 +01:00
Sami Kerola d883d64d96 colcrt: avoid writing beyond array bound [afl & asan]
text-utils/colcrt.c:205:10: runtime error: index -1 out of bounds for type 'wchar_t [133]'
SUMMARY: AddressSanitizer: undefined-behavior text-utils/colcrt.c:205
=================================================================
==2357==ERROR: AddressSanitizer: global-buffer-overflow on address 0x0000013811b0 at pc 0x0000004e2514 bp 0x7ffdf6ba4450 sp 0x7ffdf6ba4448
READ of size 4 at 0x0000013811b0 thread T0
    #0 0x4e2513 in colcrt /home/src/util-linux/text-utils/colcrt.c:213:8
    #1 0x4e17d4 in main /home/src/util-linux/text-utils/colcrt.c:139:3
    #2 0x7fb77236960f in __libc_start_main (/usr/lib/libc.so.6+0x2060f)
    #3 0x4362c8 in _start (/home/src/util-linux/colcrt+0x4362c8)

Reported-by: Alaa Mubaied <alaamubaied@gmail.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2015-08-10 21:48:38 +01:00
Sami Kerola 3a41cdd7b5 colcrt: use #define in place of magic constants
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2015-08-09 18:59:52 +01:00
Karel Zak 8f2a465073 more: improve ugly macro
no comment, just F*CK YOU to the original author of this crap...

Signed-off-by: Karel Zak <kzak@redhat.com>
2015-08-05 13:09:12 +02:00
Karel Zak c6556f7ca8 tailf: fix open() return value check [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-08-05 11:55:56 +02:00
Karel Zak 35d8592cd4 hexdump: fix man page (-x vs. default output)
Reported-by: Reuti <reuti@staff.uni-marburg.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-07-30 11:49:15 +02:00
Ruediger Meier 3f8478a71c tailf: deprecated
We want to remove it in 2 years, March 2017.

See discussion "tailf, really needed?"
http://thread.gmane.org/gmane.linux.utilities.util-linux-ng/10967

[kzak@redhat.com: - move warning to usage()]

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-03-16 14:26:47 +01:00
Karel Zak e1f7791c81 tailf: use size_t and fwrite()
Let's use size_t for number of output lines and use fwrite() rather
than while() { putchar() };

Signed-off-by: Karel Zak <kzak@redhat.com>
2015-03-05 11:11:53 +01:00
Sami Kerola 9195eca64d tailf: ensure file argument really is a file
The tailf(1) never worked very well with block or character devices,
sockets, fifos and such.  Now after mmap() is used to find last lines
even the little command used to work for example pipes is broken, so test
the tailf is asked to follow a file and when not fail.  That said
symlinks are OK, as long they point to a file.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2015-03-05 10:31:18 +01:00
Sami Kerola 16d3d9a04d tailf: do not allow minus signed last lines argument
Before mmap() the command behavior was not completely correct, as
demonstrated below, and after the mmap() it tried to print some eighteen
quintillion lines.

$ tailf -n-1 x
tailf: cannot allocate 18446744073709543424 bytes: Cannot allocate memory

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2015-03-05 10:31:18 +01:00
Sami Kerola a260b21bdb tailf: count last lines correctly at initial print out
When last lines happen to be greater than string buffer size for fgets()
the number of printed lines resulted to too few.  To avoid miscounts due
insufficient buffer size use mmap() to map the whole file and rewind
until requested number of new lines is found.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2015-03-05 10:31:18 +01:00
Karel Zak 4310faf950 lib/colors: use libtinfo to check terminal capability
The current implementation assumes that all terminals supports colors
and users are forcet to use terminal-colors.d/ to disable colors for
some terminals.

This patch checks for maximal supported colors for the current
terminal and colors are automatically disabled for terminals like
vt100.

The patch moves lib/colors.c from libcommon.la to libtcolors.la to
avoid collisions with another utils.

Signed-off-by: Karel Zak <kzak@redhat.com>
2015-02-27 13:57:34 +01:00
Karel Zak 5d51dc2a7f colors: cleanup man pages, add hint to usage()
cfdisk, fdisk, calm dmesg and hexdump

Signed-off-by: Karel Zak <kzak@redhat.com>

Signed-off-by: Karel Zak <kzak@redhat.com>
2015-02-25 12:40:06 +01:00
Benno Schulenberg fc14ceba5e textual: grammarize and harmonize the stat error message
The message "stat failed %s" seems to say that stat() failed to
do something, or failed to pass a test, but of course it means
that the statting of something failed.  So say so.  Also make
two very similar messages equal to this one.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2015-02-02 11:27:10 +01:00
Sami Kerola bc1ed33881 more: fix repeat search crash
Repeating a search for a pattern that did not found made more(1) to
crash.  To reproduce 'more /etc/services' and search for 'doom'; you will
find a service in port 666 - pressing '.' after that result used to cause
core dump.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2015-01-28 08:27:45 +01:00
J William Piggott b06c1ca6f8 docs: restore minus symbols in long opts
Signed-off-by: J William Piggott <elseifthen@gmx.com>
2015-01-20 18:15:30 -05:00
Benno Schulenberg 3a60b1c26b docs: remove obsolete and unneeded comments from man-page files
Transform some of them into copyright lines.
Also fix three header lines and snip some trailing whitespace.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2015-01-12 11:03:26 +01:00
Sami Kerola 97d8f180b6 ul: remove unexplained TERM=lpr override
The FIXME item has been in place since 2011-04-30, and the code has never
made sense, so remove it.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2015-01-07 21:57:53 +00:00
Benno Schulenberg 331d255261 tailf: slice up the usage text for ease of translation
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2015-01-06 11:47:25 +01:00
Benno Schulenberg 5f55b39e58 colcrt: slice up the usage text for ease of translation
Also use the standard macros for outputting it.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2015-01-06 11:44:24 +01:00
Benno Schulenberg 451dbcfae1 textual: add a docstring to most of the utilities
This adds a concise description of a tool to its usage text.

A first form of this patch was proposed by Steven Honeyman
(see http://www.spinics.net/lists/util-linux-ng/msg09994.html).

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2015-01-06 11:27:38 +01:00
Karel Zak 2e28ebff99 more: fix compiler warnings
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-12-19 14:34:03 +01:00
Sami Kerola 4d9a1969f7 more: blacklist unsigned integer overflow [AddressSanitizer]
The mbrtowc() return values are overflowing by design.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2014-12-19 11:32:38 +01:00
Sami Kerola c2e1ebbe84 line: use util-linux conventions
This change add --help and --version print outs, checking at exit the
stdout write was successful, and as a minor thing the command is made to
use wide char functions to read and write inputs.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2014-12-09 09:19:25 +01:00
Sami Kerola 338a6bc55b textual: improve error messages
Use error printing facilities that add command name in front of the error
message, and add explanation that is part of existing translations.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2014-12-09 09:19:22 +01:00
Natanael Copa 7235e70391 hexdump: use 'll' format modifier instead of the non-standard 'q'.
The printf(3) man page says about 'q':
("quad". 4.4BSD and Linux libc5 only. Don't use.) This is a synonym for ll.

This fixes hexdump with musl libc.

Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
2014-10-31 10:39:18 +01:00
Sami Kerola d07b223788 ul: fix filter() indentation
Content of the while() loop missed one indentation step.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2014-10-20 14:07:20 +02:00
Sami Kerola db433bf737 textual: use usage() text element macros
Translating these text elements should happen only once, which is
more likely when the text macros are used properly.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2014-10-01 12:33:26 +02:00
Sami Kerola a587cc5520 textual: use manual tail usage() macro
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2014-10-01 12:33:24 +02:00
Sami Kerola f627750083 textual: use version printing macro everywhere
Only mount, umount, and blkid remains not using the macro because they
are print also library references.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2014-10-01 12:33:23 +02:00
Sami Kerola bf60e9f12d hexdump: remove deprecation message
Message 'calling hexdump as od has been deprecated in favor of GNU
coreutils od' has informed the hexdump not to be used like that for three
and half years, and five releases.  It is time to get rid of notice.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2014-10-01 12:33:12 +02:00
Sami Kerola 7d2600e2d0 docs: update deprecation banners
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2014-10-01 12:33:11 +02:00
Benno Schulenberg 1d23119072 textual: remove some inconsistent periods from error messages
While doing so, also improve translatability and some wordings.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2014-08-11 14:51:54 +02:00
Steven Honeyman 1b19ea31a3 docs: fix inconsistencies in man pages
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-08-06 14:50:20 +02:00
HUANG Wei 82233c2a0a hexdump: Fix parse format of "byte count without repetition count" 2014-08-06 12:20:18 +08:00
Lauri Nurmi 140d91471d more: replace ad-hoc support for plurals with gettext plurals. 2014-07-28 11:46:59 +02:00
Benno Schulenberg 07990fdcd4 docs: bring several man pages closer to standard formatting
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2014-07-16 12:03:25 +02:00
Benno Schulenberg 1f94a78ce8 docs: improve formatting and wording of a few man pages
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2014-07-14 16:21:34 +02:00
Karel Zak ee312c654b docs: fix "behaviour" vs. "behavior"
Sometimes we use "behaviour" and "behavior" in the same text, let's
use "behavior" only everywhere.

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1011068
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-06-06 09:49:35 +02:00
Karel Zak cb45354ec6 build-sys: add BUILD_{COL,COLCRT,COLRM,COLUMN,HEXDUMP,REV,TAILF}
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-05-21 14:09:43 +02:00
Karel Zak 052e512a64 hexdump: add --color to the man page
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-05-13 12:13:02 +02:00
Karel Zak 58ce71e63e hexdump: use new colors API
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-05-13 12:09:03 +02:00
Sami Kerola acb5f9b56e column: inform user when multibyte conversion error occurs
The column(1) read input until conversion error, and used incomplete
input when outputing, that made at least me to wonder where the rest
disappeared without explanation.  IMHO it is better to fail immediately
rather than do only half of the task.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2014-05-07 11:28:48 +02:00
Benno Schulenberg aa06617f6e textual: remove square brackets from around three dots
Also improve some option descriptions here and there.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2014-05-06 11:12:13 +02:00
Karel Zak b6a8cc0130 Merge branch 'pg-manual-page-long-options' of https://github.com/jaalto/util-linux
* 'pg-manual-page-long-options' of https://github.com/jaalto/util-linux:
  pg.1: Move (plus) options near (minus) option at the beginning
  pg.1: Add -h, --help, -V, --version
2014-04-01 11:37:06 +02:00
Karel Zak 60ec67ff4e lib/colors: add info to man pages, add terminal-colors.d.5
Co-Author: Ondrej Oprala <ooprala@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-03-11 10:05:32 +01:00
Ondrej Oprala d0c9ddc3cc lib/colors: check for /etc/terminal-colors.d/[util].disable
[kzak@redhat.com: - move paths to pathnames.h,
                  - use static path buffer]

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-03-11 09:38:09 +01:00
Benno Schulenberg 01cc21f5b6 docs: fix two command representations in the man page of more
The previous-file command is not :P but :p, and the back-to-where
command is not an acute accent but an apostrophe.  Also condense
some of the descriptions and remove some useless comments.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2014-03-04 13:52:14 +01:00
Ondrej Oprala 3bf7ede997 hexdump: color unit may now be longer than the corresponding format unit
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
2014-03-04 12:48:59 +01:00
Sami Kerola 5fdd35070c more: fix double free crash
Commit b9579f1f44 moved fclose() to
checkf(), but missed removing file closure in magic().  Ironically the
cause of regression is in previous commit message.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2014-02-21 13:45:32 +01:00
Benno Schulenberg 4c5a6f3d39 more: improve formatting and wording of man page and help text
Also, slice up the usage text for ease of translation.

Reported-by: Phillip Susi <psusi@ubuntu.com>
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2014-02-21 11:57:05 +01:00
Sami Kerola 100af0035e docs: make hexdump.1 color specification easier to understand
Fix also spacing, input line lenghts, and troff table for data that is a
table.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2014-02-17 14:04:37 +01:00
Ondrej Oprala 098ab0778f hexdump: add highlighting support
[kzak@redhat.com: - fix coding style,
                  - use xalloc in all code,
		  - fix strtol usage]

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-02-10 16:01:37 +01:00
Karel Zak a5bd793996 include/c.h: prefer nanosleep() over usleep()
Let's use nanosleep() although if usleep() exists. The nanosleep
function does no interact with signals and other timers.

The patch introduces xusleep() as replacement to libc (or our fallback)
usleep(). Yes, we don't want to use struct timespec + nanosleep()
everywhere in code as nano-time resolution is useless for us.

The patch also enlarges delays in some busy wait loops. It seems
enough to try read/write 4x per second.

Signed-off-by: Karel Zak <kzak@redhat.com>
2014-01-24 13:04:14 +01:00
Karel Zak cd70a4606a column: fix mem leak [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-01-14 17:55:05 +01:00
Karel Zak b9579f1f44 more: fix mem leak [coverity scan]
... the code is so soo ugly.

Signed-off-by: Karel Zak <kzak@redhat.com>
2014-01-14 17:54:57 +01:00
Andrew Vagin 5500c81742 hexdump: convert a variable type according with fmt
hexdump works uncorrectly on Rassberry Pi (raspbian wheezy):
0000000 3200000000 3400000000 3600000000 3800000000 a00000000
000000a

The problem is that the %qx format is used for printing
the (short int) variable.

Here is the output from hexdump with this patch:
0000000 3231 3433 3635 3837 0a39
000000a

Currently raspbian uses hexdump from bsdmainutils.
bsdmainutils: /usr/bin/hexdump

Signed-off-by: Andrew Vagin <avagin@openvz.org>
2014-01-06 14:02:21 +01:00
Andrew Vagin 917c3733f8 hexdump: don't access hex after freeing it
[kzak@redhat.com: - remove unnecessary code]

Signed-off-by: Andrew Vagin <avagin@openvz.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-01-06 14:01:04 +01:00
Karel Zak 2152af7289 hexdump: use xcalloc()
Reported-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-01-06 13:54:48 +01:00
Ondrej Oprala 1f77e9c3ad hexdump: Create struct hexdump containing previously global variables.
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
2013-12-02 13:44:24 +01:00
Ondrej Oprala 1be6ed6ade hexdump: add __attribute__ ((__noreturn__)) to bad*() functions
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
2013-12-02 13:44:24 +01:00
Ondrej Oprala bb8ae572ef hexdump: rename struct _fs to struct hexdump_fs and remove its typedef
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
2013-12-02 13:44:23 +01:00
Ondrej Oprala 046921da22 hexdump: rename struct _fu to struct hexdump_fu and remove its typedef
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
2013-12-02 13:44:22 +01:00
Ondrej Oprala 4c73d29c06 hexdump: Rename struct _pr to struct hexdump_pr and remove it's typedef
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
2013-12-02 13:44:21 +01:00
Ondrej Oprala 9f399910f2 hexdump: rename rewrite to rewrite_rules
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
2013-12-02 13:44:21 +01:00
Ondrej Oprala 9fa53cebe4 hexdump: rename add to add_fmt
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
2013-12-02 13:44:20 +01:00
Ondrej Oprala d4646ea4b0 hexdump: Merge hexsyntax.c into hexdump.c
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
2013-12-02 13:44:19 +01:00
Ondrej Oprala af324b1f72 hexdump: add the prefix 'hexdump-' to {conv,display,parse}.c
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
2013-12-02 13:44:17 +01:00
Ondrej Oprala d2740b0ef6 hexdump: catch memory leaks
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
2013-11-08 14:16:29 +01:00
Ondrej Oprala 3917a95d90 hexdump: make addfile() variable names more hinting of their purpose
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
2013-11-08 14:16:04 +01:00
Ondrej Oprala 0acd3f5d0f hexdump: use skip_space() in add()
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
2013-11-08 14:15:39 +01:00
Ondrej Oprala d01d144c4b hexdump: rename in() to first_letter()
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-11-08 13:54:32 +01:00
Ondrej Oprala cb98600831 hexdump: get rid of redundant typecasts
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
2013-11-08 13:51:19 +01:00
Ondrej Oprala cda433918e hexdump: minor formatting improvements in display()
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-11-08 13:49:57 +01:00
Ondrej Oprala f65e62e0ab hexdump: rewrite cluttered case statements
[kzak@redhat.com: - use strchr() for in() macro]

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-11-08 13:42:39 +01:00
Ondrej Oprala 53a9a9939e hexdump: use xasprintf in conv_c()
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
2013-11-08 12:54:53 +01:00
Ondrej Oprala 5988eede0d hexdump: delete redundant typecasts
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
2013-11-08 12:54:53 +01:00
Ondrej Oprala 961b4cd642 hexdump: use GNU case ranges where possible
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
2013-11-08 12:54:53 +01:00
Ondrej Oprala bec2d4582f hexdump: use xstrncpy in add()
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
2013-11-08 12:54:53 +01:00
Ondrej Oprala 2f83c8f032 hexdump: simplify newsyntax arguments
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
2013-11-08 12:54:53 +01:00
Ondrej Oprala acf74fc29d hexdump: minor formatting improvements
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
2013-11-08 12:54:53 +01:00
Ondrej Oprala bbc8c1531f hexdump: rename next{fs,fu,pr} to {fs,fu,pr}list
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
2013-11-08 12:54:52 +01:00
Ondrej Oprala 96ea3d3200 hexdump: rewrite addfile() to use getline()
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
2013-11-08 12:54:52 +01:00
Ondrej Oprala d6e5614e5d hexdump: formatting and variable name cleanup
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
2013-11-08 12:54:52 +01:00
Ondrej Oprala dabfe2ad7c hexdump: rewrite() formatting improvements
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
2013-11-08 12:54:52 +01:00
Ondrej Oprala 9c2cb9b0ea hexdump: rewrite escape()
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
2013-11-08 12:54:52 +01:00
Ondrej Oprala eef27d32fa hexdump: rewrite rewrite()
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
2013-11-08 12:54:52 +01:00
Ondrej Oprala 7e6e290be9 hexdump:rewrite add()
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
2013-11-08 12:54:52 +01:00
Ondrej Oprala c889d52510 hexdump: rewrite next()
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
2013-11-08 12:54:52 +01:00
Ondrej Oprala f77ad41366 hexdump: rewrite get()
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
2013-11-08 12:54:52 +01:00
Ondrej Oprala 89dd9eb3b4 hexdump: rewrite addfile()
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
2013-11-08 12:54:52 +01:00
Ondrej Oprala cbc6c0da30 hexdump: cleanup of redundant symbols/repeating literals
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
2013-11-08 12:54:52 +01:00
Ondrej Oprala 9db5120719 hexdump: use list.h queues and rewrite redundant for cycles
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
2013-11-08 12:54:52 +01:00
Karel Zak 938029c668 pg: use LC_ALL
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-10-18 11:38:02 +02:00
Karel Zak 9c5eb6cfc1 more: fix warning when compiled --without-ncurses
Reported-by: Benno Schulenberg <bensberg@justemail.net>
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-10-15 13:34:42 +02:00
Benno Schulenberg b4362b6f84 docs: standardize the phrases for --help and --version in all man pages
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2013-10-15 10:28:30 +02:00
Benno Schulenberg cfa5f791bf textual: use the standard angular brackets for non-literal arguments
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2013-10-08 15:38:39 +02:00
Benno Schulenberg 98063fc7be hexsyntax: in help text, wrap argument of option -e in angular brackets
Reported-by: Petr Písař <petr.pisar@atlas.cz>
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2013-10-08 15:27:28 +02:00
Karel Zak ccf92e6db7 build-sys: use tinfo *or* ncurses for more(1), ul(1) and setterm(1)
* it seems that we don't have to link the utils with ncurses, tinfo is enough.
   This change saves one unnecessary dependence.

 * libtinfo is also distributed with pkg-config files, so we can use
   PKG_CHECK_MODULES() as a primary source for LIBS and CFLAGS.

 * add TINFO_CFLAGS (although it's probably always empty)

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-10-04 13:28:37 +02:00
Michael Forney 00c505d9cf include: Add missing includes
sys/types.h: For u_char typedef
sys/params.h: For MAXNAMLEN
sys/ttydefaults.h: For various tty definitions (also add configure check)

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-10-04 11:51:21 +02:00
Mike Frysinger 2b8f22bd90 clean up term lib handling
The ncurses package has been providing pkg-config files for a while now.
So let's start using them to get the proper linker & compiler flags.  It
can make a difference when ncurses is configured in a way that requires
extra link time flags but util-linux doesn't provide them, or when the
headers live in a weird place and util-linux can't find them.

Since the NCURSES_LIBS is always defined for the Makefile, there's no need
to gate on the HAVE_NCURSES conditional.  When it's disabled, the var will
simply be empty.

With a minor tweak to how tinfo is handled, we can do the same thing -- we
just always use TINFO_LIBS in the Makefile's.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-09-30 13:41:07 +02:00
Sami Kerola d267fdb854 rev: fix new line regression
Commit 4b4eb34004 made output incorrect for
input lines that does not have new line.  For example

$ printf "a b c\n1 2 3" | rev
c b a
 2 13

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-09-12 11:05:34 +02:00
Sami Kerola 4ccf113704 hexdump: revert global exitval variable change
The change f2a037fb7b had unfavorable
effect of making hexdump to return non-zero exit value always.

This happen because oversight when 'exitval' gets to be set.  By clance,
one might expect main() to call next() which will return value for
'exitval'.  That assessment misses later call chain main() -> display()
-> get() -> next(), which in reverse should return correct value for
'exitval'.

It was mentioned in util-linux maillist that Ondrej Oprala is working on
major renewal of the hexdump .  That in mind it seems best to simply to
revert the global 'exitval' and avoid conflict with Ondrej's work.

Reference: http://markmail.org/message/sbnvuhkboreujj5p
Reported-by: Dave Reisner <d@falconindy.com>
CC: Ondrej Oprala <ooprala@redhat.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-09-10 12:57:31 +02:00
Sami Kerola 2587c5937c more: make output redirection more efficient
Especially with large inputs the change improves performance
considerably.

old> time more /boot/vmlinuz >/dev/null
real    0m0.224s

new> more /boot/vmlinuz >/dev/null
real    0m0.009s

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-08-05 10:47:47 +02:00
Sami Kerola d2b7bc74d9 column: use variable lenght printf field width to wprint blanks
This makes program to run a little faster.  My test input show about 20%
speed improvement.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-08-05 10:47:42 +02:00
Karel Zak 418cb4b3bb more: guarantee space for multibyte
.. to make the code more robust.

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-08-01 17:03:27 +02:00
Karel Zak c36407293d more: check for buffer size when write multibyte char
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-08-01 16:00:21 +02:00
Sami Kerola 4b4eb34004 rev: use string printing rather than character output
Fliping a string in memory, and printing it with multibyte output
function makes the command about 1/3 quicker.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-08-01 13:35:39 +02:00
Karel Zak 1ef2db5a56 more: fix buffer overflow
The bug has been probably introduced by commit
1ac300932d.

Reported-by: "Dr. David Alan Gilbert" <dave@treblig.org>
References: https://bugzilla.novell.com/show_bug.cgi?id=829720
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-08-01 12:58:22 +02:00
Sami Kerola b9f3d0c0ff more: use variable lenght printf field width to print blanks
This makes program to run a little faster.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-07-09 14:26:10 +02:00
Sami Kerola c630db891a column: dereference of null pointer [clang-analyzer]
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-07-09 14:26:06 +02:00
Sami Kerola 67519cdd8f ul: use string printing function
Use of for loop and printing a string character by character is slower
than to print whole string with single function.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-07-09 14:25:55 +02:00
Sami Kerola aa971f7d58 ul: use correct types
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-07-09 14:25:36 +02:00
Sami Kerola f4ec8fa2e3 more: assigned value is never read [clang-analyzer]
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-07-09 14:25:06 +02:00
Sami Kerola 99361a9c0e ul: enhance command performance
Avoid reseting, time after time, the memory which was not used.  Effect
of the change is below in before and after timings.

$ time ./ul </etc/services >/dev/null
real    0m0.320s
user    0m0.307s
sys     0m0.010s

$ time ./ul </etc/services >/dev/null
real    0m0.068s
user    0m0.050s
sys     0m0.017s

[kzak@redhat.com: - add "else" and use maxcol]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-07-01 14:02:57 +02:00
Sami Kerola f2a037fb7b hexdump: remove unnecessary global variables
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-07-01 11:08:01 +02:00
Jari Aalto 5bdc3754d1 pg.1: Move (plus) options near (minus) option at the beginning 2013-06-18 18:02:40 +03:00
Jari Aalto 21c6bcbd31 pg.1: Add -h, --help, -V, --version 2013-06-18 18:01:13 +03:00
Jari Aalto 34e38ad0c3 pg.c: Add --help and --version
[kzak@redhat.com: - use USAGE_{HELP,VERISON} macros]

Signed-off-by: Jari Aalto <jari.aalto@cante.net>
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-06-18 10:49:35 +02:00
Sami Kerola 67c47dff7a rev: reduce stream checking when closing read-only file descriptor
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-06-07 12:24:49 +02:00
Sami Kerola b2e081ce0f rev: simplify new line detection and impossible test
The new line detection is earlier using only '\n' so there should not be
need to search for '\r' later.

The detection whether allocated address is pointing to null seems to be
unnecessary.  Assuming xmalloc() returned valid address space the address
should never be 0.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-06-07 12:24:47 +02:00
Sami Kerola 7c7061f771 rev: stop adding new line at the end when input does not have it
When the rev(1) is executed twice outcome is expected to be exactly what
it was originally.  That includes not adding new line at the end of the
output.  The oneliner below demonstrates earlier issue.

$ printf "abc\n123" | rev | rev

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-06-07 12:24:46 +02:00
Benno Schulenberg c927a0b9e7 docs: slightly correct the man page of column
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2013-06-07 12:11:20 +02:00
Benno Schulenberg 4ce393f4d8 textual: fix several typos and angular brackets in messages
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2013-06-07 12:11:14 +02:00
Mike Frysinger 66083665d5 standard SEE ALSO section of man pages
The standard format is to seperate each entry with a comma, and
for each one to be on a line by itself.  Most util-linux pages
follow this, but a few do not.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-05-13 14:42:59 +02:00
Karel Zak 7697771d8f build-sys: use -Wno-clobbered for some BSD crap
* extend UL_WARN_ADD() for accept non-default CFLAGS variable
 * add BSD_WARN_CFLAGS with -Wno-clobbered
 * use all this for pg(1) and more(1)

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-05-07 09:50:22 +02:00
Sami Kerola 944ab4b931 pg: check writing to a file was successful
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-04-26 13:26:06 +02:00
Sami Kerola cdeb4292e9 hexdump: add long options to the command
Includes update to bash completion, and manual as well.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-04-26 13:26:00 +02:00
Yuri Chornoivan ef75bc880e Fix various typos 2013-04-26 12:50:03 +02:00
Sami Kerola 9dd5ea6229 docs: col.1: fix manual page name section [checkmans.sh]
$ lexgrog text-utils/col.1
text-utils/col.1: parse failed

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-04-09 12:26:47 +02:00
Sami Kerola 9e01635e32 libmount, col: remove redundant null checks [smatch scan]
libmount/src/context_umount.c:174 mnt_context_find_umount_fs() info: redundant null check on loopdev calling free()
libmount/src/context_umount.c:179 mnt_context_find_umount_fs() info: redundant null check on loopdev calling free()
text-utils/col.c:406 flush_lines() info: redundant null check on l->l_line calling free()

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-04-09 12:26:42 +02:00
Sami Kerola 3acc206d39 various: fix variable and function declarations [smatch scan]
disk-utils/fsck.minix.c:511:9: warning: mixing declarations and code
fdisks/sfdisk.c:982:5: warning: mixing declarations and code
fdisks/sfdisk.c:1254:5: warning: mixing declarations and code
fdisks/sfdisk.c:1564:5: warning: mixing declarations and code
lib/mbsalign.c:279:7: warning: mixing declarations and code
libblkid/src/devname.c:378:17: warning: mixing declarations and code
libfdisk/src/alignment.c:219:9: warning: mixing declarations and code
term-utils/wall.c:111:9: warning: mixing declarations and code
text-utils/col.c:418:19: warning: non-ANSI function declaration of function 'flush_blanks'
text-utils/col.c:553:12: warning: non-ANSI function declaration of function 'alloc_line'
text-utils/rev.c:105:9: warning: mixing declarations and code
text-utils/tailf.c:245:9: warning: mixing declarations and code

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-04-09 12:17:20 +02:00
Karel Zak a2343e0312 ul: cleanup usage() and man page
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-05 12:43:51 +02:00
Karel Zak 765056b372 pg: fix memory leak [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-27 16:16:46 +01:00
Benno Schulenberg 9c91fc03ae docs: make the section AVAILABILITY always come last in man pages
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2013-03-20 14:09:24 +01:00
Karel Zak 16ef36f783 docs: add TB to list of supported suffixes
Reported-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-18 18:31:07 +01:00
Sami Kerola 07ff972eb6 translation: unify exec error messages
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-02-06 11:51:17 +01:00
Sami Kerola f8bd089b1d a pointer should not be compared to zero [coccinelle]
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-02-06 11:51:15 +01:00
Benno Schulenberg b50945d4ac textual: spell and encode the name of Arkadiusz Miśkiewicz correctly
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2013-02-06 11:15:02 +01:00
Benno Schulenberg 0c6625a15d textual: standardize the reporting of program name plus package version
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2013-01-30 15:24:00 +01:00
Sami Kerola 3eed42f342 column: make usage() translator friendly
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-01-25 16:40:05 +01:00
Benno Schulenberg 217615e8ed textual: standardize reporting of program name plus package version
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2013-01-25 11:47:29 +01:00
Benno Schulenberg 48899b9eae textual: remove inconsistent periods from two error messages
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2013-01-25 11:47:27 +01:00
Benno Schulenberg 095345d07d textual: fix a few typos in some of the usage help texts
Also improve clarity of some other lines of those texts.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2013-01-25 11:47:26 +01:00
Karel Zak 951666e9f3 more: allow to compile as non-interactive test_more program
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-01-24 19:27:12 +01:00
Karel Zak 53b22add73 build-sys: add --disable-{more,ul,pg}
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-01-24 19:23:56 +01:00
Ondrej Oprala f1107b4a87 hexdump: do not segfault when iterating over an empty format string
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
2013-01-10 11:08:51 +01:00
Sami Kerola cdd2cf46c8 more: remove unnecessary variable
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-12-19 11:38:46 +01:00
Karel Zak 2a31396a9c include/c: move usleep() fallback to c.h
To make it available everywhere in code.

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-10-22 11:03:09 +02:00
Sami Kerola 53078e0887 more: remove few memory leaks
The remaining memory leaks are related to ncurses internals, or the one
open file descriptor when user users 'q' to exit.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-10-15 16:53:59 +02:00
Sami Kerola 1ee762370d more: align void in functions with prototypes, and remove void casts
If there is void in argument list at function prototype it is reasonable
to expect to see it also where the function is wrote.  This change also
removes unnecessary return value void casting.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-10-15 16:53:59 +02:00
Sami Kerola 4eaab145eb more: fix coding style
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-10-15 16:53:59 +02:00
Sami Kerola bb7ae5bfa7 pg: fix coding style
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-10-15 16:53:59 +02:00
Sami Kerola 7d35cf4e57 pg: do not turn off warnigns artificially
Compiler warnings often mean something, fiddling with them is not good
practise.  Besides the 'proglem' removed macro tried to 'fix' does not
even occur when compiling with modern gcc.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-10-15 16:47:43 +02:00
Sami Kerola 69f3ff5e7e pg: use unistd.h STDOUT_FILENO
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-10-15 16:47:42 +02:00
Sami Kerola f494ef65e0 pg: add noreturn function attributes
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-10-15 16:47:40 +02:00
Sami Kerola 8b8f3fa5d9 pg: add const qualifiers where suitable
Includes a fix also to one assignment warning (see below).

text-utils/pg.c:1477:24: warning: assignment discards 'const' qualifier \
from pointer target type [enabled by default]

[kzak@redhat.com: - use const char rather than xstrdup() for static /bin/sh string]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-10-15 16:34:59 +02:00
Sami Kerola 5ad961719d pg: use libc error printing facilities
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-10-15 16:19:35 +02:00
Sami Kerola f2d2af5e3c pg: refactor argument handing
Add function parse_arguments(), which has the same code block that was in
over long, and too deeply intended, main().

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-10-15 16:19:35 +02:00
Sami Kerola 3295cde4af docs: fix column.1 groff syntax error
Quote backslash which user is expected to see.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-10-15 16:19:35 +02:00
Sami Kerola 47bd8ddc5b column: add --output-separator option
The --output-separator option will allow user to define table column
separator.  This will allow for example to write back same delimeter as
which was used as input separator, for example

column -t -s : -o : /etc/passwd

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-10-15 16:19:35 +02:00
Sami Kerola 2e472189c1 pg: check numeric user inputs
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-10-15 15:54:25 +02:00
Sami Kerola 018dfb0fe7 column: describe change of separator behavior in man page bugs section
Add to manual page how to achieve old behavior, just in case someone
relies on buggy behavior of the command.

[kzak@redhat.com: - remove unnecessary info from the man page :-)]

Reported-by:  Padraig Brady <P@draigBrady.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-10-02 10:43:33 +02:00
Pádraig Brady a38dc987ca column: clarify the --separator option
Indicate that the string is a set,
which also clarifies that it's only
significant when parsing the input.
2012-10-02 10:24:55 +02:00
Sami Kerola 732e3dec7d column: make defined separator to be non-greedy
This patch changes interpretation of subsequent delimeter interpretation.
Earlier version merged columns that had null string as content together,
which lead to output as visualized below.

$ printf "a🅱️c\n1::3\n" | column  -t -s ':'
a  b  c
1  3

The number 3 has wrong column, which this patch takes care of, and alters
the output following way.

$ printf "a🅱️c\n1::3\n" | column  -t -s ':'
a  b  c
1     3

This patch does not alter the default case, e.g., subsequent white spaces
are understood as separator of the same field, and the beginning of line
white spaces are being ignored together.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-10-02 10:24:48 +02:00
Karel Zak 67757329cc mark expected fallthrough for static analysers
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-09-07 12:05:56 +02:00
Yuri Chornoivan bbac757b1e textual: fix typos in messages 2012-09-04 17:26:31 +02:00
Karel Zak 0825179f47 col: fix compiler warning [-Wstrict-prototypes]
text-utils/col.c:142:43: warning: function declaration isn’t a prototype [-Wstrict-prototypes]

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-09-04 16:49:28 +02:00
B Watson 43f8915c51 column: --separator segfaults
The --separator and --columns long options in util-linux-2.21.2 and in
a git clone from 5 minutes ago, don't work:

$ echo foobar | column -s x
foobar

$ echo foobar | column -c 10
foobar

$ echo foobar | column --separator=x
column: option '--separator' doesn't allow an argument

$ echo foobar | column --separator x
Segmentation fault

$ echo foobar | column --columns 10
column: bad columns width value: '(null)': Invalid argument

$ echo foobar | column --columns=10
column: option '--columns' doesn't allow an argument

Looks like a simple case of missing has_arg flag in the "struct
option" initialization for these two options. The patch just adds the
flag. I haven't done thorough testing of the patched code, but it
seems to work OK and it no longer segfaults or tries to dereference a
null pointer.

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-08-14 18:27:09 +02:00
Sami Kerola 77cf6e7021 more: add noreturn function attribute
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-07-26 13:51:35 +02:00
Sami Kerola 89a13b46bd hexdump: fix shadow declaration
text-utils/hexdump.h:84:5: warning: shadowed declaration is here [-Wshadow]
./include/xalloc.h:23:28: warning: declaration of 'size' shadows a global declaration [-Wshadow]
./include/xalloc.h:33:40: warning: declaration of 'size' shadows a global declaration [-Wshadow]
./include/xalloc.h:43:49: warning: declaration of 'size' shadows a global declaration [-Wshadow]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-07-26 13:51:22 +02:00
Sami Kerola 7285104410 ul: fix shadow declaration
text-utils/ul.c:641:25: warning: declaration of 'col' shadows a global declaration [-Wshadow]
text-utils/ul.c:126:5: warning: shadowed declaration is here [-Wshadow]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-07-26 13:51:20 +02:00
Sami Kerola 9c35d79ad8 more: fix shadow declaration
text-utils/more.c:1123:13: warning: declaration of 'state' shadows a previous local [-Wshadow]
text-utils/more.c:1095:18: warning: shadowed declaration is here [-Wshadow]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-07-26 13:51:18 +02:00
Karel Zak 81481b5a91 tailf: fix compiler warning [-Wmissing-prototypes]
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-16 18:47:29 +02:00
Karel Zak a4b8ce8223 colrm: fix compiler warning [-Wmissing-prototypes]
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-16 18:46:44 +02:00
Sami Kerola 289dcc9023 translation: unify file open error messages
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-07-16 18:18:22 +02:00
Sami Kerola add1b8afd0 translation: unify stat error messages
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-07-16 18:18:22 +02:00
Karel Zak dcdb349be7 build-sys: always use default $(LDADD)
The global variable $(LDADD) is always used if program_LDADD is
not specified. Let's use $LDADD everywhere to avoid exceptions for
people who need to specify global $LDADD.

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-09 16:23:51 +02:00
Karel Zak f38e5ff355 build-sys: cleanup .gitignore files
- move all binaries to top-level .gitignore
 - remove unnecessary */.gitignore files

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 20:50:54 +02:00
Karel Zak d77ab74af7 build-sys: convert lib/ to libcommon.la
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 20:50:53 +02:00
Karel Zak 22d2322eb1 build-sys: convert term-utils/ to module
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 17:53:09 +02:00
Karel Zak f3e03db330 build-sys: convert text-utils/ to module
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 17:51:41 +02:00
Sami Kerola 327b7c5bfb more: fix pointer wrap around compiler warnings
more.c:318:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
more.c:362:3: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-06-17 18:00:00 +02:00
Sami Kerola 02206bfbd7 more: fix search repetition regression
Commit 596007ef6a introduced a bug
crashing more always when a text search was repeated with 'n' command.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-06-17 18:00:00 +02:00
Sami Kerola 3c44e03f8c hexdump: print sensible message when all input file arguments fail
Earlier hexdump printed unnecessary, and perhaps even misleading, 'bad
file descriptor' message.

$ hexdump foobar
hexdump: foobar: No such file or directory
hexdump: foobar: Bad file descriptor

The message is changed to

$ hexdump foobar
hexdump: foobar: No such file or directory
hexdump: all input file arguments failed

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-06-17 17:59:59 +02:00
Bernhard Voelker 871ffd0960 Fix typos in comments and wall's man page
Culprits identified again by (newer) misspellings:

  $ git ls-files | misspellings -f - | grep -v '^po/'

* wall: Fix typo in man page.
* Fix typos in source code comments.

Signed-off-by: Bernhard Voelker <mail@bernhard-voelker.de>
2012-06-05 14:37:26 +02:00
Andreas Bießmann 3339f0daab text-utils/hexsyntax.c: fix for missing program_invocation_short_name
Some libc do not expose program_invocation_short_name. Therefore util-linux
comes with helpers in 'c.h'. Use the 'c.h' in hexsyntax.c where it was missed.

This patch fixes following error for me:
---8<---
hexsyntax.c: In function 'newsyntax':
hexsyntax.c:115: error: 'program_invocation_short_name' undeclared (first use in this function)
hexsyntax.c:115: error: (Each undeclared identifier is reported only once
hexsyntax.c:115: error: for each function it appears in.)
--->8---

Signed-off-by: Andreas Bießmann <biessmann@corscience.de>
2012-06-05 14:31:13 +02:00
Karel Zak eecbb2cfee more: fix regex error messages printing
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-05 14:19:13 +02:00