Changes between v2.32 and v2.33-rc1 -------------------------------------------- commit ed022563878b605a4ecf0883da45269b50855966 Author: Karel Zak Date: Tue Sep 25 11:26:58 2018 +0200 build-sys: release++ (v2.33-rc1) Signed-off-by: Karel Zak NEWS | 4 ++++ configure.ac | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) commit 99c92a48205699707959bf1f7b6e0e35511c3d7b Author: Karel Zak Date: Mon Sep 24 11:37:13 2018 +0200 tests: add choom to build-sys test Signed-off-by: Karel Zak tests/expected/build-sys/config-all | 1 + tests/expected/build-sys/config-all-non-nls | 1 + tests/expected/build-sys/config-audit | 1 + tests/expected/build-sys/config-chfnsh-libuser | 1 + tests/expected/build-sys/config-chfnsh-no-password | 1 + tests/expected/build-sys/config-chfnsh-pam | 1 + tests/expected/build-sys/config-core | 1 + tests/expected/build-sys/config-devel | 1 + tests/expected/build-sys/config-devel-non-docs | 1 + tests/expected/build-sys/config-non-libblkid | 1 + tests/expected/build-sys/config-non-libmount | 1 + tests/expected/build-sys/config-non-libs | 1 + tests/expected/build-sys/config-non-libsmartcols | 1 + tests/expected/build-sys/config-non-libuuid | 1 + tests/expected/build-sys/config-non-nls | 1 + tests/expected/build-sys/config-selinux | 1 + tests/expected/build-sys/config-slang | 1 + tests/expected/build-sys/config-static | 1 + 18 files changed, 18 insertions(+) commit 71c7d37bc42703a3f219ad1164b60bfe1904febc Author: Karel Zak Date: Mon Sep 24 11:21:09 2018 +0200 docs: fix gtkdoc warning Signed-off-by: Karel Zak libmount/src/cache.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 78686983e072bfd405c56fe18a45331dfedaeeef Author: Karel Zak Date: Thu Sep 20 14:27:55 2018 +0200 docs: update v2.33-ReleaseNotes Signed-off-by: Karel Zak Documentation/releases/v2.33-ReleaseNotes | 565 ++++++++++++++++++++++++++++++ 1 file changed, 565 insertions(+) commit 027ee85a1b56aba5cae0ef3f99431cc7101b3f3a Author: Karel Zak Date: Thu Sep 20 12:19:06 2018 +0200 docs: update AUTHORS file Signed-off-by: Karel Zak AUTHORS | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 251e171e511033cc56eb0dc1d4ae785725f3e017 Author: Karel Zak Date: Wed Sep 19 12:54:05 2018 +0200 po: merge changes Signed-off-by: Karel Zak po/ca.po | 4495 ++++++++++++++++++++++++--------------------- po/cs.po | 4531 +++++++++++++++++++++++++--------------------- po/da.po | 4493 ++++++++++++++++++++++++--------------------- po/de.po | 4499 ++++++++++++++++++++++++--------------------- po/es.po | 4502 ++++++++++++++++++++++++--------------------- po/et.po | 4475 ++++++++++++++++++++++++--------------------- po/eu.po | 4484 ++++++++++++++++++++++++--------------------- po/fi.po | 4505 ++++++++++++++++++++++++--------------------- po/fr.po | 4501 ++++++++++++++++++++++++--------------------- po/gl.po | 4461 ++++++++++++++++++++++++--------------------- po/hr.po | 4423 +++++++++++++++++++++++--------------------- po/hu.po | 4493 ++++++++++++++++++++++++--------------------- po/id.po | 4493 ++++++++++++++++++++++++--------------------- po/it.po | 4499 ++++++++++++++++++++++++--------------------- po/ja.po | 5233 +++++++++++++++++++++++++---------------------------- po/nl.po | 4521 ++++++++++++++++++++++++--------------------- po/pl.po | 4498 ++++++++++++++++++++++++--------------------- po/pt_BR.po | 4558 +++++++++++++++++++++++++--------------------- po/ru.po | 4487 ++++++++++++++++++++++++--------------------- po/sl.po | 4495 ++++++++++++++++++++++++--------------------- po/sv.po | 4544 +++++++++++++++++++++++++--------------------- po/tr.po | 4499 ++++++++++++++++++++++++--------------------- po/uk.po | 4498 ++++++++++++++++++++++++--------------------- po/util-linux.pot | 4371 +++++++++++++++++++++++--------------------- po/vi.po | 4512 ++++++++++++++++++++++++--------------------- po/zh_CN.po | 4503 ++++++++++++++++++++++++--------------------- po/zh_TW.po | 4498 ++++++++++++++++++++++++--------------------- 27 files changed, 65307 insertions(+), 56764 deletions(-) commit f0afad3164a725c04a7e1d861e7c15283799e2c1 Author: Sebastian Rasmussen Date: Wed Sep 19 12:49:46 2018 +0200 po: update sv.po (from translationproject.org) po/sv.po | 408 +++++++++++++++++++++++++++++---------------------------------- 1 file changed, 188 insertions(+), 220 deletions(-) commit 395557fa04296ccc313fe14186ab3ba4b163b38f Author: Rafael Fontenelle Date: Wed Sep 19 12:49:46 2018 +0200 po: update pt_BR.po (from translationproject.org) po/pt_BR.po | 275 ++++++++++++++++++++++++++++++------------------------------ 1 file changed, 136 insertions(+), 139 deletions(-) commit 91730da15bcb587f735ecaa34529037723bf0bbd Author: Takeshi Hamasaki Date: Wed Sep 19 12:49:46 2018 +0200 po: update ja.po (from translationproject.org) po/ja.po | 1228 +++++++++++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 943 insertions(+), 285 deletions(-) commit ab295603e96c2db03e4676ab51fbeeae2627a8ab Author: Karel Zak Date: Wed Sep 19 12:00:59 2018 +0200 libfdisk: (docs) add missing function Signed-off-by: Karel Zak libfdisk/docs/libfdisk-sections.txt | 1 + 1 file changed, 1 insertion(+) commit ccafadb7c58865f73d209fcfc74483be96cdf64d Author: Karel Zak Date: Wed Sep 19 11:25:08 2018 +0200 lsblk: move udev and blkid stuff to lsblk-properties.c Signed-off-by: Karel Zak misc-utils/Makemodule.am | 1 + misc-utils/lsblk-properties.c | 188 +++++++++++++++++++++++++++++++++++++ misc-utils/lsblk.c | 209 ++++-------------------------------------- misc-utils/lsblk.h | 5 + 4 files changed, 210 insertions(+), 193 deletions(-) commit baad6dcc6e29503542440584ffdc4b6edd201aba Author: Karel Zak Date: Wed Sep 19 11:04:35 2018 +0200 lsblk: cleanup udev/blkid properties code * split properties to separate struct which is allocated only when udev or blkid provides some information * use separate function for udev and blkid and hide details in generic get_device_properties() * make sure we do not overwrite stuff udev and blkid (but this is only theoretic issue as we do not call get_properties_by_blkid() directly from code) Signed-off-by: Karel Zak misc-utils/lsblk.c | 222 ++++++++++++++++++++++++++++++----------------------- misc-utils/lsblk.h | 34 ++++---- 2 files changed, 143 insertions(+), 113 deletions(-) commit a1b463d94afdae65ab5bfb192a58f1ceeb13679a Author: Karel Zak Date: Mon Sep 17 16:22:14 2018 +0200 tests: update sfdisk resize due to 2f35c1ead621f42f32f7777232568cb03185b473 Signed-off-by: Karel Zak tests/expected/sfdisk/dos-resize-logical | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2f35c1ead621f42f32f7777232568cb03185b473 Author: Karel Zak Date: Mon Sep 17 11:58:50 2018 +0200 libfdisk: count gaps to possible size when resize The current code counts only partition sizes when it counts possible space, but we have gaps between the partitions. It seems better to count all based on offsets rather than sizes. Addresses: https://github.com/karelzak/util-linux/issues/693 Signed-off-by: Karel Zak libfdisk/src/partition.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 652cb1cd26a9fd62653e112b04a9512f5f42578c Author: Karel Zak Date: Fri Sep 14 16:27:26 2018 +0200 lsblk: encapsulate stat() usage Signed-off-by: Karel Zak misc-utils/lsblk.c | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) commit 5b82289b6071acfdccb1aff7beb9e63d950aac55 Author: Karel Zak Date: Fri Sep 14 16:26:38 2018 +0200 lib/strutils: return from xstrmode() Signed-off-by: Karel Zak include/strutils.h | 2 +- lib/strutils.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) commit 82dae67d1a902aec6aa164510717be027810bfe6 Author: Karel Zak Date: Fri Sep 14 15:57:45 2018 +0200 lsblk: differentiate between swap and mount Signed-off-by: Karel Zak misc-utils/lsblk-mnt.c | 10 +++++++--- misc-utils/lsblk.c | 2 +- misc-utils/lsblk.h | 3 ++- 3 files changed, 10 insertions(+), 5 deletions(-) commit 04be258d65ba9fcc61db3f99ba09149f92d5c2c8 Author: Karel Zak Date: Fri Sep 14 15:49:00 2018 +0200 lsblk: use lsblk_ prefix mountpoint getter Signed-off-by: Karel Zak misc-utils/lsblk-mnt.c | 2 +- misc-utils/lsblk.c | 4 ++-- misc-utils/lsblk.h | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) commit e0c016f11b78b12b0b47d5623b2fccfeeca2d838 Author: Karel Zak Date: Fri Sep 14 15:45:53 2018 +0200 lsblk: init/deinit libmount stuff Signed-off-by: Karel Zak misc-utils/lsblk-mnt.c | 12 ++++++++++++ misc-utils/lsblk.c | 2 ++ misc-utils/lsblk.h | 4 ++++ 3 files changed, 18 insertions(+) commit cfb715ed1d9df215a8fc5d8f887048d46019c2cc Author: Karel Zak Date: Fri Sep 14 15:41:39 2018 +0200 lsblk: move mount stuff to lsblk-mnt.c Signed-off-by: Karel Zak misc-utils/Makemodule.am | 1 + misc-utils/lsblk-mnt.c | 111 +++++++++++++++++++++++++++++++++++++++++++++++ misc-utils/lsblk.c | 107 --------------------------------------------- misc-utils/lsblk.h | 2 + 4 files changed, 114 insertions(+), 107 deletions(-) commit 14560b7f5445e84c54122c9a8f6f65124b97ed2a Author: Karel Zak Date: Fri Sep 14 15:36:59 2018 +0200 lsblk: add lsblk.h * move core struct to the header file * move debug stuff to the header file Signed-off-by: Karel Zak misc-utils/Makemodule.am | 4 +- misc-utils/lsblk.c | 84 ++---------------------------------------- misc-utils/lsblk.h | 95 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 101 insertions(+), 82 deletions(-) commit bc405d641e41030254e44fe7dc58b465537f99a6 Author: Karel Zak Date: Thu Sep 13 12:11:06 2018 +0200 lsblk: add columns FSAVAIL,FSSIZE,FSUSED,FSUSE% Signed-off-by: Karel Zak misc-utils/lsblk.c | 90 ++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 84 insertions(+), 6 deletions(-) commit e4386c8cc0f7f2cfb09781d963b353310a3cd93a Author: Karel Zak Date: Wed Sep 12 13:18:08 2018 +0200 libfdisk: accept grain script header The "grain" variable is used to calculate partitions alignment. The default is 1MiB (or minimal I/O size). The libfdisk provides API to overwrite this default, but this feature has been nowhere accessible for end-user. This patch support for "grain: " in libfdisk scripts. Addresses: https://github.com/karelzak/util-linux/issues/688 Signed-off-by: Karel Zak disk-utils/sfdisk.8 | 5 +++++ libfdisk/src/alignment.c | 1 + libfdisk/src/script.c | 24 +++++++++++++++++++++++- 3 files changed, 29 insertions(+), 1 deletion(-) commit aef79c1f8e721433a534ff489e367f378c52bc0f Author: Karel Zak Date: Wed Sep 12 12:26:06 2018 +0200 sfdisk: document script GPT headers Add first-lba, last-lba and table-length to the sfdisk man page. Signed-off-by: Karel Zak disk-utils/sfdisk.8 | 9 +++++++++ 1 file changed, 9 insertions(+) commit 1a6f970363418d29a3e4251e36a0c63ae2256bfa Merge: da6392177 275d47c9b Author: Karel Zak Date: Tue Sep 11 13:42:52 2018 +0200 Merge branch 'more' of https://github.com/kerolasa/util-linux * 'more' of https://github.com/kerolasa/util-linux: more: rename functions more: rename variable names more: remove unnecessary ifdef preprosessor directives more: do not call fileno() for std{in,out,err} streams more: remove 'register' keywords more: remove pointless functions more: return is statement not a function more: remove dead code and useless comments commit da6392177d8dc23653d02df801ab67b46ebd9f9a Author: Karel Zak Date: Tue Sep 11 12:43:03 2018 +0200 unshare: remove -s from --help output The code and man page do not assume -s to be short alias to --setgroups. This commit also a little bit change --help output formatting to make it more readable and structured. Addresses: https://github.com/karelzak/util-linux/pull/692 Signed-off-by: Karel Zak sys-utils/unshare.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 137599ebe152ae10ff6fa492956a65f173623f04 Author: Karel Zak Date: Tue Sep 11 09:53:18 2018 +0200 lsblk: don't ask udev when --sysroot specified We use --sysroot to get information about block devices from /proc and /sys dumps. In this case does not make sense to read anything from udev as udevd is about the current system devices. Signed-off-by: Karel Zak misc-utils/lsblk.c | 2 ++ 1 file changed, 2 insertions(+) commit f1a7cfcb1d487c19c27287fe5136c46f3b7de1ab Author: Matti Niemenmaa Date: Mon Sep 10 15:21:31 2018 +0300 fallocate: add missing semicolon This broke compilation when HAVE_POSIX_FALLOCATE was undefined. The typo dates to the original posix_fallocate support added in commit 833f9a7aae713278eec5f85266597482f18c7370. Signed-off-by: Matti Niemenmaa sys-utils/fallocate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4698ffdfa1bbea30f7d09cb0bdb7c5cfc7f2ea72 Merge: 13cbc6f21 4866b7178 Author: Karel Zak Date: Mon Sep 10 10:35:32 2018 +0200 Merge branch 'motd' of https://github.com/lnussel/util-linux commit 13cbc6f21c0a25a07c7e55ee96f35e51fb7e4387 Author: Karel Zak Date: Mon Sep 10 10:29:37 2018 +0200 lsblk: prefer MODEL from udev DB sysfs device model is truncated to 16 characters: > cat /sys/block/sda/device/model Crucial_CT128MX1 > udevadm info --query=property /dev/sda | grep MODEL= ID_MODEL=Crucial_CT128MX100SSD1 sysfs uses INQUARY response which has the 16 characters limitation and udev uses something else. Addresses: https://github.com/karelzak/util-linux/issues/690 Signed-off-by: Karel Zak misc-utils/lsblk.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 4866b7178614e7db0de15212e5846e1a5656211a Author: Ludwig Nussel Date: Fri Sep 7 09:47:25 2018 +0200 Add built in fallbacks for motd file Use several locations for built in default for motd to allow for e.g. run time generated motd without having to modify config files. login.c already splits by colon. /usr/share/misc/motd - chould be shipped by distributions /run/motd - potentially run time created file with dynamic information /etc/motd - for the admin fill with local information Signed-off-by: Ludwig Nussel include/pathnames.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 27afe5016842c22d256ea9f88b598d637ca0df84 Author: Karel Zak Date: Wed Sep 5 11:51:22 2018 +0200 script: be sensitive to another SIGCHLD ssi_codes The current signalfd handler cares on CLD_EXITED only. It's pretty insufficient as there is more situations (and codes) when child no more running. Addresses: https://github.com/karelzak/util-linux/issues/686 Signed-off-by: Karel Zak term-utils/script.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 350f5c8df2cb6edbfb5bae95f00a9fff446d236c Author: Karel Zak Date: Tue Sep 4 14:30:37 2018 +0200 lscpu: use the first VM from /proc/sysinfo Addresses: https://github.com/karelzak/util-linux/issues/685 Signed-off-by: Karel Zak sys-utils/lscpu.c | 1 + 1 file changed, 1 insertion(+) commit d0b75b03bca36ed8a548655bba74297996cd69a6 Author: Karel Zak Date: Tue Sep 4 13:12:34 2018 +0200 lscpu: make xasprintf call more robust Signed-off-by: Karel Zak sys-utils/lscpu.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit f40e316f5e0e1371c233a90ad0c9c73bea95ad89 Author: Karel Zak Date: Tue Sep 4 11:42:19 2018 +0200 build-sys: default to /lib64 for ${exec_prefix}/lib64 We already default to /lib for the default $exec_prefix, but the current configure does not care about /lib64 although the use-case is exactly same as for /lib. Signed-off-by: Karel Zak configure.ac | 1 + 1 file changed, 1 insertion(+) commit 66620e411bfaccb26548c987f390cfc13d526977 Author: Karel Zak Date: Mon Sep 3 15:53:41 2018 +0200 docs: remove obsolete entry from TODO Already implemented by commit cf654e1c3ec8f6f9ac93bf4f6981d560249868d9. Signed-off-by: Karel Zak Documentation/TODO | 7 ------- 1 file changed, 7 deletions(-) commit 275d47c9b73d9560288642477806f68b580c21bb Author: Sami Kerola Date: Mon May 28 09:49:26 2018 +0100 more: rename functions This clarifies what various function calls are doing. Signed-off-by: Sami Kerola text-utils/more.c | 171 +++++++++++++++++++++++++++--------------------------- 1 file changed, 86 insertions(+), 85 deletions(-) commit d910f31110eb4f5b718adb8958eed5deade57422 Author: Sami Kerola Date: Sun May 27 17:29:09 2018 +0100 more: rename variable names Try to make variable names to tell what they do. Earlier names have been in more(1) since the command was first wrote, and it looks like coding practices has changed since late 70's. Signed-off-by: Sami Kerola text-utils/more.c | 1114 ++++++++++++++++++++++++++--------------------------- 1 file changed, 556 insertions(+), 558 deletions(-) commit 1e2cd595eb865fa816452a7e99b72656913491b9 Author: Sami Kerola Date: Sat May 26 23:02:51 2018 +0100 more: remove unnecessary ifdef preprosessor directives Signed-off-by: Sami Kerola text-utils/more.c | 8 -------- 1 file changed, 8 deletions(-) commit d2b540022b8df6fe4aa339c6b35cf9f980a9e877 Author: Sami Kerola Date: Sat May 26 21:36:17 2018 +0100 more: do not call fileno() for std{in,out,err} streams These file descriptor numbers are well known, use them from unistd.h Signed-off-by: Sami Kerola text-utils/more.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 0b735ea49ec1bf2921f5d1eec5c8bb68112a0a55 Author: Sami Kerola Date: Sat May 26 21:24:31 2018 +0100 more: remove 'register' keywords One can only assume someone tried to make more(1) to run quicker. More up to date assumption is that compilers are fully capable optimizing binaries without these sort of hints. Signed-off-by: Sami Kerola text-utils/more.c | 58 +++++++++++++++++++++++++++---------------------------- 1 file changed, 29 insertions(+), 29 deletions(-) commit 70824899b0c6c5c8984377faed35e1e059042410 Author: Sami Kerola Date: Sat May 26 21:16:07 2018 +0100 more: remove pointless functions The curs_terminfo(3X) defines putp() as tputs(str, 1, putchar), so all of these five functions can be replaced with putp(). Signed-off-by: Sami Kerola text-utils/more.c | 95 ++++++++++++++++++++----------------------------------- 1 file changed, 34 insertions(+), 61 deletions(-) commit f728d8baae70b6d7959e94fc5873f9a1d61b39ed Author: Sami Kerola Date: Sat May 26 20:55:32 2018 +0100 more: return is statement not a function Signed-off-by: Sami Kerola text-utils/more.c | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) commit c8b1fa60465c0adeefe31ce9a21a792d45df7919 Author: Sami Kerola Date: Sat May 26 20:08:34 2018 +0100 more: remove dead code and useless comments Removal of STOP requires explanation. Looking unix-history-repo getline() function in first BSD-3 version could return STOP. By next tag BSD-4 the return STOP had disappeared. If I read this correctly that was a partial removal, and second part has waited to be completed since 1980-11-16 when BSD-4 was released. Reference: https://github.com/dspinellis/unix-history-repo/blob/BSD-3-Snapshot-Development/usr/src/cmd/more.c#L501 Signed-off-by: Sami Kerola text-utils/more.c | 98 ++++++++++++++----------------------------------------- 1 file changed, 24 insertions(+), 74 deletions(-) commit 7edaf221d610309874e866670dceb4e2f3a04070 Author: Karel Zak Date: Fri Aug 31 12:48:46 2018 +0200 test: update UUID v5 tests Signed-off-by: Karel Zak tests/expected/uuid/oids | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d6ddf07d31dfdc894eb8e7e6842aa856342c526e Author: Karel Zak Date: Fri Aug 31 12:27:32 2018 +0200 libuuid: fix name-based UUIDs The current version is not fully compatible with RFC4122. It incorrectly encodes UUID variant xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx where M is UUID version and N is UUID variant. $ python -c "import uuid ; print(uuid.uuid5(uuid.UUID(int=0), 'foo'))" aa752cea-8222-5bc8-acd9-555b090c0ccb ^^ Old version: $ uuidgen --namespace 00000000-0000-0000-0000-000000000000 --name 'foo' --sha1 aa752cea-8222-5bc8-8cd9-555b090c0ccb ^^ Fixed version: ./uuidgen --namespace 00000000-0000-0000-0000-000000000000 --name 'foo' --sha1; aa752cea-8222-5bc8-acd9-555b090c0ccb ^^ The patch uses uuid_unpack and uuid_pack. It makes code more readable and allow to access proper octens. The same way we already use for time and random based UUIDs. Addresses: https://github.com/karelzak/util-linux/issues/683 Signed-off-by: Karel Zak libuuid/src/gen_uuid.c | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) commit 9a312758eeee7c3dc3edcece0d60b68daac8ff3b Author: Karel Zak Date: Fri Aug 31 10:08:46 2018 +0200 libuuid: add note about RFC4122 UUID layout Signed-off-by: Karel Zak libuuid/src/uuidP.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 1e3bc261d04025cd20b1e6d8199aaa65b1acb85f Author: Karel Zak Date: Thu Aug 30 15:24:41 2018 +0200 tests: update fdisk output Signed-off-by: Karel Zak tests/expected/blkid/md-raid1-part | 1 + tests/expected/fdisk/align-512-4K | 1 + tests/expected/fdisk/align-512-4K-63 | 1 + tests/expected/fdisk/align-512-4K-md | 1 + tests/expected/fdisk/align-512-512-topology | 1 + tests/expected/sfdisk/dos-activate | 1 + tests/expected/sfdisk/dos-dump-gaps | 1 + tests/expected/sfdisk/dos-dump-old | 1 + tests/expected/sfdisk/dos-explicit-size | 1 + tests/expected/sfdisk/dos-read-dump | 1 + tests/expected/sfdisk/dos-read-dump-case | 1 + tests/expected/sfdisk/dos-reduce-empty-extended | 1 + tests/expected/sfdisk/dos-resize | 1 + tests/expected/sfdisk/dos-resize-empty-extended | 1 + tests/expected/sfdisk/dos-resize-extended | 1 + tests/expected/sfdisk/dos-resize-logical | 1 + tests/expected/sfdisk/dos-simple-commas | 1 + tests/expected/sfdisk/dos-simple-space | 1 + tests/expected/sfdisk/gpt-all-defaults | 1 + tests/expected/sfdisk/gpt-read-dump | 2 ++ tests/expected/sfdisk/gpt-reorder | 2 ++ tests/expected/sfdisk/gpt-resize | 1 + tests/expected/sfdisk/movedata-down | 1 + tests/expected/sfdisk/movedata-non-overlay | 1 + tests/expected/sfdisk/movedata-up | 1 + tests/expected/sfdisk/resize-dos-0-move-up-absolute | 1 + tests/expected/sfdisk/resize-dos-1-move-down-absolute | 1 + tests/expected/sfdisk/resize-dos-10-down-enlarge | 1 + tests/expected/sfdisk/resize-dos-11-absolute-move-resize | 1 + tests/expected/sfdisk/resize-dos-12-reduce-midle | 1 + tests/expected/sfdisk/resize-dos-13-max-last | 1 + tests/expected/sfdisk/resize-dos-2-move-up-relative | 1 + tests/expected/sfdisk/resize-dos-3-move-down-relative | 1 + tests/expected/sfdisk/resize-dos-4-enlarge-absolute | 1 + tests/expected/sfdisk/resize-dos-5-reduce-absolute | 1 + tests/expected/sfdisk/resize-dos-6-enlarge-relative | 1 + tests/expected/sfdisk/resize-dos-7-reduce-relative | 1 + tests/expected/sfdisk/resize-dos-8-enlarge-all | 1 + tests/expected/sfdisk/resize-dos-9-up-preduce | 1 + tests/expected/sfdisk/resize-dos-unsorted | 2 ++ tests/expected/sfdisk/resize-gpt-0-move-up-absolute | 1 + tests/expected/sfdisk/resize-gpt-1-move-down-absolute | 1 + tests/expected/sfdisk/resize-gpt-10-down-enlarge | 1 + tests/expected/sfdisk/resize-gpt-11-absolute-move-resize | 1 + tests/expected/sfdisk/resize-gpt-12-reduce-midle | 1 + tests/expected/sfdisk/resize-gpt-13-max-last | 1 + tests/expected/sfdisk/resize-gpt-2-move-up-relative | 1 + tests/expected/sfdisk/resize-gpt-3-move-down-relative | 1 + tests/expected/sfdisk/resize-gpt-4-enlarge-absolute | 1 + tests/expected/sfdisk/resize-gpt-5-reduce-absolute | 1 + tests/expected/sfdisk/resize-gpt-6-enlarge-relative | 1 + tests/expected/sfdisk/resize-gpt-7-reduce-relative | 1 + tests/expected/sfdisk/resize-gpt-8-enlarge-all | 1 + tests/expected/sfdisk/resize-gpt-9-up-preduce | 1 + tests/expected/sfdisk/script-broken-1 | 1 + tests/expected/sfdisk/script-broken-2 | 1 + tests/expected/sfdisk/script-broken-3 | 1 + tests/expected/sfdisk/script-broken-4 | 1 + tests/expected/sfdisk/script-broken-5 | 1 + tests/expected/sfdisk/script-quotes | 2 ++ tests/expected/sfdisk/script-separator | 2 ++ tests/expected/sfdisk/script-type-and-id | 2 ++ tests/expected/sfdisk/wipe-fs-to-dos | 1 + tests/expected/sfdisk/wipe-gpt-to-dos | 2 ++ tests/expected/sfdisk/wipe-gpt-to-dos-auto | 2 ++ tests/expected/sfdisk/wipe-partition | 2 ++ 66 files changed, 75 insertions(+) commit 6ec47609675814916630c8a9ddaebee8c31f128d Author: Karel Zak Date: Thu Aug 30 14:01:54 2018 +0200 fdisk: add "Disk model:" to the print output Addresses: https://github.com/karelzak/util-linux/issues/682 Signed-off-by: Karel Zak disk-utils/fdisk-list.c | 3 +++ 1 file changed, 3 insertions(+) commit 745801e44ab01eef759b99372e5792d0eadf19ab Author: Karel Zak Date: Thu Aug 30 14:01:46 2018 +0200 libfdisk: add fdisk_get_devmodel() and fdisk_get_devno() Signed-off-by: Karel Zak libfdisk/docs/libfdisk-sections.txt | 2 ++ libfdisk/src/context.c | 50 +++++++++++++++++++++++++++++++++++++ libfdisk/src/fdiskP.h | 2 ++ libfdisk/src/libfdisk.h.in | 5 ++++ libfdisk/src/libfdisk.sym | 2 ++ 5 files changed, 61 insertions(+) commit cf96b08efaa28d2780714d51f5dc80f1e4f53659 Author: Karel Zak Date: Fri Aug 24 12:04:24 2018 +0200 docs: add note about lsblk usage/free cols Signed-off-by: Karel Zak Documentation/TODO | 4 ++++ 1 file changed, 4 insertions(+) commit 6d0df9ceb43e6664ae0cb7f3632b22b82fa78b09 Author: Karel Zak Date: Fri Aug 24 11:28:43 2018 +0200 docs: cleanup TODO Signed-off-by: Karel Zak Documentation/TODO | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) commit 82bbc77bfcd884239f7ed37059fe444e7bc299f8 Author: Karel Zak Date: Thu Aug 23 14:14:29 2018 +0200 bash-completion: update column Signed-off-by: Karel Zak bash-completion/column | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) commit 11159cca217a9a1a950f3f531b8e305f708135ad Author: Karel Zak Date: Thu Aug 23 13:41:05 2018 +0200 tests: add column --table-empty-lines test Signed-off-by: Karel Zak tests/expected/column/table-empty-lines | 6 ++++++ tests/expected/column/table-noempty-lines | 4 ++++ tests/ts/column/files/table-empty-lines | 6 ++++++ tests/ts/column/table | 8 ++++++++ 4 files changed, 24 insertions(+) commit 2698f9ba887cb7e4a204ada72016b1c1192b17c1 Author: Karel Zak Date: Thu Aug 23 13:31:29 2018 +0200 column: add --table-empty-lines The option allows to add empty line to the table. The default behavior is to ignore empty lines at all. echo -e "A\nAA\nAAA\n\nAAAA" | ./column --table A AA AAA AAAA $ echo -e "A\nAA\nAAA\n\nAAAA" | ./column --table --table-empty-lines A AA AAA AAAA Addresses: https://github.com/karelzak/util-linux/issues/593 Signed-off-by: Karel Zak Documentation/TODO | 5 ----- text-utils/column.1 | 3 +++ text-utils/column.c | 24 ++++++++++++++++++++++-- 3 files changed, 25 insertions(+), 7 deletions(-) commit 369be41bcd1240684d21535873910739fa74e298 Author: Karel Zak Date: Thu Aug 23 10:13:17 2018 +0200 libsmartcols: don't mark as extreme where average is zero The columns with NOEXTREME flag are internally marked as extreme (=contains extreme width) if maximal with is greater than 2 * average_width. This detection has to sure that the average is non-zero otherwise the column is always "extreme". Signed-off-by: Karel Zak libsmartcols/src/column.c | 1 + libsmartcols/src/table_print.c | 16 ++++++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) commit c434b2782c20f3d8756bf3944012badc63128062 Author: Karel Zak Date: Thu Aug 23 10:02:49 2018 +0200 libsmartcols: allow to add line to table without columns The table allows to add columns on the fly when lines already exist. So, it does not make sense to reject request to add line to table without columns. Signed-off-by: Karel Zak libsmartcols/src/table.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 89f95425746e0371c033260c2bc0ef176eba6a37 Author: Karel Zak Date: Wed Aug 22 11:43:32 2018 +0200 setpriv: add --reset-env Clear environment in way like su(1), but PATH is set to hard-coded defaults and /etc/login.defs is not used at all (I guess we want to keep setpriv(1) simple). If you need anything more advanced than use env(1). Addresses: https://github.com/karelzak/util-linux/issues/325 Signed-off-by: Karel Zak sys-utils/setpriv.1 | 9 +++++++++ sys-utils/setpriv.c | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 63 insertions(+), 1 deletion(-) commit 64d11d6bb054f7d77539b9f18875ab87e98c8452 Author: Karel Zak Date: Wed Aug 22 11:39:13 2018 +0200 su: add note about merged /usr Signed-off-by: Karel Zak login-utils/runuser.1 | 3 +++ login-utils/su.1 | 3 +++ 2 files changed, 6 insertions(+) commit 99179a0a08ac97351db112e587b67b524b9eb12a Author: Karel Zak Date: Wed Aug 22 10:35:51 2018 +0200 setpriv: add user/group names to usage() Signed-off-by: Karel Zak sys-utils/setpriv.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 85c15c1f6104822280441025f654ef6c491d45bf Author: Karel Zak Date: Wed Aug 22 10:29:09 2018 +0200 setpriv: allow to use group name for --groups Addresses: https://github.com/karelzak/util-linux/issues/325 Signed-off-by: Karel Zak sys-utils/setpriv.1 | 2 +- sys-utils/setpriv.c | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) commit a8224e8e7e412470e2fe37d5060224ed98bf8284 Author: Karel Zak Date: Thu Aug 16 16:16:40 2018 +0200 sulogin: restore signals after failed exec() only * removes unnecessary variable * the current code restores signals always when shell has not been executed -- this is correct as function sushell() modify signal mask, but in all another cases we do not need touch the mask. Especially when we ask for the password in endless while() loop... Signed-off-by: Karel Zak login-utils/sulogin.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit f9915d6db350d7633aecb1ed2ba764ce4fda6fd6 Author: Karel Zak Date: Thu Aug 16 15:58:20 2018 +0200 sulogin: do not use plain 0 as NULL Signed-off-by: Karel Zak login-utils/sulogin.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 2c37ca7c4b766d08ed604eac17fea42e86916c2d Author: Karel Zak Date: Thu Aug 16 15:43:53 2018 +0200 libmount: cleanup licenses sections in the files * add SPDX-License-Identifier (see https://spdx.org/licenses/) * add "This file part of libmount from util-linux project." * use proper text for LGPL-2.1-or-later * use the same texts everywhere Signed-off-by: Karel Zak libmount/mount.pc.in | 11 +++++++++++ libmount/src/btrfs.c | 11 ++++++++--- libmount/src/cache.c | 13 +++++++++---- libmount/src/context.c | 11 ++++++++--- libmount/src/context_loopdev.c | 11 ++++++++--- libmount/src/context_mount.c | 11 ++++++++--- libmount/src/context_umount.c | 11 ++++++++--- libmount/src/fs.c | 11 ++++++++--- libmount/src/init.c | 11 ++++++++--- libmount/src/iter.c | 11 ++++++++--- libmount/src/libmount.h.in | 7 +++++-- libmount/src/libmount.sym | 14 ++++++++++++-- libmount/src/lock.c | 11 ++++++++--- libmount/src/monitor.c | 11 ++++++++--- libmount/src/mountP.h | 12 ++++++++---- libmount/src/optmap.c | 11 ++++++++--- libmount/src/optstr.c | 11 ++++++++--- libmount/src/tab.c | 12 +++++++++--- libmount/src/tab_diff.c | 11 ++++++++--- libmount/src/tab_parse.c | 12 ++++++++---- libmount/src/tab_update.c | 11 ++++++++--- libmount/src/test.c | 12 +++++++++--- libmount/src/utils.c | 11 ++++++++--- libmount/src/version.c | 11 +++++++---- 24 files changed, 198 insertions(+), 71 deletions(-) commit 4189907e6cd9a973c3d6ee9e90f92ed7fd7429bb Author: Karel Zak Date: Thu Aug 16 14:47:21 2018 +0200 docs: use SPDX license names Let's use standardized names for licenses. The names used by SPDX makes things more obvious at first glance. For complete list see: https://spdx.org/licenses/ Note, this commit does not change any license or so... Signed-off-by: Karel Zak .../licenses/{COPYING.BSD-3 => COPYING.BSD-3-Clause} | 0 .../licenses/{COPYING.UCB => COPYING.BSD-4-Clause-UC} | 0 .../licenses/{COPYING.GPLv2 => COPYING.GPL-2.0-or-later} | 0 .../{COPYING.LGPLv2.1 => COPYING.LGPL-2.1-or-later} | 0 README.licensing | 14 ++++++++------ libblkid/COPYING | 2 +- libfdisk/COPYING | 2 +- libmount/COPYING | 2 +- libsmartcols/COPYING | 2 +- libuuid/COPYING | 2 +- 10 files changed, 13 insertions(+), 11 deletions(-) commit 26b6525a51af3eb41db5c4a38ff5fb3398ea4f3e Author: Karel Zak Date: Thu Aug 16 14:00:45 2018 +0200 fstrim: use -n shortcut for --dry-run It seems 'n' is more common than 'd'. The patch also cleanup getopt_long() options string. Addresses: https://github.com/karelzak/util-linux/commit/fda0e2cf043994c77c29a2d109c03ce8957b1d38#commitcomment-30097920 Signed-off-by: Karel Zak sys-utils/fstrim.8 | 2 +- sys-utils/fstrim.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) commit 1b0a420281aec87c05966676c7c92617dc987aed Merge: 456bda924 b9c3b903f Author: Karel Zak Date: Thu Aug 16 13:47:51 2018 +0200 Merge branch 'spelling' of https://github.com/jwilk-forks/util-linux * 'spelling' of https://github.com/jwilk-forks/util-linux: Fix man page typos commit b9c3b903fe4a704974755b4b3ac3ac75dc8bf0e7 Author: Jakub Wilk Date: Thu Aug 16 11:08:42 2018 +0200 Fix man page typos Signed-off-by: Jakub Wilk disk-utils/mkfs.minix.8 | 2 +- disk-utils/sfdisk.8 | 2 +- libuuid/man/uuid_generate.3 | 2 +- libuuid/man/uuid_unparse.3 | 2 +- login-utils/su.1 | 2 +- misc-utils/uuidparse.1 | 2 +- sys-utils/choom.1 | 2 +- sys-utils/mount.8 | 6 +++--- sys-utils/readprofile.8 | 4 ++-- sys-utils/setarch.8 | 2 +- sys-utils/swapon.8 | 2 +- sys-utils/umount.8 | 2 +- text-utils/column.1 | 2 +- 13 files changed, 16 insertions(+), 16 deletions(-) commit 456bda924fb9543c7c8f865559ddd46013c5cbc8 Author: Jakub Wilk Date: Thu Aug 16 10:34:56 2018 +0200 fincore.1: add missing space Signed-off-by: Jakub Wilk misc-utils/fincore.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 75efef98d4ca2281bd4f8d1a1ddf8805bb024984 Author: Karel Zak Date: Fri Aug 10 10:49:15 2018 +0200 su: add --whitelist-environment * usable with --login to whitelist specified environment variables * the list is ignored for the core variables like HOME, SHELL, USER, LOGNAME and PATH (su --login always resets these variables) Note that su(1) requires password and after successful authentication user has full control over the session, so he can set arbitrary environment variables. The whitelist makes things more user friendly only. The patch removes unnecessary optimization when allocate environ[]. It seems better to keep all in glibc hands and just reset the environment array only. Addresses: https://github.com/karelzak/util-linux/issues/221 Signed-off-by: Karel Zak configure.ac | 1 + login-utils/runuser.1 | 10 +++++ login-utils/su-common.c | 116 +++++++++++++++++++++++++++++++++++++++++------- login-utils/su.1 | 10 +++++ 4 files changed, 121 insertions(+), 16 deletions(-) commit df5ccf25895699725e91059d725287b5544c8b05 Author: Karel Zak Date: Wed Aug 15 11:47:17 2018 +0200 build-sys: fix typo in man install Signed-off-by: Karel Zak sys-utils/Makemodule.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 51d5109782746608659d023f685205a1af60db42 Author: Karel Zak Date: Tue Aug 14 21:03:42 2018 +0200 libmount: report context paths on debug Signed-off-by: Karel Zak libmount/src/context.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit b939b6465f5f4fc6a83bd4dcaa5edc5bb12eacf4 Author: Karel Zak Date: Tue Aug 14 14:53:14 2018 +0200 docs: add adjtime_config(5) man page The file is pretty common, but undocumented by individual man page. Signed-off-by: Karel Zak sys-utils/Makemodule.am | 4 ++- sys-utils/adjtime_config.5 | 64 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+), 1 deletion(-) commit e6601a70ec4a56e99cb7361bb5d3a9c00072f9d8 Author: Mark Sheppard Date: Mon Aug 13 16:45:01 2018 +0100 lscpu: fixed part ID for ARM Cortex-M7 sys-utils/lscpu-arm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ba1e20349753efb4a6d255f4fe2f6ebdda590ed9 Author: Karel Zak Date: Mon Aug 13 14:16:28 2018 +0200 lslogins: return 1 on "lslogins nonexisting" The default behavior for -l and -g is to silently ignore unknown login names, but this is very confusing when you explicitly specify just one login name. Note that the current implementation also prints empty "Last log" for nonexisting user. It seems ugly. # lslogins nonexisting Last logs: new version: # lslogins nonexisting lt-lslogins: cannot found 'nonexisting' # echo $? 1 The -l and -g behaviour has not been changed. Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1614967 Signed-off-by: Karel Zak login-utils/lslogins.1 | 3 ++- login-utils/lslogins.c | 16 +++++++++++++--- 2 files changed, 15 insertions(+), 4 deletions(-) commit 09a4313ceb17c946a348d863b635970608cc75f2 Author: Karel Zak Date: Mon Aug 13 13:49:26 2018 +0200 lslogins: add info about single-user output mode The supported command line synopsis is also lslogins foo and it provides different output than lslogins -l foo Signed-off-by: Karel Zak login-utils/lslogins.1 | 11 ++++++++++- login-utils/lslogins.c | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) commit 1f6583930b1061c5e79e09a9f2e80caaf9eeb405 Author: Karel Zak Date: Fri Aug 10 16:55:14 2018 +0200 logger: add -S to the man page Reported-by: Radka Skvarilova Signed-off-by: Karel Zak misc-utils/logger.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d901e4275f7c1899518bab3b34424c90af8dc35e Author: Karel Zak Date: Fri Aug 10 16:27:41 2018 +0200 mount: add ext4 to some places to the man page sys-utils/mount.8 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 784e9d9e2e7d7ce9a1e9844f3d554307c727cb9f Author: Karel Zak Date: Wed Aug 8 13:12:27 2018 +0200 losetup: add reference to suffixes for --{sizelimit,offset} Reported-by: Milan Broz Signed-off-by: Karel Zak sys-utils/losetup.8 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 0d73ea8bf96b036cc12fae6865158c936705238d Author: Karel Zak Date: Wed Aug 8 11:35:58 2018 +0200 fstrim: update .service to follow /etc/fstab Replace -a with -A to discard mounted filesystems from /etc/fstab. The original -a forces fstrim to try to discard all filesystems, including for example manually mounted removable media. It seems better for widely used .service unit to follow /etc/fstab. Addresses: https://github.com/karelzak/util-linux/issues/673 Signed-off-by: Karel Zak sys-utils/fstrim.service.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 05541825553524e2ac353eb6c62c8b5ad049de24 Author: Karel Zak Date: Tue Aug 7 11:31:14 2018 +0200 setarch: make optional Let's allow to change personality flags without execution domain modification. Old way: setarch `arch` --addr-no-randomize myprog New way: setarch --addr-no-randomize myprog Addresses: https://github.com/karelzak/util-linux/issues/668 Signed-off-by: Karel Zak sys-utils/setarch.8 | 27 +++++++++++++++++++++------ sys-utils/setarch.c | 27 ++++++++++++++++++--------- 2 files changed, 39 insertions(+), 15 deletions(-) commit f2538b6a86579008870494906bcd75acd2d44a65 Author: Karel Zak Date: Tue Aug 7 11:06:13 2018 +0200 tests: add cal --span tests Addresses: https://github.com/karelzak/util-linux/issues/677 Signed-off-by: Karel Zak tests/expected/cal/month-Sn201 | 537 +++++++++++++++++++++++++++++++++++++++++ tests/expected/cal/month-Sn21 | 57 +++++ tests/expected/cal/month-Sn3 | 9 + tests/expected/cal/month-Sn51 | 137 +++++++++++ tests/ts/cal/month | 7 +- 5 files changed, 746 insertions(+), 1 deletion(-) commit 549281cb87ff2122c1d94b91bfde36a571dd0315 Author: Karel Zak Date: Tue Aug 7 10:59:06 2018 +0200 tests: check for test_cal Signed-off-by: Karel Zak tests/ts/cal/bigyear | 2 +- tests/ts/cal/month | 2 +- tests/ts/cal/sep1752 | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 2395f93c8ca0ba6ff04c0099d5d428c50f66d643 Author: Karel Zak Date: Tue Aug 7 10:52:33 2018 +0200 cal: fix --span for large numbers of months The need to calculate with whole years when go back for --span. Addresses: https://github.com/karelzak/util-linux/issues/677 Signed-off-by: Karel Zak misc-utils/cal.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 100a140688b54ebdd7e9e5328679e41bdf4141bc Author: Karel Zak Date: Tue Aug 7 10:15:42 2018 +0200 cal: use snprintf everywhere Signed-off-by: Karel Zak misc-utils/cal.c | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) commit 1db8bf93786b1e8df4970981b1144ec42f00c41e Author: Karel Zak Date: Mon Aug 6 16:32:36 2018 +0200 setarch: split set_arch() function to small functions It seems better to keep the code more flexibile by small one-purpose functions than by one huge monster. Signed-off-by: Karel Zak sys-utils/setarch.c | 108 +++++++++++++++++++++++++++++++++++----------------- 1 file changed, 73 insertions(+), 35 deletions(-) commit 41f22ff389aecc477ca3a3f7d6482f1b00d09b33 Author: Bjarni Ingi Gislason Date: Mon Aug 6 00:51:13 2018 +0000 agetty.8: Avoid a warning about an unbreakable line Make the indent depend on the formatting command, nroff or troff. Signed-off-by: Bjarni Ingi Gislason term-utils/agetty.8 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 559ee54af112379e92a651b2e1f495a634b6360d Author: Bjarni Ingi Gislason Date: Sun Aug 5 22:05:48 2018 +0000 man pages: Fix misuse of two-fonts-macros (BR, IR) Change a two-fonts-macro to the single font one, when there is only one genuine argument. Split a punctuation mark from the only argument to a two-fonts-marco. Remove an isolated two-fonts-macro. Signed-off-by: Bjarni Ingi Gislason sys-utils/hwclock.8.in | 4 ++-- sys-utils/lscpu.1 | 1 - sys-utils/mount.8 | 6 +++--- sys-utils/rtcwake.8.in | 2 +- sys-utils/umount.8 | 5 ++--- 5 files changed, 8 insertions(+), 10 deletions(-) commit 62aa3f0eaf01b3a7db57644a3974d788abd84488 Author: Bjarni Ingi Gislason Date: Sun Aug 5 18:51:25 2018 +0000 man pages: fix formatting of long lines in tables Define the allowed length of the last (second) column to use the whole line for text. Use text blocks for long lines. Signed-off-by: Bjarni Ingi Gislason misc-utils/logger.1 | 7 +++++-- misc-utils/uuidparse.1 | 19 ++++++++++++++----- 2 files changed, 19 insertions(+), 7 deletions(-) commit 934a6fa80b63eb013e846dc3c6aa43ebbcf0ea06 Author: Bjarni Ingi Gislason Date: Fri Aug 3 21:12:04 2018 +0000 man pages: Remove "left" (or change to "l") in the column formats of tables A developmental version of "groff" issued a warning, for example with "test-groff -b -e -mandoc -T utf8 -rF0 -t -w w -z": troff: :299: warning: can't find font 't' Signed-off-by: Bjarni Ingi Gislason disk-utils/fsck.minix.8 | 2 +- login-utils/last.1 | 2 +- misc-utils/logger.1 | 4 ++-- misc-utils/uuidparse.1 | 4 ++-- sys-utils/blkzone.8 | 4 ++-- sys-utils/rtcwake.8.in | 2 +- text-utils/hexdump.1 | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) commit 0dc75983232f3b5fb548648e47b3517655dec43c Author: Karel Zak Date: Fri Aug 3 14:08:00 2018 +0200 su: add note about SIGKILL to the man page Addresses: https://github.com/karelzak/util-linux/issues/443 Signed-off-by: Karel Zak login-utils/su.1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 01041a9d1d6d5e2a7cfc26d496a3a0444ad36738 Merge: 0dcb713f2 924888cb9 Author: Karel Zak Date: Fri Aug 3 13:19:51 2018 +0200 Merge branch 'patch-1' of https://github.com/pmarillo/util-linux * 'patch-1' of https://github.com/pmarillo/util-linux: Fix translation typo commit 0dcb713f2e2fe34756bab3c28e4d4ddec47afe1f Author: Karel Zak Date: Fri Aug 3 13:08:21 2018 +0200 hwclock: rely on kernel for RTC_UIE_ON on Aplha and Sparc It's kernel business to return EINVAL for unsupported RTC_UIE_ON. We (userspace) should not make decisions about things that we do not control. If kernel is wrong then fix the kernel, don't hide the problem by crazy ifdefs in userspace. Signed-off-by: Karel Zak sys-utils/hwclock-rtc.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) commit 8dd5832395c6a0b12e11b37c062e4c11be3c82ef Author: Sami Kerola Date: Thu Aug 2 19:35:51 2018 +0100 mesg: do not print 'ttyname failed' message unless --verbose requested Lots of people are confused why mesg(1) is priting this message. Usual cause seems to be an uninteractive shell trying to turn running 'mesg n' from a /root/.profile where command invocation is by default on debian based systems. This might be rare case when failing silently is better. [kzak@redhat.com: - add note to the man page - fix if(isatty()) logic] Reference: https://www.google.com/search?q=mesg+ttyname+failed Review: https://marc.info/?l=util-linux-ng&m=153319988631233&w=2 Signed-off-by: Sami Kerola Signed-off-by: Karel Zak term-utils/mesg.1 | 9 +++++++++ term-utils/mesg.c | 5 +++++ 2 files changed, 14 insertions(+) commit 924888cb907e2de179ade47616b3f38c09988716 Author: Paul M Date: Fri Aug 3 09:58:54 2018 +0200 Fix translation typo po/fr.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c6789d37eaf45124275b8434829a313d7d16c118 Author: Karel Zak Date: Wed Aug 1 12:09:09 2018 +0200 tests: update lscpu tests Signed-off-by: Karel Zak tests/expected/lscpu/lscpu-vbox-win | 1 + tests/expected/lscpu/lscpu-x86_64-64cpu | 1 + tests/expected/lscpu/lscpu-x86_64-dell_e4310 | 1 + 3 files changed, 3 insertions(+) commit dbcd1a4964a6b23bbf2566fac76175179cb662d5 Author: Karel Zak Date: Wed Aug 1 09:29:12 2018 +0200 fdisk: fix error message on 'd' command Command (m for help): d No partition is defined yet! Could not delete partition 93840461057817 <--- ! Don't print 'Could not delete..' if no partition is defined yet. Addresses: https://github.com/karelzak/util-linux/issues/667 Signed-off-by: Karel Zak disk-utils/fdisk-menu.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit d5fd9ac6b208c5acdb6c0023757a7e2827474482 Author: Karel Zak Date: Wed Aug 1 09:10:07 2018 +0200 umount: add --quiet option The command umount supports things like --all-targets and --recursive to umount all nodes in specified tree. Sometimes it makes sense to aggressively use wildcards like /dev/sdb* and in this case --quiet seems like a good choice umount --quiet --all-targets /dev/sdb* to suppress 'not mounted' error messages. The new option suppress only these error messages and nothing else. Addresses: https://github.com/karelzak/util-linux/issues/672 Signed-off-by: Karel Zak sys-utils/umount.8 | 3 +++ sys-utils/umount.c | 24 +++++++++++++++++++++--- 2 files changed, 24 insertions(+), 3 deletions(-) commit 3e48ef72c1db91248ed597bea9a654738ad1d5e4 Author: Karel Zak Date: Wed Aug 1 08:33:32 2018 +0200 lscpu: add 'Address sizes' Addresses: https://github.com/karelzak/util-linux/issues/674 Signed-off-by: Karel Zak sys-utils/lscpu.c | 5 +++++ sys-utils/lscpu.h | 1 + 2 files changed, 6 insertions(+) commit c5b8909f13d29d066ee9882fe0e3129d2f3bcffc Author: Karel Zak Date: Tue Jul 31 16:38:59 2018 +0200 fstrim: add -A|--fstab to trim according to /etc/fstab Addresses: https://github.com/karelzak/util-linux/issues/673 Signed-off-by: Karel Zak sys-utils/fstrim.8 | 10 ++++++++- sys-utils/fstrim.c | 63 +++++++++++++++++++++++++++++++++++++++++++----------- 2 files changed, 59 insertions(+), 14 deletions(-) commit 72213916c3edb0ee253ce5c2b9cfd98fecc30ce7 Author: Karel Zak Date: Tue Jul 31 15:58:49 2018 +0200 fstrim: add control struct Signed-off-by: Karel Zak sys-utils/fstrim.c | 43 ++++++++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 19 deletions(-) commit d68588b0c68ae26417c487fb6cdcaf2871107666 Author: Karel Zak Date: Tue Jul 31 15:20:55 2018 +0200 tests: update fdisk dialogs Signed-off-by: Karel Zak tests/expected/blkid/md-raid0-whole | 4 ++-- tests/expected/blkid/md-raid1-part | 4 ++-- tests/expected/blkid/md-raid1-whole | 4 ++-- tests/expected/fdisk/align-512-4K | 14 +++++++------- tests/expected/fdisk/align-512-4K-63 | 14 +++++++------- tests/expected/fdisk/align-512-4K-md | 8 ++++---- tests/expected/fdisk/align-512-512 | 14 +++++++------- tests/expected/fdisk/align-512-512-topology | 14 +++++++------- tests/expected/fdisk/gpt-resize | 2 +- tests/expected/fdisk/sunlabel | 2 +- 10 files changed, 40 insertions(+), 40 deletions(-) commit 757cefbb61dd22254ae8441f7caed39be7c59483 Author: Awal Garg Date: Sat Jul 28 18:50:35 2018 +0530 libfdisk: Accept negative numbers for last sector input [kzak@redhat.com: - add note to the man page - add '-' to the dialog query - cleanup functions names and libfdisk.sym] Signed-off-by: Karel Zak Documentation/TODO | 6 ------ disk-utils/fdisk.8 | 17 ++++++++++------- disk-utils/fdisk.c | 2 ++ libfdisk/src/ask.c | 25 +++++++++++++++++++++++++ libfdisk/src/bsd.c | 5 +++-- libfdisk/src/dos.c | 5 +++-- libfdisk/src/fdiskP.h | 4 +++- libfdisk/src/gpt.c | 3 ++- libfdisk/src/libfdisk.h.in | 1 + libfdisk/src/libfdisk.sym | 4 ++++ libfdisk/src/sgi.c | 1 + libfdisk/src/sun.c | 4 +++- 12 files changed, 57 insertions(+), 20 deletions(-) commit 6df5c6d4e0461ac0b7a4f274ae6ee16b72e951f9 Author: Karel Zak Date: Tue Jul 31 11:07:47 2018 +0200 hwclock: remove ntpd from man page It seems better to use generic "NTP daemon" in the man page than points to specific ntpd(1) implementation as some distros use for example chronyd(1) rather than old ntpd(1). Signed-off-by: Karel Zak sys-utils/hwclock.8.in | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit d29b7ced3b263ac9eda8a37703be0153ad67e882 Author: Karel Zak Date: Wed Jul 25 12:02:28 2018 +0200 lscpu: fix resource leak [coverity scan] Signed-off-by: Karel Zak sys-utils/lscpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9c6af25c31540f8310bb6f4e6dbb5621b89053a3 Author: Karel Zak Date: Wed Jul 25 11:56:44 2018 +0200 losetup: fix mem leak, improve code [coverity scan] Signed-off-by: Karel Zak sys-utils/losetup.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit f665f6e43c11d4c85c2c01d7bd5a571c082e47a4 Author: Karel Zak Date: Wed Jul 25 11:25:33 2018 +0200 libblkid: use xstrncpy() for PT id [coverity scan] It's probably unnecessary change as blkid_parttable_set_id() is used by MBR code and we use proper buffer size there, but better safe than sorry. Signed-off-by: Karel Zak libblkid/src/partitions/partitions.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e236f61d7cb030c624408a1e28da56bc5a247a42 Author: Karel Zak Date: Tue Jul 24 12:35:45 2018 +0200 docs: add note about --disable-all-programs Addresses: https://github.com/karelzak/util-linux/issues/666 Signed-off-by: Karel Zak Documentation/howto-compilation.txt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit f2cfb2351ae7c292bf4604322a7d0a7c1d0da043 Author: Karel Zak Date: Mon Jul 23 13:08:56 2018 +0200 cfdisk: fix compiler warnings [-Wcast-qual] Signed-off-by: Karel Zak disk-utils/cfdisk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e736434bc85a14d68cd8ba26c640651794b495d1 Author: Karel Zak Date: Mon Jul 23 12:30:30 2018 +0200 blkid: fix compiler warnings [-Wcast-qual] Signed-off-by: Karel Zak misc-utils/blkid.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 088d487612091c121bf0d4c3981186993517f95c Author: Karel Zak Date: Mon Jul 23 12:21:33 2018 +0200 login: use const qualifier for username from PAM or struct passwd [-Wcast-qual] It seems more robust to use 'const' qualifier for username if this variable points to external resources like PAM or struct passwd. The patch introduces new variable cmd_username for username specified on login(1) command line. Signed-off-by: Karel Zak login-utils/login.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit 9c566fce79124813aee606754a64426071792f1c Author: Karel Zak Date: Mon Jul 23 11:58:57 2018 +0200 libmount: (utils) fix compiler warnings [-Wcast-qual] Signed-off-by: Karel Zak libmount/src/utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 892fc7d9deff6fa4849d8f79cafb3ebd55c1335e Author: Karel Zak Date: Mon Jul 23 11:55:25 2018 +0200 lib/colors:: fix compiler warnings [-Wcast-qual] Signed-off-by: Karel Zak lib/colors.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0f9b25958ee2ba520105ea8c4a144b02a3f53100 Author: Karel Zak Date: Mon Jul 23 11:49:49 2018 +0200 setterm: fix compiler warnings [-Wcast-qual] Signed-off-by: Karel Zak login-utils/lslogins.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit df3bc05a7f39e66ee596bbd4e4641598e65105bf Author: Karel Zak Date: Mon Jul 23 11:45:15 2018 +0200 setterm: fix compiler warnings [-Wcast-qual] Signed-off-by: Karel Zak term-utils/setterm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 58bc493243548a546291fe23720e9961472e3681 Author: Karel Zak Date: Mon Jul 23 11:43:47 2018 +0200 swapon: fix compiler warnings [-Wcast-qual] Signed-off-by: Karel Zak sys-utils/swapon.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f11157e80412da35017fda9cc16984f47b94f542 Author: Karel Zak Date: Mon Jul 23 11:43:30 2018 +0200 mkswap: fix compiler warnings [-Wcast-qual] Signed-off-by: Karel Zak disk-utils/mkswap.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit ec4b88b83da25d44bcfa4f4de72cb1b0642ccf6d Author: Karel Zak Date: Mon Jul 23 11:39:13 2018 +0200 libfdisk: fix compiler warnings [-Wcast-qual] Signed-off-by: Karel Zak libfdisk/src/dos.c | 4 ++-- libfdisk/src/gpt.c | 4 ++-- libfdisk/src/sgi.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) commit b00dd55ac8303a781f870a153a403f74b10af823 Author: Karel Zak Date: Mon Jul 23 11:33:05 2018 +0200 libmount: fix compiler warning [-Wcast-qual] Signed-off-by: Karel Zak libmount/src/fs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0145c00a12a32cdccb9b100da8a900335109c86b Author: Karel Zak Date: Mon Jul 23 11:17:28 2018 +0200 lib/loopdev: fix compiler warning [-Wcast-qual] Signed-off-by: Karel Zak lib/loopdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 78c66fc61dc42f36c4c49bad811083cabc666583 Author: Karel Zak Date: Fri Jul 20 15:31:42 2018 +0200 lib/mangle: const quialifier cleanup Signed-off-by: Karel Zak include/mangle.h | 2 +- lib/mangle.c | 8 ++++---- libmount/src/tab_parse.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) commit eb06d5d4b2f54a98b5779c11c3813832d6f98db2 Author: Karel Zak Date: Fri Jul 20 15:22:35 2018 +0200 include/list, include/c: update and container_of() * update container_of() to version without "const" qualifier * use container_of() in list_entry() Signed-off-by: Karel Zak include/c.h | 12 +++++++++--- include/list.h | 7 +++---- 2 files changed, 12 insertions(+), 7 deletions(-) commit 47afae0caaa2b3440d6ac812079e3ada5f2aa0bd Author: Karel Zak Date: Fri Jul 20 15:03:01 2018 +0200 libblkid: const qualifier cleanup * use "const" in functions where we don't modify arguments * use "const" when cast from const buffer to any struct (superblock etc.) Signed-off-by: Karel Zak include/pt-sun.h | 4 ++-- libblkid/src/blkidP.h | 6 +++--- libblkid/src/partitions/partitions.c | 12 ++++++------ libblkid/src/probe.c | 6 +++--- libblkid/src/superblocks/bitlocker.c | 14 +++++++------- libblkid/src/superblocks/minix.c | 8 ++++---- libblkid/src/superblocks/stratis.c | 4 ++-- libblkid/src/superblocks/superblocks.c | 25 +++++++++++++------------ libblkid/src/superblocks/superblocks.h | 16 ++++++++-------- libblkid/src/superblocks/vfat.c | 4 ++-- libblkid/src/superblocks/zfs.c | 4 ++-- libblkid/src/topology/dm.c | 9 +++++---- 12 files changed, 57 insertions(+), 55 deletions(-) commit 34708190d1c50579c7b241406f2ccec7552c7b6f Author: Karel Zak Date: Fri Jul 20 14:53:25 2018 +0200 include/all-io: const cleanup Signed-off-by: Karel Zak include/all-io.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ea927bde6bc1b1bebb04081b516a46e18b95fc41 Author: Karel Zak Date: Fri Jul 20 14:15:42 2018 +0200 libmount: cleanup const in umount code Signed-off-by: Karel Zak libmount/src/context_umount.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit c8b237a0ed0a1ea58c0237ded2611a0569d03e29 Author: Karel Zak Date: Fri Jul 20 13:58:10 2018 +0200 lib/color-names: const cleanup Signed-off-by: Karel Zak lib/color-names.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit a679b0823fd6268d0b3e0412845281259b1e83d4 Author: Karel Zak Date: Fri Jul 20 13:51:52 2018 +0200 libmount: add missing const Signed-off-by: Karel Zak libmount/src/tab_parse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0d1e744c20aab14e7fbe3efcb41e43aaf2ab4db4 Author: Karel Zak Date: Fri Jul 20 13:44:53 2018 +0200 libmount: use const char in swaps parser The parser does not modify the string, so let's keep it "const char". Signed-off-by: Karel Zak libmount/src/tab_parse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4e4c9629e6db39c0b04907112f40c6b32a30bdf0 Author: Karel Zak Date: Fri Jul 20 13:44:53 2018 +0200 libmount: use const char in mountinfo parser The parser does not modify the string, so let's keep it "const char". Signed-off-by: Karel Zak libmount/src/tab_parse.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 4ccc64c4ca593475e7b5b1aaec8678146c0dbde5 Author: Karel Zak Date: Fri Jul 20 13:44:53 2018 +0200 libmount: use const char in fstab parser The parser does not modify the string, so let's keep it "const char". Signed-off-by: Karel Zak libmount/src/tab_parse.c | 46 +++++++++++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 19 deletions(-) commit d54b83156f8c4c18367130c054a688f5424bfef6 Author: Karel Zak Date: Fri Jul 20 12:52:55 2018 +0200 lib/strutils: follow const in parse_size() * don't cast from char to const char * don't share endptr from strtoxxx() with rest of the code as the end pointer is char, but code works with const chars Signed-off-by: Karel Zak lib/strutils.c | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) commit 8a7aeeda6777e3547ec060ac486a276152f069ee Author: Karel Zak Date: Fri Jul 20 12:52:09 2018 +0200 include/strutils: remove unnecessary cast Signed-off-by: Karel Zak include/strutils.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9854912fefd8205cf6e7d94151e09ce0ce917735 Author: Karel Zak Date: Fri Jul 20 12:25:38 2018 +0200 hwclock: fix warning Signed-off-by: Karel Zak sys-utils/hwclock-cmos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 17666c8760df26386b8b9b0717ecb0987de648b8 Author: Karel Zak Date: Fri Jul 20 12:15:31 2018 +0200 build-sys: add -Wdiscarded-qualifiers Signed-off-by: Karel Zak configure.ac | 1 + 1 file changed, 1 insertion(+) commit b6cc121043854e1048d020bc1d73d932df89eb4b Author: Karel Zak Date: Thu Jul 19 11:41:31 2018 +0200 mount: add details about mtab and --namespace to mount.8 Signed-off-by: Karel Zak sys-utils/mount.8 | 29 +++++++++++++++++++++++------ sys-utils/umount.8 | 9 +++++++++ 2 files changed, 32 insertions(+), 6 deletions(-) commit fae83289280c74bc97a43f1dacacc025ad9183e1 Author: Karel Zak Date: Thu Jul 19 11:38:48 2018 +0200 libmount: add since tag for new functions Signed-off-by: Karel Zak libmount/src/context.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 881953d735cea32f20d1b26e4b3984eb41a29ae7 Author: Karel Zak Date: Wed Jul 18 16:21:01 2018 +0200 lsblk: add note about --list -I Signed-off-by: Karel Zak misc-utils/lsblk.8 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit df4f1a664700626f0b949a0cae87a3a735be46db Author: Karel Zak Date: Wed Jul 18 13:59:15 2018 +0200 hwclock: add --delay * add command line option --delay * read RTC type from /sys/class/rtc/rtc/name * default to 0.5 (500ms) for rtc_cmos or when RTC type is impossible determine; otherwise delay is 0. Signed-off-by: Karel Zak Documentation/TODO | 2 -- sys-utils/hwclock-cmos.c | 6 ++++ sys-utils/hwclock-rtc.c | 6 ++++ sys-utils/hwclock.8.in | 18 ++++++++++++ sys-utils/hwclock.c | 76 ++++++++++++++++++++++++++++++++++++++++++++---- sys-utils/hwclock.h | 2 ++ 6 files changed, 102 insertions(+), 8 deletions(-) commit 4f9d999a97d96f3f2a561d56160743c04e551906 Author: Karel Zak Date: Wed Jul 18 10:23:51 2018 +0200 build-sys: add -Wno-cast-function-type for python libmount/python/pylibmount.c:158:19: warning: cast between incompatible function types from ‘PyObject * (*)(PyObject *)’ {aka ‘struct _object * (*)(struct _object *)’} to ‘PyObject * (*)(PyObject *, PyObject *)’ {aka ‘struct _object * (*)(struct _object *, struct _object *)’} [-Wcast-function-type] This is generic problem in all Python C code and gcc v8. The another possible (and probably more correct) way is to add unused argument to all API functions. Unfortunately, this solution is pretty invasive. The question is if gcc is not too paranoid in this case. For more details see https://bugs.python.org/issue33012. It seems Python guys also prefer CFLAGS modification for now. Signed-off-by: Karel Zak configure.ac | 4 ++++ libmount/python/Makemodule.am | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) commit b9144a43c03d8ed961c889d9bd113838ac8643ea Author: Karel Zak Date: Wed Jul 18 10:00:18 2018 +0200 libfdisk: fix compiler warning [-Wmaybe-uninitialized] Signed-off-by: Karel Zak libfdisk/src/gpt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4d43029b72325ff3e3215d9ce20a8acfaf8b5fa9 Author: Karel Zak Date: Wed Jul 18 09:46:40 2018 +0200 lslogins: remove redundant condition [util-linux-2.32.1/login-utils/lslogins.c:601]: (style) Redundant condition: If '!EXPR', the comparison 'EXPR != '$'' is always true. Reported-by: David Binderman Signed-off-by: Karel Zak login-utils/lslogins.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8deb816173187ce0666c1daa37ec35e4b7026b98 Author: Karel Zak Date: Wed Jul 18 09:46:40 2018 +0200 lib/strutils: remove redundant condition [util-linux-2.32.1/lib/strutils.c:122]: (style) Redundant condition: If 'EXPR == '0'', the comparison 'EXPR' is always true. Reported-by: David Binderman Signed-off-by: Karel Zak lib/strutils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 366edea76e793d6db229b07f337c4b6823c2f7c4 Author: Karel Zak Date: Wed Jul 18 09:46:40 2018 +0200 mkfs.cramfs: remove redundant condition util-linux-2.32.1/disk-utils/mkfs.cramfs.c:362]: (style) Redundant condition: If 'EXPR >= 16777216', the comparison 'EXPR' is always true. Reported-by: David Binderman Signed-off-by: Karel Zak disk-utils/mkfs.cramfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3b6ca044daf6a86c650b841c4005b2b6e68453fa Author: Karel Zak Date: Wed Jul 18 09:41:46 2018 +0200 lib/pager: fix compiler warning [-Wrestrict] lib/pager.c: In function ‘pager_preexec’: lib/pager.c:148:12: warning: passing argument 2 to restrict-qualified parameter aliases with argument 4 [-Wrestrict] Signed-off-by: Karel Zak lib/pager.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 342c66dee854ab17ea31b1443d01c05492ab892c Author: Karel Zak Date: Tue Jul 17 12:10:37 2018 +0200 docs: add fdisk to TODO Signed-off-by: Karel Zak Documentation/TODO | 7 +++++++ 1 file changed, 7 insertions(+) commit e8746956fcc324f2dbefb00f16410c9d1c01462c Author: Karel Zak Date: Tue Jul 17 11:58:09 2018 +0200 docs: add hwclock to TODO Signed-off-by: Karel Zak Documentation/TODO | 2 ++ 1 file changed, 2 insertions(+) commit 8bee1a220db8effbe5a75ba9bc68840e019ea89a Author: Milan Broz Date: Wed Jul 11 12:34:39 2018 +0200 libblkid: Check for a secondary LUKS2 header. This patch adds search for a secondary LUKS2 header, if the primary one is corrupted. This patch is primarily needed for wipefs that should wipe both signatures (otherwise LUKS2 header recovery can use secondary header and revert wipefs action). Signed-off-by: Milan Broz libblkid/src/superblocks/luks.c | 60 ++++++++++++++++++++++++++++++++--------- 1 file changed, 47 insertions(+), 13 deletions(-) commit 8a12ab57755afc36546834f175ef0b9e9376ba59 Author: Frank Schaefer Date: Tue Jul 10 20:21:02 2018 -0500 * break up large strings for PySys_WriteStdout() libmount/python/fs.c | 56 ++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 43 insertions(+), 13 deletions(-) commit 690fa00b6cdcd2d6acc1cd54c0d4f27613be9933 Author: Karel Zak Date: Tue Jul 10 14:04:09 2018 +0200 tests: add mountinfo with empty source Signed-off-by: Karel Zak .../libmount/tabfiles-parse-mountinfo-nosrc | 78 ++++++++++++++++++++++ tests/ts/libmount/files/mountinfo_nosrc | 7 ++ tests/ts/libmount/tabfiles | 5 ++ 3 files changed, 90 insertions(+) commit 18a52a5094f820b5da013daf5972eb8e65be9680 Author: Alban Crequy Date: Fri Jun 22 13:54:25 2018 +0200 libmount: (mountinfo) parse empty strings in source The source of a mount in /proc/self/mountinfo can unfortunately be an empty string. Before this patch, 'mount' and 'mountpoint' fail as following: $ sudo mount -t tmpfs "" /tmp/bb $ mount mount: /proc/self/mountinfo: parse error at line 64 -- ignored $ mountpoint /tmp/bb /tmp/bb is not a mountpoint This patch fixes the parsing. It is unfortunately more complex because sscanf() does not handle fields with empty strings easily. Other projects have their own parser for mountinfo and have similar issues. I know of runc and runtime-tools (I'll send a patch for those two) but there are probably others. Signed-off-by: Alban Crequy libmount/src/tab_parse.c | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) commit 66638b0b7023ea8f3b1b4adcca8cd092357b53c9 Author: Karel Zak Date: Tue Jul 10 10:33:18 2018 +0200 lsblk: add PATH column $ lsblk -o+PATH NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT PATH sda 8:0 0 223.6G 0 disk /dev/sda ├─sda1 8:1 0 200M 0 part /boot/efi /dev/sda1 ├─sda2 8:2 0 200M 0 part /boot /dev/sda2 ├─sda3 8:3 0 130.3G 0 part /dev/sda3 ├─sda4 8:4 0 50G 0 part / /dev/sda4 ├─sda5 8:5 0 35.1G 0 part /dev/sda5 └─sda6 8:6 0 7.8G 0 part /dev/sda6 Requested-by: Marcel Partap Signed-off-by: Karel Zak misc-utils/lsblk.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 46e972354da574620a531f9bd686644620cacc0e Merge: 03190b73f 4d0bc0569 Author: Karel Zak Date: Tue Jul 10 09:38:07 2018 +0200 Merge branch 'master' of https://github.com/hjmallon/util-linux * 'master' of https://github.com/hjmallon/util-linux: libblkid: Add more APFS checking to avoid false positives commit 03190b73f00c3c4fb7d3f2da0ba35ac3c9fe2e40 Author: YmrDtnJu Date: Sat Jul 7 20:11:46 2018 +0200 logger: Define SD_JOURNAL_SUPPRESS_LOCATION. The normal journald functions add the location in the C source code files to the log messages. This is nice for a big C based project, but logger is used in scripts so it would be more useful to let users specify the location in the script by adding the CODE_FUNC, CODE_FILE and CODE_FILE fields to the log message. It is already possible to do this, but it will result in two versions of these fields: one for the location in logger.c and one for the location in the script. misc-utils/logger.c | 1 + 1 file changed, 1 insertion(+) commit 4d0bc05697647104516fdd62cc1aef3bc95beaef Author: Harry Mallon Date: Fri Jul 6 18:39:26 2018 +0100 libblkid: Add more APFS checking to avoid false positives libblkid/src/superblocks/apfs.c | 62 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) commit e6dfbd70ea43529770fc03bf16dea5e1cd47d76e Author: Karel Zak Date: Wed Jul 4 15:16:35 2018 +0200 libfdisk: reduce number of asprintf() calls, check return value Signed-off-by: Karel Zak libfdisk/src/utils.c | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) commit 73775189767195f1d9f5b6b6f6a54e51f61c4356 Author: KyleMahlkuch Date: Mon Jun 25 14:52:01 2018 -0500 libfdisk: Fix multipath partition seperators for user-friendly names The current code assumes "-part" is the only partition sepereator but this is not true for some distros. For example in Ubuntu 18.04 fdisk does not print the correct names for mpatha: ~# ls -l /dev/mapper/mpatha* lrwxrwxrwx 1 root root 7 Feb 1 04:39 /dev/mapper/mpatha -> ../dm-0 lrwxrwxrwx 1 root root 7 Feb 1 04:38 /dev/mapper/mpatha1 -> ../dm-4 lrwxrwxrwx 1 root root 7 Feb 1 04:38 /dev/mapper/mpatha2 -> ../dm-5 lrwxrwxrwx 1 root root 7 Feb 1 04:38 /dev/mapper/mpatha3 -> ../dm-6 ~# fdisk -l /dev/mapper/mpatha Device Boot Start End Sectors Size Id Type /dev/mapper/mpatha-part1 2048 419432447 419430400 200G 83 Linux /dev/mapper/mpatha-part2 419432448 838862847 419430400 200G 83 Linux /dev/mapper/mpatha-part3 838862848 1258291199 419428352 200G 83 Linux Instead of assuming a partition seperator of "-part" this patch uses access to check the file system for a partition seperator of "p" or the absense of a partition seperator. If neither of these work the patch defaults to "-part" like we had before this patch. libfdisk/src/utils.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit 810b313688d2727447414098112a9aa73d2f93be Author: Karel Zak Date: Wed Jul 4 14:06:38 2018 +0200 libfdisk: use \x to read/write partition name Addresses: https://github.com/karelzak/util-linux/issues/656 Signed-off-by: Karel Zak libfdisk/src/script.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 7a287e63b903c05b53fd7bd0ddc4e80a7ac4bc49 Author: Karel Zak Date: Wed Jul 4 13:34:56 2018 +0200 fallocate: remove unwanted debug message Signed-off-by: Karel Zak sys-utils/fallocate.c | 2 -- 1 file changed, 2 deletions(-) commit 3918998043776a9b797819c3d097807dd523662d Merge: 805400c73 084f092a6 Author: Karel Zak Date: Wed Jul 4 13:25:07 2018 +0200 Merge branch 'master' of https://github.com/hjmallon/util-linux * 'master' of https://github.com/hjmallon/util-linux: libblkid: Add very basic APFS recognition commit 805400c7303c2914ec533b278c16a7454d19706d Merge: 9c836fde5 82adb91f6 Author: Karel Zak Date: Wed Jul 4 11:00:58 2018 +0200 Merge branch 'quick-fix-20180625' of https://github.com/sjitech/util-linux * 'quick-fix-20180625' of https://github.com/sjitech/util-linux: exec_shell: prevent ".: applet not found" error when SHELL env is not set. commit 9c836fde5f46bdad86f353bba0696ad7376af320 Merge: 562adaed9 3097f788f Author: Karel Zak Date: Tue Jul 3 13:55:32 2018 +0200 Merge branch 'fixes' of https://github.com/rudimeier/util-linux * 'fixes' of https://github.com/rudimeier/util-linux: wipefs: add missing ifdef lib/path: remove unused expression ipcs,chmem: fix access() usage commit 562adaed911db581fe01664c07a27184e27087c3 Author: Karel Zak Date: Tue Jul 3 13:51:51 2018 +0200 fallocate: add man page note about --collapse-range granularity Reported-by: Radka Skvarilova Signed-off-by: Karel Zak sys-utils/fallocate.1 | 6 ++++++ sys-utils/fallocate.c | 3 +++ 2 files changed, 9 insertions(+) commit 084f092a62f8767998d8b00222eb14f3ec94e8b6 Author: Harry Mallon Date: Mon Jun 25 16:19:18 2018 +0100 libblkid: Add very basic APFS recognition libblkid/src/Makemodule.am | 1 + libblkid/src/superblocks/apfs.c | 19 +++++++++++++++++++ libblkid/src/superblocks/superblocks.c | 3 ++- libblkid/src/superblocks/superblocks.h | 1 + 4 files changed, 23 insertions(+), 1 deletion(-) commit 3097f788f99804957a8ffb3797ed49cb599daeb7 Author: Ruediger Meier Date: Mon Jun 25 15:08:55 2018 +0200 wipefs: add missing ifdef Seen on OSX: misc-utils/wipefs.c:822:5: warning: implicit declaration of function 'rereadpt' is invalid in C99 [-Wimplicit-function-declaration] rereadpt(fd, devname); Signed-off-by: Ruediger Meier misc-utils/wipefs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 24c329bbb35d96ef261d21b77f559d8fca942bd4 Author: Ruediger Meier Date: Mon Jun 25 14:23:42 2018 +0200 lib/path: remove unused expression error: expression result unused [-Werror,-Wunused-value] prefix = optarg, "failed to parse range start"; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Ruediger Meier lib/path.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 77845f7bd75cc1f1ac69bfae38a78aa81ae3fb60 Author: Ruediger Meier Date: Mon Jun 25 14:01:21 2018 +0200 ipcs,chmem: fix access() usage Some mistakes happened lately when switching from path_exist() to ul_path_access(). See f09a98de and 8ca31279. This caused ipcs test failures when running i386 binaries on x86_64 hosts, because the syscall fallback was always used. That's why I reviewed all similar changes and found another one in chmem. Signed-off-by: Ruediger Meier sys-utils/chmem.c | 2 +- sys-utils/ipcutils.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) commit 82adb91f6eff659474007cb776ef0091c95aac1f Author: osexp2000 Date: Mon Jun 25 10:34:31 2018 +0900 exec_shell: prevent ".: applet not found" error when SHELL env is not set. When SHELL env is not set, it cause xstrdup(NULL) be executed, and result in weird error message ".: applet not found" instead of /bin/sh being used. lib/exec_shell.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 917f53cf13c36d32c175f80f2074576595830573 Author: Karel Zak Date: Fri Jun 22 12:47:25 2018 +0200 docs: update TODO Signed-off-by: Karel Zak Documentation/TODO | 14 -------------- 1 file changed, 14 deletions(-) commit 2cb147e026b7986d31a7b5b9a8fed63c137985b4 Author: Karel Zak Date: Thu Jun 21 14:24:01 2018 +0200 include/path: make sure PATH_MAX is defined Signed-off-by: Karel Zak include/path.h | 2 ++ 1 file changed, 2 insertions(+) commit f6447ee9295a862f33a558f8bc97b2db0a5b5f2b Merge: bd5f7f2ef bd6a253f6 Author: Karel Zak Date: Thu Jun 21 14:01:54 2018 +0200 Merge branch 'more' of https://github.com/kerolasa/util-linux * 'more' of https://github.com/kerolasa/util-linux: more: remove function like preprocessor defines more: remove global variables, add struct more_control more: move couple functions commit bd5f7f2ef304fed20ae5321770a8a718f9a0f9a8 Author: Karel Zak Date: Thu Jun 21 13:46:20 2018 +0200 choom: use new ul_path_* API Signed-off-by: Karel Zak sys-utils/choom.c | 43 ++++++++++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 17 deletions(-) commit 83bbeb77c1e64b02ad5f36bde47d22be69d08a0f Author: Karel Zak Date: Thu Jun 21 13:49:03 2018 +0200 lib/path: allow dir-path formatting Signed-off-by: Karel Zak include/path.h | 2 +- lib/path.c | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) commit 91d28f5986c4d367bf63b140fb661855be5e21f0 Author: Karel Zak Date: Wed Jun 20 16:43:19 2018 +0200 tests: add simple LVM lsblk dump Signed-off-by: Karel Zak tests/expected/lsblk/lsblk-simple-lvm-basic | 22 ++++++++++++++++++++++ tests/expected/lsblk/lsblk-simple-lvm-discard | 22 ++++++++++++++++++++++ tests/expected/lsblk/lsblk-simple-lvm-rw | 22 ++++++++++++++++++++++ tests/expected/lsblk/lsblk-simple-lvm-state | 22 ++++++++++++++++++++++ tests/expected/lsblk/lsblk-simple-lvm-topo | 22 ++++++++++++++++++++++ tests/expected/lsblk/lsblk-simple-lvm-vendor | 22 ++++++++++++++++++++++ tests/expected/lsblk/lsblk-simple-lvm-zone | 22 ++++++++++++++++++++++ tests/ts/lsblk/dumps/simple-lvm.tar.xz | Bin 0 -> 14216 bytes 8 files changed, 154 insertions(+) commit 905bc7817ecae1df10e32bed2a0a68c11928ddc9 Author: Karel Zak Date: Wed Jun 20 16:41:51 2018 +0200 lsblk: fix ul_path_read_string() usage Signed-off-by: Karel Zak lib/path.c | 8 ++++---- misc-utils/lsblk.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) commit d6d24dda2946ba824c2059e005a17bca690607f2 Author: Karel Zak Date: Wed Jun 20 16:32:56 2018 +0200 tests: add simple ATA and NVME lsblk dump Signed-off-by: Karel Zak tests/expected/lsblk/lsblk-simple-nvme-basic | 14 ++++++++++++++ tests/expected/lsblk/lsblk-simple-nvme-discard | 14 ++++++++++++++ tests/expected/lsblk/lsblk-simple-nvme-rw | 14 ++++++++++++++ tests/expected/lsblk/lsblk-simple-nvme-state | 14 ++++++++++++++ tests/expected/lsblk/lsblk-simple-nvme-topo | 14 ++++++++++++++ tests/expected/lsblk/lsblk-simple-nvme-vendor | 14 ++++++++++++++ tests/expected/lsblk/lsblk-simple-nvme-zone | 14 ++++++++++++++ tests/ts/lsblk/dumps/simple-nvme.tar.xz | Bin 0 -> 10292 bytes 8 files changed, 98 insertions(+) commit 314adce6681d8ad619b8d884ac0aa37288b61976 Author: Karel Zak Date: Wed Jun 20 12:59:40 2018 +0200 tests: add lsblk test script Signed-off-by: Karel Zak tests/ts/lsblk/README | 19 ++++++++++++++++ tests/ts/lsblk/lsblk | 56 ++++++++++++++++++++++++++++++++++++++++++++++ tests/ts/lsblk/mk-input.sh | 23 ++++++++++++++----- 3 files changed, 92 insertions(+), 6 deletions(-) commit bd45b74fc9cc724df23d0a0ddbe59e2362f50bf4 Author: Karel Zak Date: Wed Jun 20 12:58:19 2018 +0200 lsblk: fix COL_SCHED Signed-off-by: Karel Zak misc-utils/lsblk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8ab664a77efe9fe191ba29156047611961de0f28 Author: Karel Zak Date: Tue Jun 19 17:00:14 2018 +0200 tests: add simple & stupid script to generate lsblk /sys and /proc dump Signed-off-by: Karel Zak tests/ts/lsblk/mk-input.sh | 98 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) commit 498d1486614d84da313b2135c5ba924ce693b7b9 Author: Karel Zak Date: Tue Jun 19 16:30:29 2018 +0200 lsblk: document --sysroot Signed-off-by: Karel Zak misc-utils/lsblk.8 | 6 ++++++ misc-utils/lsblk.c | 1 + 2 files changed, 7 insertions(+) commit 3273ce07e3b3c86563277b557d0ed3972285963e Author: Karel Zak Date: Tue Jun 19 16:10:17 2018 +0200 lsblk: fix sysfs_devno_to_devname() usage Signed-off-by: Karel Zak misc-utils/lsblk.c | 1 + 1 file changed, 1 insertion(+) commit caf1b443c073629cc2d70cca8251849cedcffd65 Author: Karel Zak Date: Tue Jun 19 12:22:59 2018 +0200 lsblk: follow --sysroot when read mountpoints Signed-off-by: Karel Zak misc-utils/lsblk.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) commit 5a89aa99a7f13722102fa8730f4647da9138134d Author: Karel Zak Date: Tue Jun 19 12:02:52 2018 +0200 lsblk: use prefix for DM name Signed-off-by: Karel Zak include/canonicalize.h | 1 + lib/canonicalize.c | 14 +++++++++++--- misc-utils/lsblk.c | 18 ++++++++++++++---- 3 files changed, 26 insertions(+), 7 deletions(-) commit ffc2762393b9ccb43899cd22a1d098d895d8b841 Author: Karel Zak Date: Mon Jun 18 13:01:27 2018 +0200 lsblk: add --sysroot Signed-off-by: Karel Zak misc-utils/lsblk.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit be869840b1921d745a924783bf0ca8bc799d5d03 Author: Karel Zak Date: Fri Jun 15 12:07:10 2018 +0200 docs: add note about lsblk to TODO Signed-off-by: Karel Zak Documentation/TODO | 9 +++++++++ 1 file changed, 9 insertions(+) commit f153614c573425184931c411cdf5cc63f746383c Author: Karel Zak Date: Fri Jun 15 11:59:29 2018 +0200 lsblk: use new ul_path_* API Signed-off-by: Karel Zak misc-utils/lsblk.c | 176 +++++++++++++++++++++++++---------------------------- 1 file changed, 82 insertions(+), 94 deletions(-) commit ab628c7c1899cb37934f1abe78f13ca3f609cddd Author: Karel Zak Date: Fri Jun 15 11:57:48 2018 +0200 lib/sysfs: cleanup function names Signed-off-by: Karel Zak include/sysfs.h | 5 +++-- lib/sysfs.c | 7 +++---- 2 files changed, 6 insertions(+), 6 deletions(-) commit 345ddd2828ee4bac6e94e256150bd718e5a5ca5b Author: Karel Zak Date: Wed May 30 11:24:40 2018 +0200 blockdev: use new ul_path_* API Signed-off-by: Karel Zak disk-utils/blockdev.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) commit 61bc5fd1569810223b704300b3cdf8b4f476ff67 Author: Karel Zak Date: Wed May 30 10:47:09 2018 +0200 partx: use new ul_path_* API Signed-off-by: Karel Zak disk-utils/partx.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 7f8a406679bde6020541ee059cf1b8e271e9bd23 Author: Karel Zak Date: Wed May 30 10:41:46 2018 +0200 resizepart: use new ul_path_* API Signed-off-by: Karel Zak disk-utils/resizepart.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit 4448b3ab9e4a68c119c85fb477aae242d7f3e4b4 Author: Karel Zak Date: Tue May 29 12:59:03 2018 +0200 blkzone: use new ul_path_* API Signed-off-by: Karel Zak sys-utils/blkzone.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) commit 3736c6e444d7b1fbd19bb92b11ea28b64060f481 Author: Karel Zak Date: Tue May 29 12:53:52 2018 +0200 fstrim: use new ul_path_* API Signed-off-by: Karel Zak sys-utils/eject.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) commit eb4a75afd97ef1d746373c751deb6857a13111a0 Author: Karel Zak Date: Tue May 29 12:41:48 2018 +0200 lib/path: improve debug message on redirect Signed-off-by: Karel Zak lib/path.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit fda0e2cf043994c77c29a2d109c03ce8957b1d38 Author: Karel Zak Date: Tue May 29 12:39:32 2018 +0200 fstrim: add --dry-run Signed-off-by: Karel Zak sys-utils/fstrim.8 | 2 ++ sys-utils/fstrim.c | 27 ++++++++++++++++++++------- 2 files changed, 22 insertions(+), 7 deletions(-) commit c69bd2cbffb2ead4189dd9399bd46e5e1d6321de Author: Karel Zak Date: Tue May 29 12:10:31 2018 +0200 fstrim: use new ul_path_* API, improve sysfs context usage * improve has_discard() function to initialize sysfs context only once * use new ul_path_* API Signed-off-by: Karel Zak sys-utils/fstrim.c | 52 ++++++++++++++++++++++++++++++++++------------------ 1 file changed, 34 insertions(+), 18 deletions(-) commit 67f2d1e326c61c6ea70c0e14d2371645819517fd Author: Karel Zak Date: Tue May 29 12:09:56 2018 +0200 lib/sysfs: fix sysfs_blkdev_get_wholedisk() Signed-off-by: Karel Zak lib/sysfs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 53c74b700c2c96137281295e5c1c3c04e6a5ddcf Author: Karel Zak Date: Fri May 25 13:20:22 2018 +0200 lib/path: simplify debug message Signed-off-by: Karel Zak lib/path.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6e509042b80c0549c6634cbdf66b71d0b764a158 Author: Karel Zak Date: Fri May 25 12:51:55 2018 +0200 lscpu: use new ul_path_* API * use ul_path_* API for /sys/devices/system/cpu paths * use ul_path_* API for /proc * rename is_compatible() to is_devtree_compatible() as it works with the devices tree only Signed-off-by: Karel Zak sys-utils/lscpu.c | 265 +++++++++++++++++++++++++++--------------------------- sys-utils/lscpu.h | 5 ++ 2 files changed, 137 insertions(+), 133 deletions(-) commit 9023b2012340c76340337bce71eafaa90ac3c612 Author: Karel Zak Date: Fri May 25 12:47:06 2018 +0200 lib/path: add ul_prefix_fopen(), improve cpuset funcs Signed-off-by: Karel Zak include/path.h | 1 + lib/path.c | 29 +++++++++++++++++++++++++++-- 2 files changed, 28 insertions(+), 2 deletions(-) commit c87b53ca5fe9fa01fe56890e550e99f7a41f070a Author: Karel Zak Date: Thu May 24 14:06:11 2018 +0200 lib/path: don't use extra '/' Signed-off-by: Karel Zak lib/path.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) commit f09a98de65077fb9112497797ad39833777e2d84 Author: Karel Zak Date: Thu May 24 13:50:52 2018 +0200 ipcs: use new ul_path_* API Signed-off-by: Karel Zak sys-utils/ipcutils.c | 33 ++++++++++++++++----------------- sys-utils/ipcutils.h | 2 +- 2 files changed, 17 insertions(+), 18 deletions(-) commit c7df0f42b761929fe92e4706990976bfdc638179 Author: Karel Zak Date: Fri May 18 12:33:03 2018 +0200 lib/path: add more debug messages Signed-off-by: Karel Zak lib/path.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit a375d911c76f5b8d2827e391c061006e5d6d1c5d Author: Karel Zak Date: Fri May 18 12:32:52 2018 +0200 chcpu: use new ul_path_* API Signed-off-by: Karel Zak sys-utils/chcpu.c | 98 +++++++++++++++++++++++++++++++------------------------ 1 file changed, 55 insertions(+), 43 deletions(-) commit 9ce2fef0d7fb74ba4d3ebb808d2954f9727bac71 Author: Karel Zak Date: Thu May 17 16:26:07 2018 +0200 ctrlaltdel: use new ul_path_* API Signed-off-by: Karel Zak sys-utils/ctrlaltdel.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit fcc4517cfd788b3743b6c0145a0395e9a6f8b1b5 Author: Karel Zak Date: Thu May 17 16:25:47 2018 +0200 lib/path: make ul_path_read_ usable with NULL handler Signed-off-by: Karel Zak lib/path.c | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) commit f99148d6f5a6f7b779675060ac2bf7a8570a3726 Author: Karel Zak Date: Thu May 17 16:05:39 2018 +0200 rfkill: don't use lib/path It seems like crazy overkill for this trivial purpose. Signed-off-by: Karel Zak sys-utils/rfkill.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 8ca312798ca44c9fb39967e6b8a5afc2fcf83242 Author: Karel Zak Date: Thu May 17 14:45:23 2018 +0200 chmem: use new ul_path_* API Signed-off-by: Karel Zak sys-utils/chmem.c | 39 +++++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 16 deletions(-) commit e4319a105b019f90afd56fb38a621df00002b2d6 Author: Karel Zak Date: Thu May 17 14:45:23 2018 +0200 lsmem: use new ul_path_* API Signed-off-by: Karel Zak sys-utils/lsmem.c | 93 +++++++++++++++++++++++++++++++------------------------ 1 file changed, 53 insertions(+), 40 deletions(-) commit 7eb8e47bcd9979689b00625df6e7a20a2b9e2d41 Author: Karel Zak Date: Thu May 17 15:42:37 2018 +0200 lib/path: add ul_path_read_buffer() Signed-off-by: Karel Zak include/path.h | 4 ++++ lib/path.c | 29 +++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) commit e74e5401e11dde927042fa00a6db02d0381e0e0c Author: Karel Zak Date: Thu May 17 13:58:30 2018 +0200 lib/path: add ul_path_get_abspath() Signed-off-by: Karel Zak include/path.h | 3 +++ lib/path.c | 34 +++++++++++++++++++++++++++++++++- 2 files changed, 36 insertions(+), 1 deletion(-) commit a6f0da166e58ba279094b483eedf5126a6850029 Author: Karel Zak Date: Wed May 16 14:08:11 2018 +0200 zramctl: use new ul_path_* API Signed-off-by: Karel Zak sys-utils/zramctl.c | 95 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 54 insertions(+), 41 deletions(-) commit 3aa4775c2f5f0ae3e72e42d924d080843208e0cb Author: Karel Zak Date: Wed May 16 14:06:02 2018 +0200 lib/sysfs: fix ul_path_read_string() usage Signed-off-by: Karel Zak lib/path.c | 1 + 1 file changed, 1 insertion(+) commit efb17218effa8f806f66d65db12f84addfc208d1 Author: Karel Zak Date: Wed May 16 13:22:38 2018 +0200 libfdisk: use new ul_path_* API Signed-off-by: Karel Zak disk-utils/fdisk-list.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 708a58b665a2157c4d6f9057246a1531ae3ae33a Author: Karel Zak Date: Wed May 16 13:20:39 2018 +0200 libblkid: use new ul_path_* API Signed-off-by: Karel Zak libblkid/src/devname.c | 13 ++++---- libblkid/src/partitions/partitions.c | 20 +++++++----- libblkid/src/topology/sysfs.c | 60 +++++++++++++++++++----------------- 3 files changed, 51 insertions(+), 42 deletions(-) commit 8c3d9cad1ecb3c4ba78604ea4416620f6a6566ab Author: Karel Zak Date: Wed May 16 13:20:01 2018 +0200 lib/sysfs: add sysfs_blkdev_get_parent() Signed-off-by: Karel Zak include/sysfs.h | 2 ++ lib/sysfs.c | 6 ++++++ 2 files changed, 8 insertions(+) commit 866ac74f972063474dc26dfd1c58a145d7ac61a9 Author: Karel Zak Date: Wed May 16 12:52:47 2018 +0200 lib/sysfs: make possible to call sysfs_blkdev_deinit_path() in loop Signed-off-by: Karel Zak lib/path.c | 2 +- lib/sysfs.c | 24 ++++++++++++++++-------- 2 files changed, 17 insertions(+), 9 deletions(-) commit d5878cabe6e9df5a9dacbbd637f53784d0b19928 Author: Karel Zak Date: Tue May 15 14:11:38 2018 +0200 lib/path: fix read string to be backwardly compatible Signed-off-by: Karel Zak lib/path.c | 4 ++++ 1 file changed, 4 insertions(+) commit bcf445fd688692fd4cbfde03cda60be4281ac28b Author: Karel Zak Date: Tue May 15 13:43:29 2018 +0200 lib/path lib/sysfs: add debug Signed-off-by: Karel Zak include/path.h | 2 ++ include/sysfs.h | 2 ++ lib/path.c | 38 +++++++++++++++++++++++++++++++++++++- lib/sysfs.c | 38 +++++++++++++++++++++++++++++++++++++- sys-utils/losetup.c | 3 +++ 5 files changed, 81 insertions(+), 2 deletions(-) commit 2569d2ca1f3f72127b40676884ce7c3dc351fe22 Author: Karel Zak Date: Tue May 15 13:21:41 2018 +0200 lib/loopdev: remove obsolete macro Signed-off-by: Karel Zak lib/loopdev.c | 1 - 1 file changed, 1 deletion(-) commit 7604f85fb649a271ca57687d009cd3c02e5dc4ea Author: Karel Zak Date: Tue May 15 13:08:47 2018 +0200 lib/loopdev: use new ul_path_* API Signed-off-by: Karel Zak include/loopdev.h | 5 ++--- lib/loopdev.c | 49 +++++++++++++++++++++++++------------------------ 2 files changed, 27 insertions(+), 27 deletions(-) commit 83029ea577fc9a9f9393a579183baa70c23e9dd8 Author: Karel Zak Date: Tue May 15 13:08:18 2018 +0200 lib/sysfs: add ul_new_sysfs_path() shortcut Signed-off-by: Karel Zak include/sysfs.h | 1 + lib/sysfs.c | 53 +++++++++++++++++++++++++++++++++-------------------- 2 files changed, 34 insertions(+), 20 deletions(-) commit 5387c01517fef32144a17a52e284f8c97d773847 Author: Karel Zak Date: Fri May 11 14:28:03 2018 +0200 lib/sysfs: new implementation * reuse ul_path_* API * allow to use prefix for sysfs paths, so we can use snapshots from sysfs for regression tests Signed-off-by: Karel Zak include/sysfs.h | 125 +++---- lib/Makemodule.am | 7 +- lib/sysfs.c | 972 +++++++++++++++++++++++++----------------------------- 3 files changed, 498 insertions(+), 606 deletions(-) commit 1ed21c80ed3683c17708caad3d545da4d8e09b02 Author: Karel Zak Date: Wed May 9 15:54:12 2018 +0200 lib/path: new implementation The goal is to avoid duplicate code in path.c and sysfs.c and make it possible to define prefix for paths for all sysfs and procfs based utils. Now we have /proc snapshots (for tests) for lscpu only. It would be nice to have the same (for sysfs) for lsblk and another tools. * very simple API to read numbers, strings and symlinks * based on openat() pc = ul_new_path("/sys/block/sda"); ul_path_read_u64(pc, &size, "size"); ul_path_read_u64(pc, &lsz, "queue/logical_block_size"); * printf-like API to generate paths, for example: ul_path_readf_u64(pc, &num, "sda%d/size", partno) * allow to define prefix to redirect hardcoded paths to another location, for example: pc = ul_new_path("/sys/block/sda"); ul_path_set_prefix(pc, "/my/regression/dump"); ul_path_read_u64(pc, &num, "size"); to read /my/regression/dump/sys/block/sda/size * allow to extend the API by "dialects", for example for sysfs: pc = ul_new_path(NULL); sysfs_blkdev_init_path(pc, devno, NULL); and use ul_path_* functions to read from @pc initialized by sysfs_blkdev_init_path() * add test_path binary Signed-off-by: Karel Zak include/path.h | 133 +++++-- lib/Makemodule.am | 12 +- lib/path.c | 1046 ++++++++++++++++++++++++++++++++++++++++++++++------- 3 files changed, 1024 insertions(+), 167 deletions(-) commit 1b06b33dd0119fdae00fcc59f530200f6bdb0195 Author: Milan Broz Date: Tue Jun 19 12:33:20 2018 +0200 lsblk: add partition table UUID and type fields. This patch adds PTUUID and PTTYPE fields to lsblk, that are corresponding fields to ID_PART_TABLE_UUID and ID_PART_TABLE_TYPE in udev database. [kzak@redhat.com: - small change in PTUUID description] Signed-off-by: Milan Broz Signed-off-by: Karel Zak misc-utils/lsblk.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit bd6a253f690793b13c97048b3611b33596f15c12 Author: Sami Kerola Date: Sat May 26 09:37:47 2018 +0100 more: remove function like preprocessor defines Inlining code using preprocessor function like macros is bad for readability, and prone to errors. Besides this is a pager, who cares if code is few milliseconds slower. Requestee-by: Karel Zak Signed-off-by: Sami Kerola text-utils/more.c | 238 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 134 insertions(+), 104 deletions(-) commit 7cc31c18d779346592420723eaae1e843f43a06e Author: Sami Kerola Date: Wed May 23 22:58:34 2018 +0100 more: remove global variables, add struct more_control This is rather big change, but that is the only way to do this sort job. To keep this change relatively understandable only moves global variables to a state structure. Signed-off-by: Sami Kerola text-utils/more.c | 1310 +++++++++++++++++++++++++++-------------------------- 1 file changed, 671 insertions(+), 639 deletions(-) commit 82cfa6f20fe869b762763e910adac4b9c685da5f Author: Sami Kerola Date: Wed May 23 21:54:42 2018 +0100 more: move couple functions Earlier commit moved lots of functions to work without declarations, but to be able to get rid of global variables few more moves is needed. Reference: a8f98304e6d2f4627ca31f6c661934c92b1095f7 Signed-off-by: Sami Kerola text-utils/more.c | 246 +++++++++++++++++++++++++++--------------------------- 1 file changed, 123 insertions(+), 123 deletions(-) commit aeda8dc3d0a5ffbdca0be1e97a7ae3008cc62a6b Author: Andreas Henriksson Date: Sun Jun 17 14:49:15 2018 +0200 partx: exit with error code when partition read failed Make sure partx exits with a non-0 return code when it runs into either code-path where getting the partition table failed (or wasn't even attempted because of previous error condition). Change was tested using: touch /tmp/foobar partx -s - /tmp/foobar Previously that was only printing an error/warning message and then exiting with 0, but after this change it exits with 1. Signed-off-by: Andreas Henriksson Reported-by: Juan Céspedes Addresses: https://bugs.debian.org/898426 disk-utils/partx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit e60b6df54e27cdb68a75ea8a056a70f60df8f025 Author: Karel Zak Date: Thu Jun 14 13:02:49 2018 +0200 setarch: add another PER_LINUX32 aliases for ppcle The big-endian version maps generic "ppc" and "ppc32" aliases to PER_LINUX32. It seems that we can do the same for little-endian. Note that SYS_personality does not care about LE/BE, it's 32 or 64 bit. Signed-off-by: Karel Zak sys-utils/setarch.c | 2 ++ 1 file changed, 2 insertions(+) commit 99ab05a6b478368ccf49134fed957f774905901d Author: Karel Zak Date: Mon Jun 11 16:28:59 2018 +0200 docs: update TODO Signed-off-by: Karel Zak Documentation/TODO | 13 ------------- 1 file changed, 13 deletions(-) commit c5b63d284f2ba931c100414635be0bb54dbc3f24 Author: Karel Zak Date: Mon Jun 11 16:27:51 2018 +0200 mount: add -N to man page helpers section Signed-off-by: Karel Zak sys-utils/mount.8 | 4 +++- sys-utils/umount.8 | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) commit 6e965d0f4a1e1b9c6da92d51e1dafa9571467388 Author: Vaclav Dolezal Date: Tue Apr 24 18:05:04 2018 +0200 umount: fix behaviour of -A and -R with --namespace Load /proc/self/mountinfo from correct namespace. Signed-off-by: Vaclav Dolezal Signed-off-by: Karel Zak sys-utils/umount.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit c1e70afedf53e70768372b30a997630235771f56 Author: Vaclav Dolezal Date: Fri Apr 20 17:57:39 2018 +0200 umount: allow PID as --namespace argument [kzak@redhat.com: - update code] Signed-off-by: Karel Zak Signed-off-by: Vaclav Dolezal sys-utils/umount.8 | 4 +++- sys-utils/umount.c | 24 ++++++++++++++++++++++-- 2 files changed, 25 insertions(+), 3 deletions(-) commit d59766a64806d3acc409bd27cdd6a58e2d6e405f Author: Vaclav Dolezal Date: Fri Apr 20 17:57:39 2018 +0200 mount: allow PID as --namespace argument [[kzak@redhat.com: - update code] Signed-off-by: Karel Zak Signed-off-by: Vaclav Dolezal sys-utils/mount.8 | 4 +++- sys-utils/mount.c | 25 +++++++++++++++++++++++-- 2 files changed, 26 insertions(+), 3 deletions(-) commit d45e8ef999e3976017cbf55fc43716f8233d3a0b Author: Vaclav Dolezal Date: Tue Apr 17 15:52:54 2018 +0200 mount: document --namespace in man/help Signed-off-by: Vaclav Dolezal sys-utils/mount.8 | 4 ++++ sys-utils/mount.c | 2 ++ sys-utils/umount.8 | 4 ++++ sys-utils/umount.c | 1 + 4 files changed, 11 insertions(+) commit cddd2eaa27c0c35b1a3bfbe7f76a1c7c1ea46517 Author: Vaclav Dolezal Date: Wed Apr 11 15:52:52 2018 +0200 libmount: switch namespace when appropriate Signed-off-by: Vaclav Dolezal libmount/src/context.c | 149 ++++++++++++++++++++++++++++++++++++----- libmount/src/context_loopdev.c | 8 +++ libmount/src/context_mount.c | 54 ++++++++++++++- libmount/src/context_umount.c | 49 +++++++++++++- 4 files changed, 241 insertions(+), 19 deletions(-) commit 65ca7b5a9b3270b71804f3de988322e19941a02b Author: Vaclav Dolezal Date: Tue Mar 6 12:30:27 2018 +0100 libmount: support for namespaces for helpers Signed-off-by: Vaclav Dolezal libmount/src/context_mount.c | 22 +++++++++++++++++++--- libmount/src/context_umount.c | 20 ++++++++++++++++++-- 2 files changed, 37 insertions(+), 5 deletions(-) commit de7ccabdfd2cf63324c9abddbc23dd71d4edd6b5 Author: Karel Zak Date: Mon Jun 11 16:06:17 2018 +0200 libmount: make errno usable after mnt_context_set_target_ns() Signed-off-by: Karel Zak libmount/src/context.c | 11 +++++++---- sys-utils/mount.c | 7 +------ sys-utils/umount.c | 8 ++------ 3 files changed, 10 insertions(+), 16 deletions(-) commit c3dc9a8bad62b706c9d79d2e1e81f2f08664ddde Author: Vaclav Dolezal Date: Thu Mar 15 14:06:48 2018 +0100 umount: add support for namespaces Signed-off-by: Vaclav Dolezal sys-utils/umount.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 21edc0f71a6cfff41d6ae4d8fdc960b4fc54a4ff Author: Vaclav Dolezal Date: Mon Feb 19 18:58:23 2018 +0100 mount: add support for namespaces Signed-off-by: Vaclav Dolezal Signed-off-by: Karel Zak sys-utils/mount.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 8342e5840dd862d2d13f3b8be38dfa070c8d7236 Author: Vaclav Dolezal Date: Tue Mar 13 14:45:43 2018 +0100 libmount: added error MNT_ERR_NAMESPACE Signed-off-by: Vaclav Dolezal libmount/src/context_mount.c | 8 ++++++++ libmount/src/context_umount.c | 8 ++++++++ libmount/src/libmount.h.in | 6 ++++++ 3 files changed, 22 insertions(+) commit 5cbf01b75d0dc6736a3ea1c8c93bfedaf85b0c61 Author: Vaclav Dolezal Date: Tue Mar 20 14:46:18 2018 +0100 libmount: note namespaces in mnt_reset_context() docs Signed-off-by: Vaclav Dolezal libmount/src/context.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 4917d842ea6feb1e815f701826dadbef3feb066f Author: Vaclav Dolezal Date: Mon Feb 19 18:45:55 2018 +0100 libmount: add support for switching namespaces [kzak@redhat.com: - cosmetic changes, add some comments] Signed-off-by: Vaclav Dolezal Signed-off-by: Karel Zak libmount/docs/libmount-sections.txt | 8 ++ libmount/src/context.c | 202 ++++++++++++++++++++++++++++++++++++ libmount/src/libmount.h.in | 14 +++ libmount/src/libmount.sym | 9 ++ libmount/src/mountP.h | 9 ++ 5 files changed, 242 insertions(+) commit 921f63433ee62894908f7f8c0a622057478e6fa1 Author: Karel Zak Date: Mon Jun 11 12:21:56 2018 +0200 wipefs: postpone BLKRRPART until all is done It's possible we erase from the whole device before we erase from the partition on the same disk: # wipefs -a /dev/sdc /dev/sdc1 the current code calls re-read PT ioctl immediately after erase (so, before sdc1 is processed). The result is that sdc1 node is no more accessible: # wipefs -a /dev/sdc /dev/sdc1 /dev/sdc: 2 bytes were erased at offset 0x000001fe (dos): 55 aa /dev/sdc: calling ioctl to re-read partition table: Success wipefs: error: /dev/sdc1: probing initialization failed: No such file or directory It seems the most simple solution is to postpone the re-read ioctl and do it as the last thing. # wipefs -a /dev/sdc /dev/sdc1 /dev/sdc: 2 bytes were erased at offset 0x000001fe (dos): 55 aa /dev/sdc1: 2 bytes were erased at offset 0x00000438 (ext4): 53 ef /dev/sdc: calling ioctl to re-read partition table: Success The patch also adds a small delay before the re-read ioctl call. It's not elegant, but without the usleep(25000) the first attempt returns EBUSY. Addresses: https://github.com/karelzak/util-linux/issues/598 Signed-off-by: Karel Zak misc-utils/wipefs.8 | 3 ++- misc-utils/wipefs.c | 60 +++++++++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 56 insertions(+), 7 deletions(-) commit 3b3f43748f55b1c17ad55beb9a6eb6be49a68c77 Author: Karel Zak Date: Mon Jun 11 11:14:56 2018 +0200 zramctl: (man) explain that --find is necessary Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1589148 Signed-off-by: Karel Zak sys-utils/zramctl.8 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit ddf287b4eccdf23e5364e20e9a461fa89ccddf48 Author: Karel Zak Date: Fri Jun 8 11:37:55 2018 +0200 blkzone: fix whole device detection Matias Bjørling wrote: The current detection code for chunk size assumes that the underlying device is a device that uses the minor device id as the partition id, and that the whole device has minor id 0. This is not true for example null_blk and nvme device drivers. Let's use sysfs_devno_to_wholedisk() to get whole-disk devno. Addresses: https://github.com/karelzak/util-linux/pull/646 Reported-by: Matias Bjørling matias.bjorling@wdc.com Signed-off-by: Karel Zak sys-utils/blkzone.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit c3f5a0f1d47dbc47f6d21da232d4eb1cfb7905db Author: Karel Zak Date: Thu Jun 7 12:05:08 2018 +0200 losetup: keep -f and mutually exclusive losetup tries to blindly use specified device as well as search for the first free device, the result is: # losetup /dev/loop1 -f /tmp/tfile_loop1 losetup: /dev/loop1: failed to set up loop device: Invalid argument fixed version: # losetup /dev/loop10 -f img losetup: unexpected arguments Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1566432 Signed-off-by: Karel Zak sys-utils/losetup.c | 3 +++ 1 file changed, 3 insertions(+) commit 2c4d86abdadab19be76abecb156da7f7dc284d81 Author: Karel Zak Date: Wed Jun 6 15:57:24 2018 +0200 agetty: keep c_iflags unmodified on --autologin agetty sets c_iflags according to interaction with serial line in get_logname(). For --autologin it does not read from the line, so we have no clue how to set the flags. The current behavior is to zeroize the flags. Unfortunately, it seems like bad idea, because the line may be already properly initialized by kernel (or systemd, etc.). The new behavior is not touch the flags on --autologin. Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1252764 Signed-off-by: Karel Zak term-utils/agetty.8 | 4 ++++ term-utils/agetty.c | 17 +++++++++++++---- 2 files changed, 17 insertions(+), 4 deletions(-) commit 641af90dce51926d0fdb6f3635296a9a12d986b6 Author: Karel Zak Date: Mon Jun 4 15:27:54 2018 +0200 tests: add empty column test Signed-off-by: Karel Zak tests/expected/column/table-empty-column | 1 + tests/ts/column/table | 4 ++++ 2 files changed, 5 insertions(+) commit a797704d5d7bed1f665c17e2bce1ed4028250e37 Author: Karel Zak Date: Mon Jun 4 15:20:28 2018 +0200 libsmartcols: don't print empty column The commit 0f9f927b6f62cb7f488fadfad76c4a5defdefe36 forces libsmartcols to use one byte as a minimal column width. This seems like a bug if the column is empty and without header. $ printf ':a:b\n' | column -t -s ':' -o ':' :a:b Fixed version: $ printf ':a:b\n' | column -t -s ':' -o ':' :a:b Reported-by: Sami Kerola Signed-off-by: Karel Zak libsmartcols/src/table_print.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 6691d53797ccc2e5ac840c5b1680fceaa23122db Author: Karel Zak Date: Fri Jun 1 14:07:53 2018 +0200 mount: keep MS_MOVE as flag The previous commit 4ebea84bb1ca6b0fa817588aba13de26c8d5e5a0 replaced all operations by strings, but it does not work for MS_MOVE as this operation is not supported in fstab by libmount. Signed-off-by: Karel Zak libmount/src/context.c | 5 ++++- sys-utils/mount.c | 8 ++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) commit 8d6de22499827c3280ff07875fc0744b3a454516 Author: Karel Zak Date: Fri Jun 1 12:29:14 2018 +0200 libmount: don't use MS_MGC_VAL magic in mount(2) syscall Specifying MS_MGC_VAL was required in kernel versions prior to 2.4, but since Linux 2.4 is no longer required and is ignored if specified The minimal kernel requirement for util-linux is Linux v2.6. Signed-off-by: Karel Zak libmount/src/context_mount.c | 2 -- libmount/src/context_umount.c | 2 +- libmount/src/libmount.h.in | 3 ++- 3 files changed, 3 insertions(+), 4 deletions(-) commit 816773b475900909d42c2c8282a6ac50252cac22 Author: Karel Zak Date: Fri Jun 1 12:16:19 2018 +0200 libmount: improve MS_REC usage libmount allows to split one library (mount(8)) call to multiple mount(2) syscalls, for example --rbind --make-rslave in this case we have to be careful with MS_REC because the flag is applied to multiple operations. # strace -e mount mount --rbind --make-rslave /mnt/A /mnt/B Old version: mount("/mnt/A", "/mnt/B", 0x13ecac0, MS_MGC_VAL|MS_BIND, NULL) = 0 mount("none", "/mnt/B", NULL, MS_REC|MS_SLAVE, NULL) = 0 Fixed version: mount("/mnt/A", "/mnt/B", 0x1f22ac0, MS_MGC_VAL|MS_BIND|MS_REC, NULL) = 0 mount("none", "/mnt/B", NULL, MS_REC|MS_SLAVE, NULL) = 0 Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1584443 Signed-off-by: Karel Zak libmount/src/context.c | 5 +++++ libmount/src/context_mount.c | 25 ++++++++++++++++++++++--- libmount/src/optstr.c | 9 ++++++--- 3 files changed, 33 insertions(+), 6 deletions(-) commit 4ebea84bb1ca6b0fa817588aba13de26c8d5e5a0 Author: Karel Zak Date: Fri Jun 1 12:11:03 2018 +0200 mount: use internally string to set move/bind operations It's better to inform libmount about operations by string than by flags, because for example "rbind,slave" cannot be specified by MS_REC|MS_BIND|MS_SLAVE. https://bugzilla.redhat.com/show_bug.cgi?id=1584443 Signed-off-by: Karel Zak sys-utils/mount.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit c0bdff9997d032e6be2bd89e89d3e06fa02a5c3f Author: Karel Zak Date: Tue May 29 10:06:00 2018 +0200 libmount: include sys/mount.h on Linux only Addresses: https://bugs.debian.org/cgi-bin/bugreport.cgi?att=1;bug=891812 Signed-off-by: Karel Zak libmount/src/libmount.h.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 989407d364b0201a7fa068abac3d05110aaeccb5 Author: Karel Zak Date: Tue May 29 09:49:59 2018 +0200 po: fix lsblk translation Reported-by: Rosberg Nascimento Freitas Rodrigues Signed-off-by: Karel Zak po/pt_BR.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e82b77e9696a6dada96a7f3ea3ec20a63e8e7b9e Author: Karel Zak Date: Mon May 28 15:46:28 2018 +0200 libmount: accept another flags on MS_REMOUNT|MS_BIND The current libmount MS_REMOUNT|MS_BIND support is restricted to MS_RDONLY (read-only bind mount). This is too restrictive as Linux kernel supports bind-remount for arbitrary VFS flags. After this update you can use # mount /dev/sdc1 /mnt/A # mount --bind -onosuid,noexec /mnt/A /mnt/B # findmnt /dev/sdc1 -oTARGET,SOURCE,FS-OPTIONS,VFS-OPTIONS TARGET SOURCE FS-OPTIONS VFS-OPTIONS /mnt/A /dev/sdc1 rw,stripe=512,data=ordered rw,relatime /mnt/B /dev/sdc1 rw,stripe=512,data=ordered rw,nosuid,noexec,relatime The "mount --bind" is composed from two syscalls of course (1st is bind, 2nd is bind,remount,nosuid,noexec). Addresses: https://github.com/karelzak/util-linux/issues/637 Signed-off-by: Karel Zak libmount/src/context_mount.c | 22 ++++++++-------------- libmount/src/mountP.h | 3 +++ sys-utils/mount.8 | 5 +++-- 3 files changed, 14 insertions(+), 16 deletions(-) commit 8d69fd437ac2c4c0e193c52bbb65f515d2f6f363 Author: Sami Kerola Date: Tue May 15 20:14:05 2018 +0100 mountpoint: simplify test condition [cppcheck] [sys-utils/mountpoint.c:79]: (style) Redundant condition: ctl->st.st_dev==pst.st_dev. 'A || (!A && B)' is equivalent to 'A || B' Signed-off-by: Sami Kerola sys-utils/mountpoint.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 33b2e30284c915e952968051d6bdba4bb282f87e Author: Sami Kerola Date: Sat May 12 22:45:58 2018 +0100 include/pt-mbr.h: fix integer overflow gcc -fsanitize=undefined gives following warning. include/pt-mbr.h:27:51: runtime error: left shift of 248 by 24 places cannot be represented in type 'int' It looks like char is converted internally to int before bit-shift, and that type overflows when char value is greater than 127. Following code snippet will show the effect what is stored when undefined behaviour happens. #include #include int main(int argc, unsigned char **argv) { char p[] = { 170, 170, 170, 170 }; unsigned int uint = p[3]; uint64_t res = 0; /* overflow */ res = p[0] | (p[1] << 8) | (p[2] << 16) | (p[3] << 24); printf("%" PRIu64 "\n", res); /* this is fine */ res = 0; res = p[0] | (p[1] << 8) | (p[2] << 16) | (uint << 24); printf("%" PRIu64 "\n", res); return 0; } I tested gcc 8.1.0, clang 6.0.0, and tcc 0.9.27 and they all printed the same values. $ ./a.out 18446744073709551530 4294967210 Because output is result of undefined behavior what is stored may change in future, and other compilers / version might do something different. In the case of what pt-mbr.h the destination data type size was commonly 32 bits in size, that truncated excess rubbish from bitshift. Needless to say that was not very robust code. Signed-off-by: Sami Kerola include/pt-mbr.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 1405658822ac6add648fa02b5c26c2e28617eab9 Author: Sami Kerola Date: Thu May 10 21:18:53 2018 +0100 nls: remove translation strings While looking earlier commit I noticed everything but formatting was removed from a message in namei.c file. That inspired me to look if there are more strings that does not need translation project attention. This change removes at least some of them, if not all. Reference: e19cc7b65b31c57f0fe9cb73c9afad5197796f82 Signed-off-by: Sami Kerola disk-utils/fdisk.c | 2 +- misc-utils/cal.c | 6 +++--- misc-utils/namei.c | 2 +- sys-utils/mount.c | 2 +- sys-utils/umount.c | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) commit faa44b6d9aa1449db5f1161930a1d914566b6f61 Author: Sami Kerola Date: Thu May 10 21:02:00 2018 +0100 bash-completion: add swapon specifiers to completion No space after device name is not entirely right, but that's better than missing argument completions. Signed-off-by: Sami Kerola bash-completion/swapon | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) commit 25ed963d021c3db1d8a07c0a548b595047bdeb96 Author: Sami Kerola Date: Wed May 9 21:54:22 2018 +0100 rev: move a global variable to local scope Mark also file names read-only. Signed-off-by: Sami Kerola text-utils/rev.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 4520caa11e52999e40a208d4926952a28169a5f1 Author: Sami Kerola Date: Fri May 4 20:38:03 2018 +0100 tests: move stderr redirection out from test expression Fix shellcheck error. if ! [ "$paraller_jobs" -ge 0 2>/dev/null ]; then ^-- SC1009: The mentioned parser error was in this if expression. ^-- SC1073: Couldn't parse this test expression. ^-- SC1072: Expected test to end here (don't wrap commands in []/[[]]). Fix any mentioned problems and try again. Signed-off-by: Sami Kerola tests/run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 64af1a29871e116ebf825fe8d4dbf1c1c73ce4a8 Author: Karel Zak Date: Mon May 28 12:30:34 2018 +0200 lib/strutils: fix strnlen() fallback Addresses: https://github.com/karelzak/util-linux/issues/643 Signed-off-by: Karel Zak lib/strutils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5ac0b2699411acd952189f6532941bf5119b36d8 Merge: 3abbd0814 4c837d4ff Author: Karel Zak Date: Mon May 28 09:58:19 2018 +0200 Merge branch 'master' of https://github.com/pali/util-linux * 'master' of https://github.com/pali/util-linux: libblkid: udf: Fix reporting UDF 2.60 revision commit 3abbd0814cf479f709a2da5822a215db69c5a6d0 Author: Karel Zak Date: Fri May 25 21:02:23 2018 +0200 libblkid: (ntfs) fix cluster size check Addresses: https://github.com/karelzak/util-linux/issues/641 Signed-off-by: Karel Zak libblkid/src/superblocks/ntfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4c837d4ffe43c5378da683b8fc63e17eb3afcf46 Author: Pali Rohár Date: Fri May 25 17:52:31 2018 +0200 libblkid: udf: Fix reporting UDF 2.60 revision According to the UDF 2.60 specification, the Minimum UDF Read Revision value shall be at most #0250 for all media with a UDF 2.60 file system. So in this case use Minimum UDF Write Revision as ID_FS_VERSION to distinguish between UDF 2.50 and UDF 2.60 discs. This commit also adds a testing Blu-Ray Recordable image with UDF revision 2.60 created by Nero which really sets Minimum UDF Read Revision to 2.50. Signed-off-by: Pali Rohár libblkid/src/superblocks/udf.c | 10 ++++++++++ tests/expected/blkid/low-probe-udf-bdr-2.60-nero | 10 ++++++++++ tests/ts/blkid/images-fs/udf-bdr-2.60-nero.img.xz | Bin 0 -> 1956 bytes 3 files changed, 20 insertions(+) commit 7816ee22d596a8d406add0ee50c8aefd192ceb11 Author: Karel Zak Date: Fri May 25 13:53:03 2018 +0200 libblkid: (ntfs) enlarge cluster limit to 2MB Windows 10 Creators edition has extended the ntfs cluster limit to 2MB. As a consequence blkid does not identify recent partitions with clusters beyond 65K as ntfs ones. Addresses: https://github.com/karelzak/util-linux/issues/641 Signed-off-by: Karel Zak Co-Author: Jean-Pierre André libblkid/src/superblocks/ntfs.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 333423163be2dd66c8b5b1f7a3faf68bbfcb9bce Author: Ruediger Meier Date: Thu May 24 15:52:01 2018 +0200 cfdisk: fix compiler warnings, follow-up 7085f1e4 (#636) Seen on OSX 10.13, xcode 9.3. disk-utils/cfdisk.c:1860:45: error: format specifies type 'uintmax_t' (aka 'unsigned long') but the argument has type 'uint64_t' (aka 'unsigned long long') [-Werror,-Wformat] DBG(UI, ul_debug("get_size (default=%ju)", *res)); ~~~ ^~~~ %llu disk-utils/cfdisk.c:267:60: note: expanded from macro 'DBG' #define DBG(m, x) __UL_DBG(cfdisk, CFDISK_DEBUG_, m, x) ^ ./include/debug.h:67:4: note: expanded from macro '__UL_DBG' x; \ ^ disk-utils/cfdisk.c:1889:25: error: incompatible pointer types passing 'uint64_t *' (aka 'unsigned long long *') to parameter of type 'uintmax_t *' (aka 'unsigned long *') [-Werror,-Wincompatible-pointer-types] rc = parse_size(buf, &user, &pwr); /* parse */ ^~~~~ ./include/strutils.h:15:51: note: passing argument to parameter 'res' here extern int parse_size(const char *str, uintmax_t *res, int *power); ^ 2 errors generated. Signed-off-by: Ruediger Meier disk-utils/cfdisk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7085f1e49b0a2a670ba068705da6084d19a41a5a Author: Karel Zak Date: Thu May 24 09:19:28 2018 +0200 cfdisk: use uint64_t to avoid compiler warnings Reported-by: Ruediger Meier Signed-off-by: Karel Zak disk-utils/cfdisk.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit fa7709dbadc94e7b183c64a03954ba079b50fe56 Author: Karel Zak Date: Wed May 23 16:44:42 2018 +0200 lslogins: add -o+ support Signed-off-by: Karel Zak login-utils/lslogins.1 | 4 +++- login-utils/lslogins.c | 33 +++++++++++++++++---------------- 2 files changed, 20 insertions(+), 17 deletions(-) commit bb3d3fd90558df51c383c53667d62a59f085bd31 Author: Karel Zak Date: Wed May 23 16:32:32 2018 +0200 lslogins: add PWD-METHOD column Signed-off-by: Karel Zak login-utils/lslogins.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) commit 214fbec40abf0432b8e7968f05024ee76d11b3c7 Author: Karel Zak Date: Wed May 23 12:43:26 2018 +0200 lslogins: fix password verification Let's follow the standard $id$salt$encrypted password format in verification code. The current code is useless and for example PWD-LOCK column is always FALSE. Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1581611 Signed-off-by: Karel Zak login-utils/lslogins.c | 78 +++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 74 insertions(+), 4 deletions(-) commit 3fe5e8ec09573dc3ef68bb040e08fcb82bd568fc Author: Bjarni Ingi Gislason Date: Sat May 19 00:09:56 2018 +0000 man: Change the only argument to two for the two-fonts macros Punctuation marks have been left in the only argument of two-fonts macros, instead of being separated from it to make the second one. Signed-off-by: Bjarni Ingi Gislason login-utils/chfn.1 | 4 ++-- login-utils/chsh.1 | 2 +- misc-utils/mcookie.1 | 2 +- term-utils/setterm.1 | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) commit 244b7991c37e6561a563cf98afd61c720899d721 Author: Bjarni Ingi Gislason Date: Sat May 19 00:08:50 2018 +0000 man: choom.1: Use the correct macro for the font change of one argument Use the correct macro "I" for one argument, instead of the two-fonts macro "IR". Signed-off-by: Bjarni Ingi Gislason sys-utils/choom.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0bb7e904d72213b29f890364e25796685ee377f4 Author: Bjarni Ingi Gislason Date: Fri May 18 19:21:42 2018 +0000 man: Use the correct macro for a font change of one argument Use the correct macro (I, B) for the font change of one argument, not those that are used for alternating two fonts, like "BR", "IR", "RB", or "RI". Signed-off-by: Bjarni Ingi Gislason disk-utils/fsck.8 | 2 +- disk-utils/partx.8 | 4 ++-- disk-utils/sfdisk.8 | 2 +- login-utils/last.1 | 2 +- login-utils/login.1 | 18 +++++++++--------- login-utils/su.1 | 4 ++-- misc-utils/cal.1 | 2 +- misc-utils/findfs.8 | 6 +++--- misc-utils/findmnt.8 | 30 +++++++++++++++--------------- misc-utils/kill.1 | 10 +++++----- misc-utils/logger.1 | 2 +- misc-utils/lsblk.8 | 2 +- misc-utils/rename.1 | 4 ++-- misc-utils/whereis.1 | 6 +++--- misc-utils/wipefs.8 | 12 ++++++------ schedutils/chrt.1 | 8 ++++---- schedutils/taskset.1 | 14 +++++++------- sys-utils/chcpu.8 | 6 +++--- sys-utils/chmem.8 | 6 +++--- sys-utils/choom.1 | 14 +++++++------- sys-utils/dmesg.1 | 2 +- sys-utils/flock.1 | 4 ++-- sys-utils/fsfreeze.8 | 2 +- sys-utils/mount.8 | 20 ++++++++++---------- sys-utils/nsenter.1 | 18 +++++++++--------- sys-utils/setpriv.1 | 8 ++++---- sys-utils/swapon.8 | 6 +++--- sys-utils/unshare.1 | 28 ++++++++++++++-------------- term-utils/setterm.1 | 2 +- text-utils/column.1 | 6 +++--- text-utils/hexdump.1 | 2 +- 31 files changed, 126 insertions(+), 126 deletions(-) commit a8f98304e6d2f4627ca31f6c661934c92b1095f7 Author: Sami Kerola Date: Thu Apr 19 22:46:27 2018 +0100 more: reorder global declarations Group include, defines and such together, and move items inbetween functions on top of the source file so that everything can be seen easily. Signed-off-by: Sami Kerola text-utils/more.c | 96 +++++++++++++++++++++++++++---------------------------- 1 file changed, 48 insertions(+), 48 deletions(-) commit f16ca88d9c3dbfb395cfe3efdba0be9ff996ce7f Author: Sami Kerola Date: Thu Apr 19 22:46:26 2018 +0100 more: remove function prototypes Signed-off-by: Sami Kerola text-utils/more.c | 2482 ++++++++++++++++++++++++++--------------------------- 1 file changed, 1226 insertions(+), 1256 deletions(-) commit 03d190ad9e34c19ee11340293dbeca3ec49c0e50 Author: Karel Zak Date: Thu May 17 12:42:16 2018 +0200 lsns: remove unnecessary include Signed-off-by: Karel Zak sys-utils/lsns.c | 1 - 1 file changed, 1 deletion(-) commit aafa27c1ff835165216cfaba18581b8cda0db7cd Author: Ruediger Meier Date: Wed May 16 12:37:17 2018 +0200 script: fix printf format specifiers Noticed on 32bit builds. Types changed in 0da73643. Signed-off-by: Ruediger Meier term-utils/script.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3d15a5e852fc0d0dca5ae11cc65476fbc526af32 Author: Karel Zak Date: Tue May 15 10:51:15 2018 +0200 lsblk: fix notes about RAM disks Signed-off-by: Karel Zak misc-utils/lsblk.8 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b9dd5721fce5d5a5ff740a7e96b09092dbae429f Author: Karel Zak Date: Tue May 15 10:29:22 2018 +0200 lsblk: don't exclude RAM disks on --all Reported-by: Milan Broz Signed-off-by: Karel Zak misc-utils/lsblk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8a69ad47b8b1164ac38d4c70800752a520b8871c Author: Karel Zak Date: Mon May 14 13:59:52 2018 +0200 iscript: s/COLS/COLUMNS/ in start message Signed-off-by: Karel Zak term-utils/script.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aa4e132f57ccad632bfbd260c4134069124641a7 Author: Karel Zak Date: Mon May 14 13:54:23 2018 +0200 tests: update script done messages Signed-off-by: Karel Zak tests/expected/script/options-append | 4 ++-- tests/expected/script/options-force | 4 ++-- tests/expected/script/options-quiet | 4 ++-- tests/expected/script/options-return | 8 ++++---- tests/expected/script/options-size | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) commit 6343ee8c10a8302740b2b8ef208c27846f7ae16f Author: Karel Zak Date: Mon May 14 13:51:01 2018 +0200 script: record exit code Signed-off-by: Karel Zak Documentation/TODO | 2 -- term-utils/script.1 | 3 ++- term-utils/script.c | 53 ++++++++++++++++++++++++++++++++++++----------------- 3 files changed, 38 insertions(+), 20 deletions(-) commit 400c1c574bb311789d60ee4b975eeb8c3dab761b Author: Karel Zak Date: Mon May 14 12:57:39 2018 +0200 tests: update script headers Signed-off-by: Karel Zak tests/expected/script/options-append | 4 ++-- tests/expected/script/options-force | 4 ++-- tests/expected/script/options-quiet | 4 ++-- tests/expected/script/options-return | 8 ++++---- tests/expected/script/options-size | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) commit 4d9b788d64c8f9de8cb28e541d53676f26386f3a Author: Karel Zak Date: Mon May 14 12:51:50 2018 +0200 script: add more info to script header This patch introduces [...] to store extra information about terminal to the typescript header. For example: Script started on 2018-05-14 12:52:32+02:00 [TERM="xterm-256color" TTY="/dev/pts/3" COLS="190" LINES="53"] or Script started on 2018-05-14 12:54:01+02:00 [] if stdout is not terminal. Addresses: https://github.com/karelzak/util-linux/issues/583 Signed-off-by: Karel Zak Documentation/TODO | 6 ------ include/ttyutils.h | 1 + lib/ttyutils.c | 7 +++++++ term-utils/script.c | 38 +++++++++++++++++++++++++++++++++----- 4 files changed, 41 insertions(+), 11 deletions(-) commit c068922a68f7c8965511df8cdc378138f46d7011 Author: Karel Zak Date: Mon May 14 12:05:20 2018 +0200 docs: add hint about script Signed-off-by: Karel Zak Documentation/TODO | 2 ++ 1 file changed, 2 insertions(+) commit 93df6a585eea73fb97789da3545ddd1a5772ff6e Author: Karel Zak Date: Mon May 14 12:01:15 2018 +0200 script: cleanup done timestamp message * always save "done" timestamp to typescript (use done() for this) * use FORMAT_TIMESTAMP_MAX as buffer size Signed-off-by: Karel Zak term-utils/script.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 4dfdb1b14376f66e18bab327fcb843ede7470a60 Author: Karel Zak Date: Mon May 14 11:56:46 2018 +0200 tests: remove debug stuff from ts/script/options Signed-off-by: Karel Zak tests/ts/script/options | 1 - 1 file changed, 1 deletion(-) commit 0da73643b539294a9f89507a1bd088ba64d7eb07 Author: Karel Zak Date: Mon May 14 11:35:37 2018 +0200 script: use uint64_t for file sizes Signed-off-by: Karel Zak term-utils/script.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit aefe9893385f05c40ae44a6b9e782cf96751e4dd Author: Fred Mora Date: Mon May 14 11:20:06 2018 +0200 script: add the -o/--output-limit option. Fix race test. When script is used on a host with a relatively small free disk space, it is sometimes desirable to limit the size of the captured output. This can now be enforced with the --output-limit option. The --output-limit option lets the user specify a maximum size. The program uses the size parsing from strutils and thus supports the usual multiplicative suffixes (kiB, KB, MiB, MB, etc.). After the specified number of bytes have been written to the output file, the script program will terminate the child process. Due to buffering, the size of the output file might exceed the specified limit. This limit also does not include the start and done messages. The race test was throwing an error dur to a variable being "" in some cases. Quoting the variable in the equal test took care of that test. [kzak@redhat.com: - use done() to stop script - count also timing file - remove unnamed member initialization in ctl struct - add to bash-completion] Signed-off-by: Fred Mora Signed-off-by: Karel Zak bash-completion/script | 1 + term-utils/script.1 | 13 +++++++++++++ term-utils/script.c | 33 +++++++++++++++++++++++++++------ tests/expected/script/options-size | 9 +++++++++ tests/ts/script/options | 7 +++++++ tests/ts/script/race | 2 +- 6 files changed, 58 insertions(+), 7 deletions(-) commit 4c9afd6e53f3cf632ee6234cc331200cc4becc67 Author: Karel Zak Date: Fri May 11 10:50:19 2018 +0200 bash-completion: add findmnt --real --pseudo Signed-off-by: Karel Zak bash-completion/findmnt | 2 ++ 1 file changed, 2 insertions(+) commit 0bff4e134e5dfa032ee9a27af307ed49f8acbff1 Author: sluidfoe Date: Thu May 10 11:53:03 2018 -0500 misc-utils/findmnt.8: add --pseudo and --real options misc-utils/findmnt.8 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit f920bfd5a81f8e553311d6d0d2930459f4248e4e Author: sluidfoe Date: Tue May 8 13:10:06 2018 -0500 misc-tools/findmnt: a few whitespace fixes misc-utils/findmnt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 4c856a471ecc75095b63861d37f2dd4daebbb571 Author: sluidfoe Date: Tue May 8 13:08:47 2018 -0500 misc-tools/findmnt: add --pseudo, --real filters misc-utils/findmnt.c | 21 ++++++++++++++++++++- misc-utils/findmnt.h | 2 ++ 2 files changed, 22 insertions(+), 1 deletion(-) commit c9fdebcf540147fe3108971fc9c80d505867f711 Merge: 0a6241933 2e7ccec7b Author: Karel Zak Date: Thu May 10 12:15:32 2018 +0200 Merge branch 'output-all' of https://github.com/kerolasa/lelux-utiliteetit * 'output-all' of https://github.com/kerolasa/lelux-utiliteetit: zramctl: add --output-all option swapon: add --output-all option rfkill: add --output-all option partx: add --output-all option lsns: add --output-all option lsmem: add --output-all option lslogins: add --output-all option lslocks: add --output-all option lscpu: add --output-all option losetup: add --output-all option findmnt: add --output-all option commit 0a62419336f6765a82d88c402a5d029c577246d2 Merge: 607274943 bb09ebfe5 Author: Karel Zak Date: Thu May 10 11:59:41 2018 +0200 Merge branch 'fixes' of https://github.com/yontalcar/util-linux * 'fixes' of https://github.com/yontalcar/util-linux: libfdisk: fix list_del after partition reset choom: set oom_score_adj before exec fdisk: fix typo in debug string commit 607274943bfd3d4856b872bc4278b36903fb2182 Author: Stanislav Brabec Date: Wed May 9 22:13:07 2018 +0200 chcpu: Fix maximal number of CPUs chcpu.c mixed maxcpus (number of cpus) and setsize (size of CPU bit mask). It effectively limits number of CPUs to 1/8 of the supported amount. Signed-off-by: Stanislav Brabec Cc: Michael Matz Cc: Heiko Carstens sys-utils/chcpu.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 538b50cb0a4aac56b6b3b6e4d1e8ce886854c6d8 Author: Stanislav Brabec Date: Wed May 9 18:08:32 2018 +0200 lscpu, chcpu: Avoid use of the old CPU macros The old CPU macros are limited to 1024 cores. As a result, lscpu cannot count sockets on large systems. Use new scalable macros. Signed-off-by: Stanislav Brabec Cc: Michael Matz sys-utils/chcpu.c | 6 +++--- sys-utils/lscpu.c | 13 +++++++++---- 2 files changed, 12 insertions(+), 7 deletions(-) commit e4077e0e445ddc8d81e4fbab599655bb48ac130a Author: Sami Kerola Date: Thu May 3 22:57:59 2018 +0100 last: fix false positive compiler warning login-utils/last.c: In function ‘list’: login-utils/last.c:398:36: warning: argument to ‘sizeof’ in ‘strncat’ call is the same expression as the source; did you mean to use the size of the destination? [-Wsizeof-pointer-memaccess] strncat(utline, p->ut_line, sizeof(p->ut_line)); The sizeof(utline) is defined as sizeof(p->ut_line) + 1, so the compiler got that wrong. Lets truncate strncat() otherway around to keep gcc 8.1 happy. Signed-off-by: Sami Kerola login-utils/last.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8fd27bec0c5cb5ade55cf0a9d606aa1dbeeed95f Author: Sami Kerola Date: Thu May 3 22:57:58 2018 +0100 zramctl: fix truncation warning sys-utils/zramctl.c: In function ‘zram_get_sysfs’: sys-utils/zramctl.c:220:52: warning: ‘%s’ directive output may be truncated writing up to 4095 bytes into a region of size 27 [-Wformat-truncation=] snprintf(z->devname, sizeof(z->devname), "/dev/%s", name); As an additional good thing zramctl will no longer allocate 4096 bytes from stack when just 23 bytes is enough. [kzak@redhat.com: - use macro rather than hardcoded string for the path] Signed-off-by: Sami Kerola Signed-off-by: Karel Zak sys-utils/zramctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bf99940f649959fcc73590c043d28b1ab0d83e1c Author: Sami Kerola Date: Thu May 3 22:57:57 2018 +0100 lib/canonicalize: fix truncation warning lib/canonicalize.c: In function ‘canonicalize_dm_name’: lib/canonicalize.c:42:45: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 244 [-Wformat-truncation=] snprintf(path, sizeof(path), "/dev/mapper/%s", name); Notice that this warnign fix does not improve code enormously. The earlier snprintf() truncation will not happen a bit earlier when fgets() is called. In that sense this change merely makes one easy to silence warning to disappear, and therefore improve change of noticing useful messaging as such crops up. [kzak@redhat.com: - use macro rather than hardcoded string for mapper path] Signed-off-by: Sami Kerola Signed-off-by: Karel Zak include/pathnames.h | 2 ++ lib/canonicalize.c | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) commit bb09ebfe5480640394d184807b24980fb1b0267a Author: Vaclav Dolezal Date: Wed May 9 16:35:38 2018 +0200 libfdisk: fix list_del after partition reset Signed-off-by: Vaclav Dolezal libfdisk/src/partition.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 106876b953f2a6f627e03e7e0218bd67c35ac78c Author: Vaclav Dolezal Date: Tue Apr 17 19:03:17 2018 +0200 choom: set oom_score_adj before exec Signed-off-by: Vaclav Dolezal sys-utils/choom.c | 2 ++ 1 file changed, 2 insertions(+) commit 36787f7a97c6797ffbd3905427f61f90eed30d56 Author: Vaclav Dolezal Date: Tue Aug 29 15:29:27 2017 +0200 fdisk: fix typo in debug string Signed-off-by: Vaclav Dolezal disk-utils/fdisk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2e7ccec7bbad60fd01fb7ebed1e9b6373bd6d4cf Author: Sami Kerola Date: Tue Apr 24 22:18:54 2018 +0100 zramctl: add --output-all option Signed-off-by: Sami Kerola bash-completion/zramctl | 1 + sys-utils/zramctl.8 | 3 +++ sys-utils/zramctl.c | 11 ++++++++++- 3 files changed, 14 insertions(+), 1 deletion(-) commit b5b43f276e3ca7556ddf66f2d95cac8169af4355 Author: Sami Kerola Date: Tue Apr 24 21:59:23 2018 +0100 swapon: add --output-all option Signed-off-by: Sami Kerola bash-completion/swapon | 1 + sys-utils/swapon.8 | 3 +++ sys-utils/swapon.c | 8 +++++++- 3 files changed, 11 insertions(+), 1 deletion(-) commit 4dfd172dd8e42d060023440cfe5af9ab42b14464 Author: Sami Kerola Date: Tue Apr 24 21:47:26 2018 +0100 rfkill: add --output-all option Signed-off-by: Sami Kerola bash-completion/rfkill | 1 + sys-utils/rfkill.8 | 3 +++ sys-utils/rfkill.c | 12 +++++++++++- 3 files changed, 15 insertions(+), 1 deletion(-) commit ba1c9075f4525ef27bcfe98dfeca95b749276a9e Author: Sami Kerola Date: Tue Apr 24 21:32:42 2018 +0100 partx: add --output-all option Signed-off-by: Sami Kerola bash-completion/partx | 1 + disk-utils/partx.8 | 3 +++ disk-utils/partx.c | 9 ++++++++- 3 files changed, 12 insertions(+), 1 deletion(-) commit 1f7b62e0b277a54b2f1e90fafdd11cc37bc74d23 Author: Sami Kerola Date: Tue Apr 24 21:27:04 2018 +0100 lsns: add --output-all option Signed-off-by: Sami Kerola bash-completion/lsns | 1 + sys-utils/lsns.8 | 3 +++ sys-utils/lsns.c | 9 +++++++++ 3 files changed, 13 insertions(+) commit fcd4bbff87792a4cd917d132814a144078c99f4d Author: Sami Kerola Date: Tue Apr 24 21:26:39 2018 +0100 lsmem: add --output-all option Signed-off-by: Sami Kerola bash-completion/lsmem | 1 + sys-utils/lsmem.1 | 3 +++ sys-utils/lsmem.c | 9 ++++++++- 3 files changed, 12 insertions(+), 1 deletion(-) commit 2ab432effbdba067ae64b134050b192755fa0081 Author: Sami Kerola Date: Mon Apr 23 22:11:47 2018 +0100 lslogins: add --output-all option Signed-off-by: Sami Kerola bash-completion/lslogins | 1 + login-utils/lslogins.1 | 3 +++ login-utils/lslogins.c | 7 +++++++ 3 files changed, 11 insertions(+) commit 25d3c405343f20db5dfcb61334102bcfadc1d5bf Author: Sami Kerola Date: Mon Apr 23 22:02:48 2018 +0100 lslocks: add --output-all option Signed-off-by: Sami Kerola bash-completion/lslocks | 1 + misc-utils/lslocks.8 | 3 +++ misc-utils/lslocks.c | 9 +++++++++ 3 files changed, 13 insertions(+) commit fbf0619b2bf7d80fc667ecbb6bcd39758b2feb8d Author: Sami Kerola Date: Mon Apr 23 21:34:49 2018 +0100 lscpu: add --output-all option Signed-off-by: Sami Kerola bash-completion/lscpu | 1 + sys-utils/lscpu.1 | 4 ++++ sys-utils/lscpu.c | 11 +++++++++++ 3 files changed, 16 insertions(+) commit 289673b1c02374d4f7ae80bb1dd17aabd37d6b14 Author: Sami Kerola Date: Mon Apr 23 21:19:35 2018 +0100 losetup: add --output-all option Signed-off-by: Sami Kerola bash-completion/losetup | 1 + sys-utils/losetup.8 | 3 +++ sys-utils/losetup.c | 9 ++++++++- 3 files changed, 12 insertions(+), 1 deletion(-) commit 00147883de850f909b0c0594fd83a93a002271ac Author: Sami Kerola Date: Mon Apr 23 21:02:44 2018 +0100 findmnt: add --output-all option Signed-off-by: Sami Kerola bash-completion/findmnt | 1 + misc-utils/findmnt.8 | 5 +++++ misc-utils/findmnt.c | 12 +++++++++++- 3 files changed, 17 insertions(+), 1 deletion(-) commit 1c199a6e1571ea8f0630e25d05dcdc678f933caf Author: Sami Kerola Date: Thu Apr 26 21:44:08 2018 +0100 dmesg: link together with syslog(2) manual page The dmesg may require capabilities(7) when /proc/sys/kernel/dmesg_restrict has none zero value. This is explained in detail in syslog(2) manual page. Signed-off-by: Sami Kerola sys-utils/dmesg.1 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 01aec449f13482ad5dfe0be59dc3f69d7df2da70 Author: Karel Zak Date: Thu May 3 10:30:51 2018 +0200 libfdisk: fix compiler warning [-Wunused-parameter] Reported-by: L A Walsh Signed-off-by: Karel Zak libfdisk/src/bsd.c | 4 +--- libfdisk/src/dos.c | 4 +--- libfdisk/src/gpt.c | 4 +--- libfdisk/src/sgi.c | 4 +--- libfdisk/src/sun.c | 4 +--- 5 files changed, 5 insertions(+), 15 deletions(-) commit af8ed53ee16118baae4d871b1b1863d3a9ecb1f8 Author: Karel Zak Date: Thu May 3 10:30:51 2018 +0200 libmount: fix compiler warning [-Wunused-parameter] Reported-by: L A Walsh Signed-off-by: Karel Zak libmount/src/monitor.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 9a74f822719a1313af8be6bed29535240e14a411 Author: Karel Zak Date: Thu May 3 10:30:51 2018 +0200 libblkid: (zfs) fix compiler warning [-Wmaybe-uninitialized] Reported-by: L A Walsh Signed-off-by: Karel Zak libblkid/src/superblocks/zfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5653c982e84eb9ffa512ec175862fcf0a8f3fb1e Author: Karel Zak Date: Thu May 3 10:30:51 2018 +0200 fdisk: fix compiler warning [-Wmaybe-uninitialized] Reported-by: L A Walsh Signed-off-by: Karel Zak disk-utils/fdisk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 95a89bd3131cbce47055b5f1c15fb8c82a945502 Author: Karel Zak Date: Thu May 3 10:16:11 2018 +0200 build-sys: cleanup --with/--without help strings --with- means disabled by default or modify any default path --without- means enabled by default Reported-by: L A Walsh Signed-off-by: Karel Zak configure.ac | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 7a95313c31dcf95002dfb1d6e4fd8ed77c2adaf1 Author: Karel Zak Date: Thu May 3 09:56:35 2018 +0200 build-sys: --without-systemd disables --with-systemdsystemunitdir Make sure --without-systemd disables also --with-systemdsystemunitdir. Reported-by: L A Walsh Signed-off-by: Karel Zak configure.ac | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit a95ece2a9daf2a2f009c69630e3b39acdce3dadc Merge: fc402b8b7 b917eb46c Author: Karel Zak Date: Mon Apr 30 11:26:16 2018 +0200 Merge branch 'fix-pt_BR-trans' of https://github.com/luizluca/util-linux commit fc402b8b712d2cd17f58488fa35d64b25e226ae0 Author: Karel Zak Date: Mon Apr 30 10:52:53 2018 +0200 blkid: (man) add note about udev encoding Addresses: https://github.com/karelzak/util-linux/issues/632 Signed-off-by: Karel Zak misc-utils/blkid.8 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit bf2603c73a1096ff40f88e3709671be71b78bcee Author: Karel Zak Date: Mon Apr 30 09:41:26 2018 +0200 build-sys: extend "Could not locate the pkg-config" error message Addresses: https://github.com/karelzak/util-linux/issues/631 Signed-off-by: Karel Zak configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5ff48b5f364ee4775400a6c06b9248be715a89fc Author: Karel Zak Date: Mon Apr 30 09:37:14 2018 +0200 build-sys: improve bison version detection Addresses: https://github.com/karelzak/util-linux/issues/630 Signed-off-by: Karel Zak autogen.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f4375df0fd528dbf8eed72adb83f08308c0387b7 Author: Karel Zak Date: Thu Apr 26 11:04:07 2018 +0200 libmount: improve docs about mnt_context_mount() return codes Signed-off-by: Karel Zak libmount/src/context_mount.c | 34 +++++++++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) commit b917eb46c7d9f70a3acf2ce162f3d55fda71e97b Author: Luiz Angelo Daros de Luca Date: Tue Apr 24 14:40:02 2018 -0300 po: pt_BR: fix fallocate '-l' help msg Translation was using '-n' instead of '-l' Signed-off-by: Luiz Angelo Daros de Luca po/pt_BR.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 136f89ce5ed8cd159a1c56b5a775dada2363ecd3 Author: Karel Zak Date: Tue Apr 24 10:57:48 2018 +0200 libblkid: add BitLocker detection Supported: * WinVista version * Win7 and later versions (based on NTFS) * BitLockerToGo (for removable media; based on FAT32) Unfortunately, it's without LABEL and UUID. It seems BitLocker does not use volume_label and volume_serial stuff from NTFS header. Addresses: https://github.com/karelzak/util-linux/issues/617 Signed-off-by: Karel Zak libblkid/src/Makemodule.am | 1 + libblkid/src/superblocks/bitlocker.c | 191 +++++++++++++++++++++++++++++++++ libblkid/src/superblocks/superblocks.c | 1 + libblkid/src/superblocks/superblocks.h | 3 + libblkid/src/superblocks/vfat.c | 3 + 5 files changed, 199 insertions(+) commit 485241c0a33fcfad635d3eb7ae583bab972f30fa Merge: 031800ff6 5b95d7b63 Author: Karel Zak Date: Fri Apr 20 10:06:41 2018 +0200 Merge branch 'master' of https://github.com/pali/util-linux * 'master' of https://github.com/pali/util-linux: Update information about udf in mount manpage commit 031800ff6c66b4d62229cfd116195950a718a21c Author: Karel Zak Date: Fri Apr 20 09:50:04 2018 +0200 umount: add note about --lazy Unfortunately, it's pretty common that users on production systems use lazy umount to fix some FS issues. The usual result is unwanted system reboot, because -l is not the right way how to fix unreachable NFS or mess with local FS with submounts. Note that after lazy umount /proc/self/mountinfo does not contain the FS entry, but kernel still references the FS. It makes it very difficult to debug. Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1566674 Suggested-by: Steve Dickson Signed-off-by: Karel Zak sys-utils/umount.8 | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 5b95d7b63ceea1866e6c1d0a9d1c6fba2cbec545 Author: Pali Rohár Date: Thu Apr 19 17:22:49 2018 +0200 Update information about udf in mount manpage sys-utils/mount.8 | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) commit 2d6d789b3aaf449b74036b22917599df225d28f8 Author: Karel Zak Date: Wed Apr 18 16:08:15 2018 +0200 rfkill: use scols_column_set_json_type() Signed-off-by: Karel Zak sys-utils/rfkill.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 31b2534797bf439da176b08c8d35e362348cfbcb Author: Karel Zak Date: Wed Apr 18 16:03:52 2018 +0200 lsns: use scols_column_set_json_type() Signed-off-by: Karel Zak sys-utils/lsns.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 8941e5cbb8e5a73c0476b7dcbd04518ca33fa84a Author: Karel Zak Date: Wed Apr 18 15:51:17 2018 +0200 lsipc: cleanup columns[] usage Signed-off-by: Karel Zak sys-utils/lsipc.c | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) commit 46de0fe6e39af53f55838d9b414c8314430a0c54 Author: Karel Zak Date: Wed Apr 18 15:25:20 2018 +0200 losetup: use scols_column_set_json_type() Signed-off-by: Karel Zak sys-utils/losetup.c | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) commit a3571e1b976791d16a6442abf862e932c529b223 Author: Karel Zak Date: Wed Apr 18 15:12:46 2018 +0200 wipefs: use scols_column_set_json_type() Signed-off-by: Karel Zak misc-utils/wipefs.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit fffdff1e618cad3013130ea078e6f948990fd62f Author: Karel Zak Date: Wed Apr 18 15:07:31 2018 +0200 lslocks: use scols_column_set_json_type() Signed-off-by: Karel Zak misc-utils/lslocks.c | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) commit 51b0bcf01d1bdfe704e4fe91546f8bd52f416f6f Author: Karel Zak Date: Wed Apr 18 14:54:49 2018 +0200 lslocks: add --bytes cleanup SIZE usage The new command line option --bytes disables human readable output for the SIZE and keep size in bytes. We use the same concept for all our utils. Signed-off-by: Karel Zak misc-utils/lslocks.8 | 3 +++ misc-utils/lslocks.c | 23 ++++++++++++++++------- 2 files changed, 19 insertions(+), 7 deletions(-) commit 3a645e3658095e7e7dbdebbc938ddb85bbbc02bb Author: Karel Zak Date: Wed Apr 18 14:45:21 2018 +0200 findmnt: use scols_column_set_json_type() Signed-off-by: Karel Zak misc-utils/findmnt.c | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) commit 8945d9dc63ae0f2a3824d2d69b7979761b391a14 Author: Karel Zak Date: Wed Apr 18 14:32:39 2018 +0200 fincore: use scols_column_set_json_type() Signed-off-by: Karel Zak misc-utils/fincore.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) commit 7966cbba53890e1010861b75bd9923e793bbc975 Author: NeilBrown Date: Wed Apr 18 13:31:38 2018 +1000 libmount: fix mnt_table_is_fs_mounted() for NFS bind mounts. When you bind-mount a subdirectory of a local filesystem, the path to that subdirectory appears as the fourth field in mountinfo. For nfs mounts, the fourth field is always "/", and the subdirectory part is appended to the "special" (aka "device") field. This is consistent with historical NFS usage which always includes a path in the fs_spec field. libmount needs to know about this when "mount -a" checks to see if a filesystem is already mounted. Without this fix, fstab lines like: server::/path /dir nfs defaults 0 0 /dir/subdir /mnt/test none bind 0 0 result in a new mount at /mnt/test every time "mount -a" is run. [kzak@redhat.com: - use strappend() rather than asprintf()] Signed-off-by: NeilBrown Signed-off-by: Karel Zak libmount/src/tab.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit f958101d2ea55174f8cd584efe41d4cefa9578c6 Author: Richard Fuchs Date: Tue Apr 17 09:40:20 2018 -0400 bugfix: fix possible segfault during umount -a mnt_context_get_mtab() doesn't set its return **tb argument on error, and so in mnt_context_next_umount() mtab will remain uninitialized on error, later resulting in cxt->mtab containing garbage, possibly resulting in segfault on exit. libmount/src/context_umount.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 89f318625c1178abe1c886bee84ee0e25c1e5dc8 Author: Karel Zak Date: Mon Apr 16 13:48:11 2018 +0200 choom: fix build, remove unnecessary include Signed-off-by: Karel Zak sys-utils/Makemodule.am | 4 ++-- sys-utils/choom.c | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) commit 0dadc8bcf43d4ec563835df8ede2d14fb6bf4b61 Merge: d14c1c39d 8fa223dab Author: Karel Zak Date: Mon Apr 16 13:03:25 2018 +0200 Merge branch 'choom' commit 8fa223daba1963c34cc828075ce6773ff01fafe3 Author: Karel Zak Date: Mon Apr 16 12:53:39 2018 +0200 choom: new command to adjust OOM-killer score value Let's provide command line tool, man page with OOM description and bash-completion. It seems better than force end-users to use "echo" to /proc. Addresses: https://github.com/karelzak/util-linux/issues/609 Signed-off-by: Karel Zak .gitignore | 1 + Documentation/TODO | 5 -- bash-completion/choom | 29 ++++++++++ configure.ac | 4 ++ sys-utils/Makemodule.am | 7 +++ sys-utils/choom.1 | 82 ++++++++++++++++++++++++++ sys-utils/choom.c | 150 ++++++++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 273 insertions(+), 5 deletions(-) commit d14c1c39dd01edf08262e4f3bad3d777013ea91a Merge: 6ceb17c8a 7ac394f84 Author: Karel Zak Date: Mon Apr 16 10:37:31 2018 +0200 Merge branch 'rename-interactive' of https://github.com/g-raud/util-linux * 'rename-interactive' of https://github.com/g-raud/util-linux: rename: fixup & style (no functional changes) rename: test availability of __fpurge() and fpurge() rename: ask(): call __fpurge() to cater for multi-byte characters rename.1: describe interactive mode rename: ask(): print n when EOF on input rename: detect tty in cbreak mode to make ask() read a single byte rename.1: fix warning section rename: add option --interactive to ask before overwriting rename: skip faccessat() failure if AT_SYMLINK_NOFOLLOW is not a valid flag rename: check source file access early commit 6ceb17c8a758b05907a9ebc547beb293765d8ccf Author: Karel Zak Date: Mon Apr 16 10:27:29 2018 +0200 lslocks: fix memory leak Addresses: https://github.com/karelzak/util-linux/pull/618 Signed-off-by: Karel Zak misc-utils/lslocks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2aaf56c45f7603f7e24e99d1678e035a5cc50e10 Author: Karel Zak Date: Fri Apr 13 11:22:21 2018 +0200 lslocks: add info about OFD It seems users are confused by PID -1 and missing path. This patch add more information about OFD locks to the man page and "undefined" to the COMMAND column. References: http://austingroupbugs.net/view.php?id=768 Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1527102 Signed-off-by: Karel Zak misc-utils/lslocks.8 | 7 ++++++- misc-utils/lslocks.c | 11 +++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) commit 2b8ac985ba8a6e3aa374bdb5e3cf3268fc765609 Author: Karel Zak Date: Thu Apr 12 14:21:47 2018 +0200 libblkid: (hfs) check allocation size The current prober is based on signature only (two bytes!). It seems pretty fragile. Linux kernel also checks for allocation size in the superblock, let's use it too... it's better than nothing. Reported-by: Milan Broz Signed-off-by: Karel Zak libblkid/src/superblocks/hfs.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit dfd3bb8bc203177e180762d78d20f99b73847d6d Author: Karel Zak Date: Thu Apr 12 11:32:17 2018 +0200 lscpu: Cortex-A12 merged into Cortex-A17 References: https://community.arm.com/processors/b/blog/posts/arm-cortex-a17-cortex-a12-processor-update Signed-off-by: Karel Zak sys-utils/lscpu-arm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 74ccba3ed897ca08df5f38e62a76c63e3ad01435 Author: Patrick Steinhardt Date: Tue Apr 10 13:36:32 2018 +0100 rfkill: include instead of The POSIX standard states that poll(3P) is being made available by , not . Most commands already include the correct header, with the exception of rfkill. Fix that to avoid a warning on musl-based systems. Signed-off-by: Patrick Steinhardt sys-utils/rfkill.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cc6ab5efb13453cc8b5660ab268992e4861c73a7 Author: Patrick Steinhardt Date: Tue Apr 10 13:36:31 2018 +0100 cfdisk: fix missing prototype for `get_wch` The header defines the get_wch(3) function only when `NCURSES_WIDECHAR` is defined. This define is actually getting set in the same header file, but only in case `_XOPEN_SOURCE` is defined and has a value of 500 or higher. As we already have the precedence of defining `_XOPEN_SOURCE` to a value of 600 in some other files, simply define it to the minimum required value of 500 in "cfdisk.c". This silences a warning for `get_wch` being unknown. Signed-off-by: Patrick Steinhardt disk-utils/cfdisk.c | 4 ++++ 1 file changed, 4 insertions(+) commit 23f54ce77773aa77f578084f2212b9173827fdc1 Author: Patrick Steinhardt Date: Tue Apr 10 12:08:21 2018 +0100 setpriv: implement option to set parent death signal When a process uses the syscall `prctl(PR_SET_PDEATHSIG, ...)`, it will get notified with a process-defined signal as soon as its parent process dies. This is for example being used by unshare(1)'s recently added "--kill-child" option, causing the forked child to be killed as soon as unshare itself dies. Unfortunately, some LSMs will cause the parent death signal to be reset when a process changes credentials, with the most important ones being SELinux and AppArmor. The following command will thus not work as expected: unshare --fork --kill-child setpriv --reuid user As soon as setpriv changes UID, the parent death signal is cleared and the child will never get signalled when unshare gets killed. Add a new option "--pdeathsig keep|clear|". Setting this flag will cause us to either - restore the previously active parent death signal as soon as the setpriv has applied all credential changes - clear the parent death signal - set the parent death signal to "" Furthermore, print out the currently set signal when dumping process state. [kzak@redhat.com: - small changes in codding style] Signed-off-by: Patrick Steinhardt Signed-off-by: Karel Zak sys-utils/setpriv.1 | 6 ++++++ sys-utils/setpriv.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) commit 7ac394f84b3479723ffa6f235940fec0f4b29dac Author: G.raud Meyer Date: Mon Apr 9 14:44:52 2018 +0200 rename: fixup & style (no functional changes) misc-utils/rename.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 0dba6b6f195aceafd1afefc2c2515ce0d8c707ad Author: G.raud Meyer Date: Thu Apr 5 11:50:07 2018 +0200 rename: test availability of __fpurge() and fpurge() configure.ac | 2 ++ misc-utils/rename.c | 10 +++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) commit 33785dd33ceaa61386d3aa29d3cd550315e05edc Author: G.raud Meyer Date: Tue Apr 5 11:31:03 2011 +0200 rename: ask(): call __fpurge() to cater for multi-byte characters Making a purge in cbreak mode also makes the code compatible with canonical mode. This can be useful in the case a shell, like bash, does not restore the tty state of stopped jobs before restarting them. An alternative fix to this minor shortcoming would be to retest the tty state each time inside ask(). misc-utils/rename.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 16740b0c7aa947fd43c227cb57af7dc12647173c Author: G.raud Meyer Date: Mon Apr 2 15:32:44 2018 +0200 rename.1: describe interactive mode misc-utils/rename.1 | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 0cb2c653c323a2eff3fe3ef931482c0c77634420 Author: G.raud Meyer Date: Sat Mar 31 15:01:27 2018 +0200 rename: ask(): print n when EOF on input misc-utils/rename.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit f43bdedaa7334412aabefa62b8ae559b5b1d9e63 Author: G.raud Meyer Date: Thu Mar 29 12:08:46 2018 +0200 rename: detect tty in cbreak mode to make ask() read a single byte Set tty_cbreak only when tty has a VMIN of 1 to avoid having to purge at all in cbreak mode. The prompt is still compatible with a non interactive input from a pipe. misc-utils/rename.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit 961b094629bebc481b50067b032f10efeb7f8863 Author: G.raud Meyer Date: Sat Mar 24 12:20:58 2018 +0100 rename.1: fix warning section misc-utils/rename.1 | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit eb4aea8a4756be04655f31b286bc33b593f2689f Author: G.raud Meyer Date: Sat Mar 24 12:15:55 2018 +0100 rename: add option --interactive to ask before overwriting The option name -i/--interactive is picked from mv(1) and cp(1) from GNU and BSD. Also update the manpage. misc-utils/rename.1 | 3 +++ misc-utils/rename.c | 58 ++++++++++++++++++++++++++++++++++++++++++++--------- 2 files changed, 52 insertions(+), 9 deletions(-) commit 826538bf64c5a11b69167a19b70697e9e0481e43 Author: G.raud Meyer Date: Mon Apr 9 15:35:40 2018 +0200 rename: skip faccessat() failure if AT_SYMLINK_NOFOLLOW is not a valid flag AT_SYMLINK_NOFOLLOW is not required by POSIX and it is not a valid flag on Mac OSX. misc-utils/rename.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 5454df9c3110f7742500e5d2af1ea300924c0120 Author: G.raud Meyer Date: Thu Mar 29 13:28:10 2018 +0200 rename: check source file access early This change makes rename detect inexisting files given on the command line and consider them faliures. This is particularly useful with --no-act (to detect extraneous arguments). It also prevents skipping non existing files (when the modified name happens to exist). This makes --verbose not print skipping messages of false positives (the access error is printed instead). misc-utils/rename.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 20a480729791f59a4bac0fa5cadffeb4b832f0ec Author: Karel Zak Date: Mon Apr 9 14:08:23 2018 +0200 docs: update TODO (libblkid) Addresses: https://github.com/karelzak/util-linux/issues/617 Signed-off-by: Karel Zak Documentation/TODO | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 4e6bd9ad6a22c8b8b91cc99ca36689fef9bacd13 Author: Karel Zak Date: Mon Apr 9 13:14:25 2018 +0200 docs: update TODO (lsblk) * remove NVMe-multipath lsblk issue (already fixed by kernel) * add lsblk rewrite Signed-off-by: Karel Zak Documentation/TODO | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) commit b8ec0cb4f447e1c0ebd45cf744f364b5fac2314c Author: Karel Zak Date: Mon Apr 9 12:39:10 2018 +0200 mount: more notes about --options-* to man page Signed-off-by: Karel Zak sys-utils/mount.8 | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 815c202c937b300abc253d8e8fe908cb088a584f Merge: 3188ea9a9 9730aa40c Author: Karel Zak Date: Mon Apr 9 12:19:55 2018 +0200 Merge branch 'mount-omode' of https://github.com/yontalcar/util-linux * 'mount-omode' of https://github.com/yontalcar/util-linux: mount: use string_to_bitmask() mount(8): clarify behavior of --options-mode mount: document --options-* in man/help mount: added options exposing libmount's optsmode commit 3188ea9a9292604e537f06f11adddf474fc9e52d Author: Karel Zak Date: Mon Apr 9 12:11:36 2018 +0200 build: Add missing -lintl linkage to lib{smartcols,uuid} Addresses: https://github.com/karelzak/util-linux/pull/615 Signed-off-by: Karel Zak libsmartcols/src/Makemodule.am | 2 +- libuuid/src/Makemodule.am | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit e4c58e00a0e594994d13fde0a2b8d6a0df2437bb Merge: 6156e1297 0849ff366 Author: Karel Zak Date: Mon Apr 9 11:46:22 2018 +0200 Merge branch 'rename-fix-noact-without-nooverwrite' of https://github.com/g-raud/util-linux * 'rename-fix-noact-without-nooverwrite' of https://github.com/g-raud/util-linux: rename: prevent --no-act from setting --no-overwrite rename: when --no-overwrite skip verbosily only when --verbose rename: consolidate printing the symlink in addition to its target rename: fix/reverse the semantics of --no-overwrite in --symlink mode commit 6156e129728bfccb158653f9d53f79ab13df0183 Author: Karel Zak Date: Fri Apr 6 13:39:35 2018 +0200 tests: update sfdisk JSON output References: d881b773318dbd3f5ceb58a1e9a560fe0d1ac90a Signed-off-by: Karel Zak tests/expected/sfdisk/dos-write-json | 20 ++++++++++---------- tests/expected/sfdisk/gpt-write-json | 20 ++++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-) commit ac5ebb8cb8a01e7c81031ff212b9ee64cc2474da Author: Bjarni Ingi Gislason Date: Thu Mar 29 21:15:06 2018 +0000 misc-utils/getopt.1: minor corrections to the manual Input file is getopt.1 Test nr. 2: Enable and fix warnings from 'test-groff'. Input file is /tmp/getopt.1 :5 (macro BI): only 1 argument, but more are expected :419 (macro IR): only 1 argument, but more are expected :421 (macro IR): only 1 argument, but more are expected chk_manuals: Output is from: test-groff -b -e -mandoc -T utf8 -rF0 -t -w w -z and Test nr. 15: Change the name of a macro for two fonts (e.g., BR and IR) to one letter, if there is only one argument. Add the second argument if needed. It is sometimes part of the first one. 5:.BI getopt 419:.IR /usr/share/getopt/ 421:.IR /usr/share/doc/ ##### Test nr. 8: Protect a full stop (.) with "\&", if it has a blank (white-space) in front of or (ignoring transparent characters to the full stop) after it, and it does not mean an end of a sentence. 204:the next parameter (i.e. separated by whitespace on the command 219:or as the next argument (i.e. separated by whitespace on the command 352:(i.e. a parameter that does not start with a 379:will be parsed. It will still do parameter shuffling (i.e. all ##### Test nr. 20: Use a macro to change to the italic font, instead of \fI [1], if possible. The macros have the italic corrections, but "\c" removes them. [1] man-pages(7) 57:is set, or if the first \fIparameter\fR is not an option (does not start 144:Set quoting conventions to those of \fIshell\fR. ##### Test nr. 21: Use the word (in)valid instead of (il)legal if not related to legal matters. See "www.gnu.org/prep/standards". 25:check for legal options. It uses the ##### Test nr. 28: Wrong distance between sentences or protect the indicator. 1) Separate the sentences and subordinate clauses; each begins on a new line. See man-pages(7) and "info groff". Or 2) Adjust space between sentences (two spaces), 3) or protect the indicator by adding "\&" after it. The "indicator" is an "end-of-sentence character" (.!?). 204:the next parameter (i.e. separated by whitespace on the command 219:or as the next argument (i.e. separated by whitespace on the command 352:(i.e. a parameter that does not start with a 379:will be parsed. It will still do parameter shuffling (i.e. all Signed-off-by: Bjarni Ingi Gislason ##### misc-utils/getopt.1 | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) commit 9c56988af6ca5e7686acd9f0bd8d8bf4b704ec44 Author: Bjarni Ingi Gislason Date: Sat Mar 31 22:50:49 2018 +0000 sys-utils/fallocate.1: Some tidying of the manual Test nr. 2: Enable and fix warnings from 'test-groff'. Input file is /tmp/fallocate.1 :10 (macro IR): only 1 argument, but more are expected :24 (macro RB): only 1 argument, but more are expected :25 (macro IR): only 1 argument, but more are expected chk_manuals: Output is from: test-groff -b -e -mandoc -T utf8 -rF0 -t -w w -z and Test nr. 15: Change the name of a macro for two fonts (e.g., BR and IR) to one letter, if there is only one argument. Add the second argument if needed. It is sometimes part of the first one. 10:.IR length 24:.RB \-l 25:.IR length ##### Test nr. 12: Change -- in x--y to \(em (em-dash), or, if an option, to \-\- 65:You can think of this option as doing a "\fBcp --sparse\fP" and then renaming ##### Test nr. 20: Use a macro to change to the italic font, instead of \fI [1], if possible. The macros have the italic corrections, but "\c" removes them. [1] man-pages(7) 39:The \fIlength\fR and \fIoffset\fR 50:to be collapsed starts at \fIoffset\fP and continues 51:for \fIlength\fR bytes. At the completion of the operation, the contents of 52:the file starting at the location \fIoffset\fR+\fIlength\fR will be appended at the 53:location \fIoffset\fR, and the file will be \fIlength\fR bytes smaller. The option 71:Insert a hole of \fIlength\fR bytes from \fIoffset\fR, shifting existing data. 85:\fIoffset\fP and continuing for \fIlength\fR bytes. Within the 103:Zeroes space in the byte range starting at \fIoffset\fP and 104:continuing for \fIlength\fR bytes. Within the specified range, blocks are ##### Test nr. 27: Split lines longer than 80 characters into two or more lines. Apropriate break points are the end of a sentence and a subordinate clause. fallocate.1: line 45 length 86 fallocate.1: line 52 length 83 fallocate.1: line 53 length 83 fallocate.1: line 100 length 95 ##### Test nr. 28: Wrong distance between sentences or protect the indicator. 1) Separate the sentences and subordinate clauses; each begins on a new line. See man-pages(7) and "info groff". Or 2) Adjust space between sentences (two spaces), 3) or protect the indicator by adding "\&" after it. The "indicator" is an "end-of-sentence character" (.!?). 99:Enable POSIX operation mode. In that mode allocation operation always completes, ##### Test nr. 37: Have a space after a comma in an argument to an alternating fonts macro. The space belongs to the comma, so ', '. 48:.BR \-c , " \-\-collapse\-range" 58:.BR \-d , " \-\-dig\-holes" 70:.BR \-i , " \-\-insert\-range" 73:.BR \-l , " \-\-length " \fIlength 76:.BR \-n , " \-\-keep\-size" 80:.BR \-o , " \-\-offset " \fIoffset 83:.BR \-p , " \-\-punch\-hole" 95:.BR \-v , " \-\-verbose" 98:.BR \-x , " \-\-posix" 102:.BR \-z , " \-\-zero\-range" 119:.BR \-V , " \-\-version" 122:.BR \-h , " \-\-help" ##### Test nr. 38: Email addresses use the macro ".MT" and end with ".ME". 125:.UR sandeen@redhat.com 129:.UR kzak@redhat.com ##### Test nr. 40: Add a comma before "and", "or", or "nor" if a series contains three or more words 41:MiB (=1024*1024), and so on for GiB, TiB, PiB, EiB, ZiB and YiB (the "iB" is 43:KB (=1000), MB (=1000*1000), and so on for GB, TB, PB, EB, ZB and YB. 45:The options \fB\-\-collapse\-range\fP, \fB\-\-dig\-holes\fP, \fB\-\-punch\-hole\fP and ##### Signed-off-by: Bjarni Ingi Gislason sys-utils/fallocate.1 | 151 ++++++++++++++++++++++++++++++++------------------ 1 file changed, 98 insertions(+), 53 deletions(-) commit 27ea4deb93a15e701d1a1fd791f70677c579b947 Author: Sami Kerola Date: Thu Apr 5 20:56:56 2018 +0100 bash-completion: fix typo in blockdev file Signed-off-by: Sami Kerola bash-completion/blockdev | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ecfb5b267c46f4425abcdbec203447fa5e147bf2 Author: Sami Kerola Date: Thu Apr 5 20:56:55 2018 +0100 bash-completion: setpriv --securebits argument can be comma separated list Make the option argument suggestion to match with what is allowed. In same go tidy shell code a little bit. Signed-off-by: Sami Kerola bash-completion/setpriv | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) commit fda59a8d1999ddc51489a9e693959f375dc2e9e5 Author: Sami Kerola Date: Thu Apr 5 20:56:54 2018 +0100 bash-completion: do not print eject --cdspeed error messages Bash completion is proposing --cdspeed option argument from 'eject --listspeed /dev/cdrom' output. Nowadays it is common not to have such device, and this results to an unwanted error message to stderr merely messing up command line. Lets stop that. Signed-off-by: Sami Kerola bash-completion/eject | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c6f0bdfecc7b1bbadc644eb8f625473c34fe7cae Author: Sami Kerola Date: Thu Apr 5 20:56:53 2018 +0100 bash-completion: fix few bash set -u issues This is the same fix as in reference commit, and the same reason. Just correct few files missed earlier. Reference: abbcec4fc9c8d7fb835b4eafd1bc9d82acbf0056 Signed-off-by: Sami Kerola bash-completion/chcpu | 4 ++-- bash-completion/lsblk | 10 +++++----- bash-completion/lscpu | 2 +- bash-completion/lslogins | 2 +- bash-completion/lsns | 2 +- bash-completion/mount | 2 +- bash-completion/setpriv | 2 +- bash-completion/taskset | 2 +- 8 files changed, 13 insertions(+), 13 deletions(-) commit 7afdbb6f0760952c6e4f86d4c73442d1caee96a8 Author: Karel Zak Date: Fri Apr 6 12:53:18 2018 +0200 fstrim: Return EXIT_FAILURE when FTRIM ioctl fails commit 36c370cbf1481aa8724dff8b7b7fec4a8ba9930b adds fstrim_filesystem() that return -1 or 1 depending on the FTRIM ioctl failures. The fstrim_filesystem() return codes should not be used as exit codes. Reported-by: Gwendal Grignou Signed-off-by: Karel Zak sys-utils/fstrim.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) commit 6963338ca586bef3370e189f13785b4b6b63bbdb Author: Karel Zak Date: Thu Apr 5 15:59:59 2018 +0200 dmesg: fix raw output The commit 5f538ac40c0d215b6c9a881effe4c3b214366715 has introduced regression ("goto" to the wrong place, so timestamps in raw mode is not printed at all). Addresses: https://github.com/karelzak/util-linux/issues/614 Signed-off-by: Karel Zak sys-utils/dmesg.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit d881b773318dbd3f5ceb58a1e9a560fe0d1ac90a Author: Karel Zak Date: Thu Apr 5 12:38:22 2018 +0200 libfdisk: improve JSON output * use fputs_quoted_json() for all data * fix use of variables separator Signed-off-by: Karel Zak libfdisk/src/script.c | 70 +++++++++++++++++++++++++++++++++++---------------- 1 file changed, 48 insertions(+), 22 deletions(-) commit 704f9ba6e6f27c17e544987ec0e2c93fc08d512a Author: Karel Zak Date: Thu Apr 5 11:54:57 2018 +0200 lsmem: improve JSON output Signed-off-by: Karel Zak sys-utils/lsmem.c | 22 ++++++++++++- tests/expected/lsmem/lsmem-s390-zvm-6g | 46 +++++++++++++------------- tests/expected/lsmem/lsmem-x86_64-16g | 60 +++++++++++++++++----------------- 3 files changed, 74 insertions(+), 54 deletions(-) commit de306264958bac8c9ec908172636ca62bc893861 Author: Karel Zak Date: Thu Apr 5 12:12:25 2018 +0200 libsmartcols: make sure boolean is true/false only .. and never "null". Signed-off-by: Karel Zak libsmartcols/src/table_print.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 92368ce179bf31623120aa6f06d4d25bc84b7491 Author: Karel Zak Date: Thu Apr 5 12:02:33 2018 +0200 lsmem: make output more compatible with another utils We do not use placeholders (e.g. "-") for missing data in libsmartcols utils, just use empty space in output. Signed-off-by: Karel Zak sys-utils/lsmem.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 93c2a8b275aaa478bf6922cb2a453c4bb2b622ed Author: Karel Zak Date: Thu Apr 5 11:44:27 2018 +0200 lsmem: remove unused variable Signed-off-by: Karel Zak sys-utils/lsmem.c | 2 -- 1 file changed, 2 deletions(-) commit a40c12837f1dc0713b68da0b3724da40b3aea5bc Author: Karel Zak Date: Wed Apr 4 14:22:04 2018 +0200 tests: update JSON outputs It does not contains extra space after ":" separator anymore. Signed-off-by: Karel Zak tests/expected/libsmartcols/fromfile-tree-json | 20 ++++----- tests/expected/lsmem/lsmem-s390-zvm-6g | 20 ++++----- tests/expected/lsmem/lsmem-x86_64-16g | 60 +++++++++++++------------- 3 files changed, 50 insertions(+), 50 deletions(-) commit 407e0ea6198dc7c7e3c659ac16f610e2accdef11 Author: Karel Zak Date: Tue Apr 3 15:10:21 2018 +0200 lsblk: consolidate column types for JSON and qsort() Signed-off-by: Karel Zak misc-utils/lsblk.c | 71 ++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 47 insertions(+), 24 deletions(-) commit b2c871f97844f6be248a417c2482d0665edc0cfe Author: Karel Zak Date: Tue Apr 3 15:08:40 2018 +0200 libsmartcols: improve JSON support (add types) This commit add SCOLS_JSON_{NUMBER,STRING,BOOLEAN} to specify column type for JSON output formatting. Signed-off-by: Karel Zak Documentation/TODO | 7 ------ libsmartcols/docs/libsmartcols-sections.txt | 2 ++ libsmartcols/src/column.c | 38 +++++++++++++++++++++++++++++ libsmartcols/src/libsmartcols.h.in | 12 +++++++++ libsmartcols/src/libsmartcols.sym | 6 +++++ libsmartcols/src/smartcolsP.h | 2 ++ libsmartcols/src/table_print.c | 18 +++++++++++--- 7 files changed, 75 insertions(+), 10 deletions(-) commit 0849ff36605588a7ab7892ab2aae59d73290e225 Author: G.raud Meyer Date: Thu Mar 29 12:58:44 2018 +0200 rename: prevent --no-act from setting --no-overwrite This fixes a bug introduced by commit fabb90676 ("Added --no-override option to rename.", 2017-05-27) where the fallthrough meant to let --no-act set --verbose was changed to set --no-override (the previous code was too smart). Do not let --no-act set --verbose anymore but update the manual to recommend adding option --verbose. This is to be able to make --no-act detect only non existing file arguments (in a future commit). misc-utils/rename.1 | 4 +++- misc-utils/rename.c | 8 ++++---- 2 files changed, 7 insertions(+), 5 deletions(-) commit 9730aa40cfda5c66aa78f04b92e0d84d670804f7 Author: Vaclav Dolezal Date: Wed Feb 14 14:03:41 2018 +0100 mount: use string_to_bitmask() Signed-off-by: Vaclav Dolezal sys-utils/mount.c | 61 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 32 insertions(+), 29 deletions(-) commit fdeee3fc7aab85ee1e89cbef1e813d55c8b48e62 Author: Karel Zak Date: Tue Mar 27 19:05:13 2018 +0200 docs: add choom to TODO Addresses: https://github.com/karelzak/util-linux/issues/609 Signed-off-by: Karel Zak Documentation/TODO | 5 +++++ 1 file changed, 5 insertions(+) commit 6277e2310e819cf0facc2a6519b420362121b278 Author: G.raud Meyer Date: Tue Mar 27 15:22:58 2018 +0200 rename: when --no-overwrite skip verbosily only when --verbose misc-utils/rename.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b98ab3032d455db57d7d2cbb67f00e2ba4270753 Author: G.raud Meyer Date: Sat Mar 24 23:55:58 2018 +0100 rename: consolidate printing the symlink in addition to its target misc-utils/rename.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5bb927006fca412d4beaf9fb5e225e9d5444ac3a Author: G.raud Meyer Date: Sat Mar 24 23:53:21 2018 +0100 rename: fix/reverse the semantics of --no-overwrite in --symlink mode The previous behaviour was to overwrite a symlink only when the new destination did not exist, i.e. to avoid creating a symlink to an existing file! It had not been documented and it seems counter-intuitive to me. So the new behavior protects symlinks pointing to existing targets from being changed. Also update manpage to document this mode. misc-utils/rename.1 | 4 +++- misc-utils/rename.c | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) commit 5c25aca67a5aef1acf2c5c374025411a728f8b32 Author: Karel Zak Date: Tue Mar 27 14:21:46 2018 +0200 tests: remove namei(1) failed lstat test The strerror() output is is nothing stable and may be different on another systems. It would be possible to use sed(1) to unify the output, but it seems overkill in this case. Signed-off-by: Karel Zak tests/expected/namei/logic | 5 ----- tests/ts/namei/logic | 1 - 2 files changed, 6 deletions(-) commit b211467f77892f418da091278e47b9fe1baabe4b Author: Sami Kerola Date: Sat Mar 10 21:20:24 2018 +0000 closestream: remove dummy function __fpending() Exclude __fpending() from build when function is not available. This is more obvious than adding a dummy function and expecting compiler to eliminate it as dead code. Signed-off-by: Sami Kerola include/closestream.h | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit caa868345a61f4e3f67056a041ee99d463916ff5 Author: Karel Zak Date: Tue Mar 27 13:44:04 2018 +0200 docs: add cal(1) TODO items Signed-off-by: Karel Zak Documentation/TODO | 7 +++++++ 1 file changed, 7 insertions(+) commit e19cc7b65b31c57f0fe9cb73c9afad5197796f82 Author: Karel Zak Date: Tue Mar 27 13:30:16 2018 +0200 namei: provide more usable error message on lstat() error Addresses: https://github.com/karelzak/util-linux/issues/608 Signed-off-by: Karel Zak misc-utils/namei.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 04060bc3f12b8b37799474cac93deb9d47258e7b Merge: dfffcf0cd 6687cfded Author: Karel Zak Date: Tue Mar 27 12:54:53 2018 +0200 Merge branch 'master' of https://github.com/pali/util-linux * 'master' of https://github.com/pali/util-linux: tests: Add tests for FAT32 labels blkid: Encode any field which starts with LABEL in same way as LABEL field libblkid: vfat: Change parsing label in special cases commit dfffcf0cd3ab094cd1d9c0c2796d87c13b834526 Author: Karel Zak Date: Tue Mar 27 11:52:54 2018 +0200 tests: update column(1) space-separator test Signed-off-by: Karel Zak tests/expected/column/table-input-separator-space | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 651c5d428c2ef103ee8c5b1a310d6f29f0304744 Author: Karel Zak Date: Tue Mar 27 10:40:13 2018 +0200 column: fix leading space characters bug The bug has been introduced during column(1) rewrite. The function read_input() need to skip leading space only temporary to detect empty lines, but the rest of the code has to use the original buffer (line). I've tried to fix one of the symptoms by 5c7b67fbbf41c973ca8d49b1e8bdba22dbb917aa (alter), but this solution is unnecessary and too complex. Changes: * don't ignore leading space * remove unnecessary stuff introduced by 5c7b67fbbf41c973ca8d49b1e8bdba22dbb917aa * fix regression test with incorrect separator Addresses: https://github.com/karelzak/util-linux/issues/575 Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1560283 Signed-off-by: Karel Zak Documentation/TODO | 3 -- tests/expected/column/table-input-separator-space | 2 +- tests/ts/column/table | 2 +- text-utils/column.c | 36 ++--------------------- 4 files changed, 5 insertions(+), 38 deletions(-) commit 867c15ddb8cfe77cb828da0e948b847779136e56 Author: Karel Zak Date: Mon Mar 26 14:23:53 2018 +0200 docs: add to column(1) TODO Signed-off-by: Karel Zak Documentation/TODO | 3 +++ 1 file changed, 3 insertions(+) commit 061d1a51097c3c025ff46173f10aa135f9a610d4 Author: Karel Zak Date: Thu Mar 22 14:05:17 2018 +0100 libmount: include sys/mount.h only if necessary Addresses: https://github.com/systemd/systemd/issues/8507 Signed-off-by: Karel Zak libmount/src/libmount.h.in | 9 ++++++++- sys-utils/fstrim.c | 4 +--- 2 files changed, 9 insertions(+), 4 deletions(-) commit 43abda66869e749044c6c4fd1d106d7df9484aca Author: Karel Zak Date: Thu Mar 22 13:17:10 2018 +0100 fstrim: cleanup includes * HAVE_SYS_FS_H is incorrect (should be HAVE_LINUX_FS_H) * linux/fs.h cannot be included together with sys/mount.h as the both files define MS_* constants. The libmount.h includes sys/mount.h now. Signed-off-by: Karel Zak sys-utils/fstrim.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 314a214517eed88638ff22419fcae12076463890 Author: Karel Zak Date: Wed Mar 21 15:49:32 2018 +0100 libfdisk: (docs) fix section name The string "DOS (MBR)" generates filename with "(...)" which is unacceptable by kernel.org stuff. Signed-off-by: Karel Zak libfdisk/src/dos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 50ed551992e21d6a4cd88e8e14eb3e9cc6c670bd Author: Vaclav Dolezal Date: Wed Feb 14 13:52:04 2018 +0100 mount(8): clarify behavior of --options-mode Signed-off-by: Vaclav Dolezal sys-utils/mount.8 | 1 + 1 file changed, 1 insertion(+) commit 7238285bf2c6d73a0425791539a9bb668592f7f1 Author: Vaclav Dolezal Date: Thu Feb 8 15:46:33 2018 +0100 mount: document --options-* in man/help Signed-off-by: Vaclav Dolezal sys-utils/mount.8 | 21 +++++++++++++++++++++ sys-utils/mount.c | 7 +++++++ 2 files changed, 28 insertions(+) commit db9185bf5accf41195de9d18200131f51782670f Author: Vaclav Dolezal Date: Thu Feb 1 16:17:37 2018 +0100 mount: added options exposing libmount's optsmode Added: --options-mode={ignore,append,prepend,replace} MNT_OMODE_{IGNORE, ...} --options-source={fstab,mtab,disable} MNT_OMODE_{FSTAB,MTAB,NOTAB} --options-source-force MNT_OMODE_FORCE See mnt_context_set_optsmode() documentation for details. Signed-off-by: Vaclav Dolezal sys-utils/mount.c | 75 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 74 insertions(+), 1 deletion(-) commit 6687cfded9cafb73506087c6382b5c5d64a6953c Author: Pali Rohár Date: Sat Nov 25 12:49:27 2017 +0100 tests: Add tests for FAT32 labels These FAT32 images were generated for FAT label test suite in October 2017. Now blkid reports same FAT32 label as MS-DOS 6, 7 and Windows 98, XP, 10. For more information about test result see email: https://www.spinics.net/lists/kernel/msg2640891.html Signed-off-by: Pali Rohár tests/expected/blkid/low-probe-fat | 2 ++ tests/expected/blkid/low-probe-fat32_cp850_O_tilde | 2 ++ tests/expected/blkid/low-probe-fat32_mkdosfs_label1 | 9 +++++++++ .../low-probe-fat32_mkdosfs_label1_dosfslabel_NO_NAME | 7 +++++++ .../low-probe-fat32_mkdosfs_label1_dosfslabel_empty | 5 +++++ .../low-probe-fat32_mkdosfs_label1_dosfslabel_label2 | 9 +++++++++ .../blkid/low-probe-fat32_mkdosfs_label1_mlabel_NO_NAME | 7 +++++++ .../blkid/low-probe-fat32_mkdosfs_label1_mlabel_erase | 5 +++++ .../blkid/low-probe-fat32_mkdosfs_label1_xp_erase | 7 +++++++ .../blkid/low-probe-fat32_mkdosfs_label1_xp_label2 | 9 +++++++++ tests/expected/blkid/low-probe-fat32_mkdosfs_none | 5 +++++ .../low-probe-fat32_mkdosfs_none_dosfslabel_NO_NAME | 5 +++++ .../blkid/low-probe-fat32_mkdosfs_none_dosfslabel_label1 | 7 +++++++ ...-probe-fat32_mkdosfs_none_dosfslabel_label1_xp_label2 | 9 +++++++++ .../blkid/low-probe-fat32_mkdosfs_none_xp_label1 | 7 +++++++ ...-probe-fat32_mkdosfs_none_xp_label1_dosfslabel_label2 | 9 +++++++++ tests/expected/blkid/low-probe-fat32_xp_label1 | 7 +++++++ tests/expected/blkid/low-probe-fat32_xp_none | 5 +++++ .../blkid/low-probe-fat32_xp_none_dosfslabel_label1 | 7 +++++++ .../expected/blkid/low-probe-fat32_xp_none_mlabel_label1 | 9 +++++++++ tests/expected/blkid/low-probe-small-fat32 | 2 ++ tests/ts/blkid/images-fs/fat32_mkdosfs_label1.img.xz | Bin 0 -> 5400 bytes .../fat32_mkdosfs_label1_dosfslabel_NO_NAME.img.xz | Bin 0 -> 5404 bytes .../fat32_mkdosfs_label1_dosfslabel_empty.img.xz | Bin 0 -> 5396 bytes .../fat32_mkdosfs_label1_dosfslabel_label2.img.xz | Bin 0 -> 5400 bytes .../images-fs/fat32_mkdosfs_label1_mlabel_NO_NAME.img.xz | Bin 0 -> 5412 bytes .../images-fs/fat32_mkdosfs_label1_mlabel_erase.img.xz | Bin 0 -> 5412 bytes .../blkid/images-fs/fat32_mkdosfs_label1_xp_erase.img.xz | Bin 0 -> 5400 bytes .../images-fs/fat32_mkdosfs_label1_xp_label2.img.xz | Bin 0 -> 5404 bytes tests/ts/blkid/images-fs/fat32_mkdosfs_none.img.xz | Bin 0 -> 5376 bytes .../fat32_mkdosfs_none_dosfslabel_NO_NAME.img.xz | Bin 0 -> 5384 bytes .../fat32_mkdosfs_none_dosfslabel_label1.img.xz | Bin 0 -> 5380 bytes ...fat32_mkdosfs_none_dosfslabel_label1_xp_label2.img.xz | Bin 0 -> 5404 bytes .../blkid/images-fs/fat32_mkdosfs_none_xp_label1.img.xz | Bin 0 -> 5400 bytes ...fat32_mkdosfs_none_xp_label1_dosfslabel_label2.img.xz | Bin 0 -> 5396 bytes tests/ts/blkid/images-fs/fat32_xp_label1.img.xz | Bin 0 -> 5936 bytes tests/ts/blkid/images-fs/fat32_xp_none.img.xz | Bin 0 -> 5908 bytes .../images-fs/fat32_xp_none_dosfslabel_label1.img.xz | Bin 0 -> 5908 bytes .../blkid/images-fs/fat32_xp_none_mlabel_label1.img.xz | Bin 0 -> 5660 bytes 39 files changed, 134 insertions(+) commit 0d2e8ff94d0b222b3831fb31f1268dbcd566f30c Author: Pali Rohár Date: Sat Nov 25 12:48:32 2017 +0100 blkid: Encode any field which starts with LABEL in same way as LABEL field This applies also for LABEL_FATBOOT which contains bytes according to DOS code page and therefore does not contain valid UTF-8 sequence. Signed-off-by: Pali Rohár misc-utils/blkid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f0ca7e80d7a171701d0d04a3eae22d97f15d0683 Author: Pali Rohár Date: Sat Nov 25 12:48:18 2017 +0100 libblkid: vfat: Change parsing label in special cases * Use only label from the root directory and do not fallback to the label stored in boot sector. This is how MS-DOS 6.22, MS-DOS 7.10, Windows 98, Windows XP and also Windows 10 behave. Moreover Windows XP and Windows 10 do not touch label in boot sector anymore, so removing FAT label on those Windowses leads to having old label still stored in boot sector (which MS-DOS and Windows fully ignore). * Label entry "NO NAME" in root directory is treated as label "NO NAME" instead of empty label. In root directory it has no special meaning. String "NO NAME" has a special meaning (empty label) only for label stored in boot sector. * Label from the boot sector is now stored into LABEL_FATBOOT field. So if there are applications which depends or needs to read this label, they have ability. After this change LABEL always correspondent to the label from the root directory and LABEL_FATBOOT to the label stored in the boot sector. If some of those labels is missing or is not present (e.g. "NO LABEL" in boot sector) then particular field is not set. Signed-off-by: Pali Rohár libblkid/src/superblocks/vfat.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-)