Since Linux kernel 4.8 /sys entries are no more sorted and all is
in the native order. It makes lsblk output messy.
Signed-off-by: Karel Zak <kzak@redhat.com>
* 'fixes-for-v2.29' of https://github.com/rudimeier/util-linux:
misc: once again some printf format strings
misc: fix some compiler warnings
chrt: fix HAVE_SCHED_SETATTR fallback case
fdisk: fix memleak in list_disk_geometry()
If you call mount(8) as root, then we need to append inverting options
(if specified by fstab) for "user" and "users" to /sbin/mount.<type>
command line, because for UID=0 mount.nfs follows command line rather
than the fstab setting.
This has been originally implemented by commit
a4c0cc75ff for the old mount(8). The
same feature is supported by libmount, unfortunately for "user" only.
We need the same also for "users" to be backwardly compatible.
Addresses: https://github.com/karelzak/util-linux/issues/368
Signed-off-by: Karel Zak <kzak@redhat.com>
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>
Broken since 6f27e449. We could not enter the fallback
if HAVE_SCHED_SETATTR is not defined.
Two gcc warnings made this issue visible:
schedutils/chrt.c:247:1: warning: label 'fallback' defined but not used [-Wunused-label]
schedutils/chrt.c:266:9: warning: 'policy' may be used uninitialized in this function [-Wuninitialized]
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* use macro for label initialization
* make sure we do not call fdisk_ref_labelitem() and
fdisk_unref_labelitem() for non-allocated items
Signed-off-by: Karel Zak <kzak@redhat.com>
fdisk -l could crash randomly. Only seen on some i586 systems with
certain exotic compiler options.
The problem was that this item is later used in
function fdisk_reset_labelitem() like this:
if (li->type == 's')
free(li->data.str);
This may crash if item is randomly initialized.
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
disk-utils/fdisk-menu.c: In function ‘gpt_menu_cb’:
disk-utils/fdisk-menu.c:709: warning: passing argument 6 of ‘fdisk_ask_number’ from incompatible pointer type
./libfdisk/src/libfdisk.h:688: note: expected ‘uintmax_t *’ but argument is of type ‘long unsigned int *’
Signed-off-by: Karel Zak <kzak@redhat.com>
* make sure token is terminated
* skip closing quotes
* allow extra space after quotes and before terminater
* skip extra space after terminater
Addresses: https://github.com/karelzak/util-linux/issues/367
Signed-off-by: Karel Zak <kzak@redhat.com>
The parser is not consistent and *case insensitive* Type= and Id= tokens
are not expected on all places.
Addresses: https://github.com/karelzak/util-linux/issues/367
Signed-off-by: Karel Zak <kzak@redhat.com>
- auto cleanup on test exit
- Add smart timeout: Newer openSUSE systems on OBS failed to rmmod
almost always. udevadm settle does not seem to have any affect.
- now tests will fail if rmmod fails
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
On old systems (e.g. RHEL6) with /sbin/mount.tmpfs the mtab file is
modified although our in-tree mount does not support mtab file. We
need to call umount --fake to be sure that we remove unwanted lines
from the test.
Reported-by: Ruediger Meier <sweet_f_a@gmx.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
It's painful, but ncurses upstream does not distribute .pc files by
default and it seems that ncurses{6,5}-config is the preferred solution.
For better compatibility lets use ncurses-config.
Reported-by: Ruediger Meier <sweet_f_a@gmx.de>
Signed-off-by: Karel Zak <kzak@redhat.com>