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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
* 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>
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>
- 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>
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>
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>
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>
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>
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>
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>
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>
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>