Commit Graph

5588 Commits

Author SHA1 Message Date
Bill Pemberton a887e5844d docs: remove hwclock --compare from TODO
commit 83765871ef added the --compare
option to hwclock so it can be removed from the TODO.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
2012-10-16 15:29:53 +02:00
Bill Pemberton d0b76eacc8 hwclock: add the --compare option to the man page
The compare option for hwclock was not listed in the man page.  This
adds a simple decription of it.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
2012-10-16 15:29:50 +02:00
Karel Zak c038564d16 docs: add su(1) btmp logging
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-10-16 11:27:35 +02:00
Karel Zak 72980306ec tests: add mising "export" keyword
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-10-15 17:28:02 +02:00
Gilles Espinasse 92273ea177 tests: skip ipcs limits overflow when bc is not available
Found only this one while trying as-root tests

Signed-off-by: Gilles Espinasse <g.esp@free.fr>
2012-10-15 17:15:39 +02:00
Gilles Espinasse a4bc341c7d tests: fix ipcs basic limit when bc is not available
Skip basic limit test if bc is not available.
That happen to be the case when building from sources, following LFS book

Signed-off-by: Gilles Espinasse <g.esp@free.fr>
2012-10-15 17:15:25 +02:00
Raul Gutierrez Segales 39e119f5dc libmount: fixed comment about param
Signed-off-by: Raul Gutierrez Segales <rgs@itevenworks.net>
2012-10-15 17:13:23 +02:00
Karel Zak e37cd480f9 libblkid: fix compiler warning [-Wstrict-aliasing]
libblkid/src/superblocks/befs.c: In function 'get_uuid':
libblkid/src/superblocks/befs.c:353:6: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-10-15 17:01:30 +02:00
Sami Kerola e09bd8d0c5 swapon: remove loop declaration [smatch scan]
sys-utils/swapon.c:677:2: error: 'for' loop initial declarations are
only allowed in C99 mode

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-10-15 16:53:59 +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 4cf02b6510 ddate: remove from util-linux
See RedHat bug for reasons why the ddate is cleaned up.  The reference is
where to get the command in future.

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=823156
References: https://github.com/bo0ts/ddate
Acked-by: Petr Uzel <petr.uzel@suse.cz>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-10-15 16:41:49 +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 f150ac37bc mkfs.minix: check numeric user inputs
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-10-15 16:01:42 +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 9404a96a57 swapon: clarify swapon.8 priority option
Value -1 is valid argument for -p, even though it might not make much
sense as the -1 is in use when priority is not specified at all.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-10-15 15:51:31 +02:00
Sami Kerola 9db6a74905 swapon: check numeric user inputs
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-10-15 15:48:32 +02:00
Sami Kerola 9f6bd5bdf5 docs: align blkdiscard.8 with how-to-man-page.txt
* Add spaces after dots (English spacing).
* Remove use of inline emphasis where possible.
* Use mail and url macros.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-10-15 15:46:47 +02:00
Karel Zak c550f728f7 wipefs: use O_EXCL
Address: https://bugzilla.redhat.com/show_bug.cgi?id=865961
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-10-15 12:38:09 +02:00
Karel Zak 6d5d2b5fd3 libmount: don't use umount optimization for -l or -f
The options -l (lazy) and -f (force) means that the mountpoint may be
unreadable (for example because NFS server is unreadable). So we
should not try to be smart in this case and we should try to minimize
number of situations when stat() or readlink() is used for the
mountpoint.

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-10-15 11:10:50 +02:00
Karel Zak 71b161ea37 build-sys: clean update-potfiles script
- use only sed(1)
 - remove config.h from the result
 - remove samples/, tests/, util-linu-*/ ("make ditcheck" product)
   directories from the result

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-10-10 14:10:30 +02:00
Karel Zak 78dd43cadc build-sys: remove --enable-gtk-doc from make check
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-10-10 14:10:30 +02:00
Mike Frysinger 2d609d9945 sfdisk: fix aliasing warnings
Compiles down to the same code.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-10-10 11:23:25 +02:00
Mike Frysinger 6c6f719688 md5: fix strict aliasing warnings
This is the same fix as was merged in gcc/binutils where this code
appears to originate from.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-10-10 11:23:24 +02:00
Milan Broz 5eec85708d tests: fix mount move test to work with shared mount
If parent mount for test directory is mounted with shared flag,
move mount test fails because kernel rejects mount move operation.

Use another directory level and explicitly make parent mount private.

(All "modern" systems using system have mounts shared for some reason.)

Signed-off-by: Milan Broz <mbroz@redhat.com>
2012-10-09 12:12:49 +02:00
Milan Broz 53ebc440fc tests: ignore test if kernel doesn't support minix fs
Minix mount test returs failure if kernel have no minix support,
 minix: mkfs ... FAILED (minix/mkfs)
ignore test result instead in this case.

Signed-off-by: Milan Broz <mbroz@redhat.com>
2012-10-09 12:12:49 +02:00
Milan Broz fd22f8dbe8 tests: fix timezone for cramfs
cramfs test need explicitly set timezone otherwise
ls diff fails with
   cramfs: mkfs checksums ... FAILED (cramfs/mkfs)

Signed-off-by: Milan Broz <mbroz@redhat.com>
2012-10-09 12:12:48 +02:00
Mike Frysinger 8323d9fd59 fix bold style of man page references
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-10-09 12:12:48 +02:00
Marcin Juszkiewicz 6d9bbf886a fdisk: add AArch64 support
Attached patch fixed build problem when util-linux is built for AArch64
architecture.
2012-10-09 12:12:48 +02:00
Karel Zak 84600ddc6d mount: add verbose messages
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=864227
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-10-09 11:56:35 +02:00
Karel Zak dc3ea13356 libmount: fix umount file.img
The umount optimization (commit 9cc03553f7)
has to be disabled if the umount argument is not a directory.

Reported-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-10-05 20:38:49 +02:00
Karel Zak 98193daa8c login: reuse DEAD_PROCESS utmp entries
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=858009
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-10-05 12:07:10 +02:00
Karel Zak f7b59bb27f hwclock: fix in usage()
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-10-03 11:41:52 +02:00
Bjørn Mork 8c8fa302c1 dmesg: fix console-level off-by-one
commit f06ec64f dmesg; support level names (e.g. --console-level=alert)

introduced an off-by-one error.  The kernel will print messages with
a *higher* level than the console-level. The bug made it impossible to
set the level for debugging, like it is documented in e.g
Documentation/networking/netconsole.txt :

 nemi:/tmp# dmesg -n 8
 dmesg: unknown level '8'

And attempting to set the "emerg" level would result in an invalid 0 value:

 nemi:/tmp# dmesg -n emerg
 dmesg: klogctl failed: Invalid argument

Restoring the old behaviour for numeric levels, and mapping the level
names so that "dmesg -n debug" behaves as expected: logging everything
at level "debug" and higher.

[kzak@redhat.com: - add comment to parse_level()]

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-10-02 11:43:10 +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
Vitezslav Cizek 61cebf7747 su: fixed a typo in pam error message
Signed-off-by: Vitezslav Cizek <vcizek@suse.cz>
2012-10-02 10:25:13 +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
Mike Frysinger f036b4c730 mount: fix a few typos
Nothing of note here.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-10-02 10:24:36 +02:00
Gilles Espinasse 45683be543 textual: typo fixes
Signed-off-by: Gilles Espinasse <g.esp@free.fr>
2012-10-02 10:24:26 +02:00
Peter Rajnoha 8d687180b2 lsblk: fix reporting of 'part' type
Partitions are incorrectly marked with 'disk' type on
lsblk output while it should be marked as 'part' type.

Before:
$ lsblk /dev/sda
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda      8:0    0  128M  0 disk
`-sda1   8:1    0   64M  0 disk

With this patch applied:
$ lsblk /dev/sda
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda      8:0    0  128M  0 disk
`-sda1   8:1    0   64M  0 part

Signed-off-by: Peter Rajnoha <prajnoha@redhat.com>
2012-10-02 10:23:51 +02:00