Changes between v2.36 and v2.37-rc1 -------------------------------------------- commit e90e5e7e1228b4750d1cf64d2cde4a37fa8bfcde Author: Karel Zak Date: Mon Apr 12 11:26:02 2021 +0200 build-sys: release++ (v2.37-rc1) Signed-off-by: Karel Zak NEWS | 4 ++++ configure.ac | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) commit 6ae1e6b3d7ddec4e4a0bdec9a5565bf55bdc7f8b Author: Karel Zak Date: Mon Apr 12 11:22:53 2021 +0200 po: update Signed-off-by: Karel Zak po/ca.po | 73 ++++++++++++++++++++++++++++++------------------------- po/cs.po | 71 ++++++++++++++++++++++++++++------------------------- po/da.po | 71 ++++++++++++++++++++++++++++------------------------- po/de.po | 73 ++++++++++++++++++++++++++++++------------------------- po/es.po | 71 ++++++++++++++++++++++++++++------------------------- po/et.po | 71 ++++++++++++++++++++++++++++------------------------- po/eu.po | 71 ++++++++++++++++++++++++++++------------------------- po/fi.po | 71 ++++++++++++++++++++++++++++------------------------- po/fr.po | 71 ++++++++++++++++++++++++++++------------------------- po/gl.po | 71 ++++++++++++++++++++++++++++------------------------- po/hr.po | 71 ++++++++++++++++++++++++++++------------------------- po/hu.po | 73 ++++++++++++++++++++++++++++++------------------------- po/id.po | 71 ++++++++++++++++++++++++++++------------------------- po/it.po | 71 ++++++++++++++++++++++++++++------------------------- po/ja.po | 71 ++++++++++++++++++++++++++++------------------------- po/nl.po | 71 ++++++++++++++++++++++++++++------------------------- po/pl.po | 71 ++++++++++++++++++++++++++++------------------------- po/pt.po | 71 ++++++++++++++++++++++++++++------------------------- po/pt_BR.po | 71 ++++++++++++++++++++++++++++------------------------- po/ru.po | 71 ++++++++++++++++++++++++++++------------------------- po/sl.po | 71 ++++++++++++++++++++++++++++------------------------- po/sv.po | 71 ++++++++++++++++++++++++++++------------------------- po/tr.po | 71 ++++++++++++++++++++++++++++------------------------- po/uk.po | 71 ++++++++++++++++++++++++++++------------------------- po/util-linux.pot | 70 +++++++++++++++++++++++++++------------------------- po/vi.po | 71 ++++++++++++++++++++++++++++------------------------- po/zh_CN.po | 71 ++++++++++++++++++++++++++++------------------------- po/zh_TW.po | 71 ++++++++++++++++++++++++++++------------------------- 28 files changed, 1069 insertions(+), 924 deletions(-) commit ef3f006c6c60292ac224bebd7930eb78daaa25af Author: Karel Zak Date: Mon Apr 12 11:22:37 2021 +0200 docs: fix typo Signed-off-by: Karel Zak Documentation/releases/v2.37-ReleaseNotes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c0246ce059503bbc078122a50d564ca36a66f348 Author: Karel Zak Date: Mon Apr 12 09:39:59 2021 +0200 mesg: use only stat() to get the current terminal status open()+stat() does not work for example after su(1) (from root to non-root). It seems better to use only stat() to get the current terminal status. Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1906157 Signed-off-by: Karel Zak term-utils/mesg.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 37bd59bd531daa60487d4cbf9d5d0229ebb0a015 Author: Karel Zak Date: Fri Apr 9 15:30:19 2021 +0200 docs: update v2.37-ReleaseNotes Signed-off-by: Karel Zak Documentation/releases/v2.37-ReleaseNotes | 908 ++++++++++++++++++++++++++++++ 1 file changed, 908 insertions(+) commit 766490185f9b1c8a254e39b1b14006e6099fd6b0 Author: Karel Zak Date: Fri Apr 9 15:07:45 2021 +0200 findmnt: add --shadowed to the man page Signed-off-by: Karel Zak misc-utils/findmnt.8.adoc | 3 +++ 1 file changed, 3 insertions(+) commit 27c4353b4e1d8832e6c5bc64747d041b2a033a04 Author: Karel Zak Date: Fri Apr 9 15:07:11 2021 +0200 blkid: document --hint Signed-off-by: Karel Zak misc-utils/blkid.8.adoc | 5 +++++ misc-utils/blkid.c | 1 + 2 files changed, 6 insertions(+) commit 751eca28fcfa1e325770904d7181b22e48c72b29 Author: Karel Zak Date: Fri Apr 9 14:42:18 2021 +0200 libblkid: remove workaround for FAT+MBR on whole-disk The current libblkid ignores FAT when created on the same whole-disk device as valid MBR. This restriction is not compatible with many devices (like USB flash disk) created by Windows or the latest dosfstools where the first partition is used for entire device and where is also valid FAT. The filesystem is accessible from partition as well as from whole-disk device. The conclusion (between util-linux, dosfstools and udisks) is that libblkid has to provide all details, not hide anything and the proper policy (hide/show) has to be implemented by udisks (or so). CC: Tomáš Bžatek CC: Pali Rohár Signed-off-by: Karel Zak libblkid/src/superblocks/vfat.c | 18 --------------- tests/ts/blkid/mbr-wholedisk | 42 ---------------------------------- tests/ts/blkid/mbr-wholedisk-vfat.img | Bin 512 -> 0 bytes 3 files changed, 60 deletions(-) commit 33ef6ce910134b88b41bd448b3253f29de791803 Author: Karel Zak Date: Fri Apr 9 11:00:58 2021 +0200 docs: update AUTHORS file Signed-off-by: Karel Zak AUTHORS | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) commit 38f604505d8aace2abfed1ef22b795504fa5b66a Author: Karel Zak Date: Fri Apr 9 10:09:19 2021 +0200 po: merge changes Signed-off-by: Karel Zak po/ca.po | 5691 +++++++++++++++++++++++++++---------------------- po/cs.po | 5865 ++++++++++++++++++++++++++++----------------------- po/da.po | 5841 ++++++++++++++++++++++++++++----------------------- po/de.po | 5837 ++++++++++++++++++++++++++++----------------------- po/es.po | 5846 ++++++++++++++++++++++++++++----------------------- po/et.po | 5662 +++++++++++++++++++++++++++---------------------- po/eu.po | 5688 +++++++++++++++++++++++++++---------------------- po/fi.po | 5712 +++++++++++++++++++++++++++---------------------- po/fr.po | 5841 ++++++++++++++++++++++++++++----------------------- po/gl.po | 5662 +++++++++++++++++++++++++++---------------------- po/hr.po | 5842 ++++++++++++++++++++++++++++----------------------- po/hu.po | 5691 +++++++++++++++++++++++++++---------------------- po/id.po | 5700 +++++++++++++++++++++++++++---------------------- po/it.po | 5696 +++++++++++++++++++++++++++---------------------- po/ja.po | 5752 ++++++++++++++++++++++++++++---------------------- po/nl.po | 5768 +++++++++++++++++++++++++++----------------------- po/pl.po | 5816 ++++++++++++++++++++++++++++---------------------- po/pt.po | 5813 ++++++++++++++++++++++++++++---------------------- po/pt_BR.po | 5874 ++++++++++++++++++++++++++++----------------------- po/ru.po | 5738 ++++++++++++++++++++++++++++---------------------- po/sl.po | 5691 +++++++++++++++++++++++++++---------------------- po/sv.po | 6069 ++++++++++++++++++++++++++++------------------------- po/tr.po | 5751 ++++++++++++++++++++++++++++---------------------- po/uk.po | 5823 +++++++++++++++++++++++++++----------------------- po/util-linux.pot | 5438 +++++++++++++++++++++++++---------------------- po/vi.po | 5778 +++++++++++++++++++++++++++----------------------- po/zh_CN.po | 5758 ++++++++++++++++++++++++++++---------------------- po/zh_TW.po | 5768 +++++++++++++++++++++++++++----------------------- 28 files changed, 89333 insertions(+), 72078 deletions(-) commit 059ba3dd76c9d6cf45ce01e01bb03091a14a48a9 Author: Karel Zak Date: Fri Apr 9 08:02:10 2021 +0200 travis: cleanup before autogen Signed-off-by: Karel Zak .travis-functions.sh | 1 + 1 file changed, 1 insertion(+) commit a2c3638f0e8f25e436eed9f4aa105013adc4aff0 Author: Karel Zak Date: Fri Apr 9 07:53:21 2021 +0200 tools: add missing stuff to Makefile.am Signed-off-by: Karel Zak Makefile.am | 4 ++-- tools/Makemodule.am | 5 +++-- tools/{adoc-missing.sh => checkadoc-missing.sh} | 0 tools/{adoc-repeat.sh => checkadoc-repeat.sh} | 0 4 files changed, 5 insertions(+), 4 deletions(-) commit cc8df1caf6636db719ba28769765426291a523ef Merge: 1f4c639c4 02b0bdcc8 Author: Karel Zak Date: Fri Apr 9 07:48:02 2021 +0200 Merge branch 'fix-typo' of https://github.com/paullaffitte/util-linux * 'fix-typo' of https://github.com/paullaffitte/util-linux: fix typo in findmnt help commit 02b0bdcc8c435d845c6e5ce89beb1c48cdde930c Author: Paul Laffitte Date: Thu Apr 8 19:09:30 2021 +0200 fix typo in findmnt help misc-utils/findmnt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1f4c639c409573d74653033457385633930d30c2 Author: Мирослав Николић Date: Thu Apr 8 14:52:52 2021 +0200 po: add sr.po (from translationproject.org) po/sr.po | 21320 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 21320 insertions(+) commit 070bd0a4505dc8e767fd401a0c1d4f33b56444f5 Author: Sebastian Rasmussen Date: Thu Apr 8 14:52:52 2021 +0200 po: update sv.po (from translationproject.org) po/sv.po | 702 +++++++++++++++++++++++++++++++++++++++++---------------------- 1 file changed, 464 insertions(+), 238 deletions(-) commit e0fc3a40bd30937a2d6b00e8226691786b3f8342 Author: Božidar Putanec Date: Thu Apr 8 14:52:51 2021 +0200 po: update hr.po (from translationproject.org) po/hr.po | 657 +++++++++++++++++++++++++++------------------------------------ 1 file changed, 286 insertions(+), 371 deletions(-) commit 7e13ea492f25d4578d8de1f6fedb82325e51abf2 Author: Antonio Ceballos Roa Date: Thu Apr 8 14:52:51 2021 +0200 po: update es.po (from translationproject.org) po/es.po | 210 ++++++++++++++++++++++++++++++--------------------------------- 1 file changed, 100 insertions(+), 110 deletions(-) commit f0e8053c4e96c9dd1f76db9729129ff6fb068a85 Author: Petr Písař Date: Thu Apr 8 14:52:51 2021 +0200 po: update cs.po (from translationproject.org) po/cs.po | 541 +++++++++++++++++++++++++++------------------------------------ 1 file changed, 229 insertions(+), 312 deletions(-) commit acd1b6b72cafc4faab358dd981cf02a6ad4df000 Author: Karel Zak Date: Thu Apr 8 14:19:52 2021 +0200 tools: replace checkmans.sh with adoc scripts Signed-off-by: Karel Zak Makefile.am | 3 +- tools/adoc-missing.sh | 89 ++++++++++++++++++++++++ tools/adoc-repeat.sh | 80 +++++++++++++++++++++ tools/checkmans.sh | 187 -------------------------------------------------- 4 files changed, 171 insertions(+), 188 deletions(-) commit 6b160f5acd0d5457d3c3ee409e57ab63b1a05488 Author: Karel Zak Date: Thu Apr 8 12:46:47 2021 +0200 tests: update fdisk dumps Signed-off-by: Karel Zak tests/expected/sfdisk/gpt-attrs | 1102 ++--------------------------- tests/expected/sfdisk/gpt-attrs-guid | 1102 ++--------------------------- tests/expected/sfdisk/gpt-attrs-space | 1102 ++--------------------------- tests/expected/sfdisk/gpt-attrs-with-typo | 1102 ++--------------------------- 4 files changed, 192 insertions(+), 4216 deletions(-) commit a970c2dd51aee3b680f91acdb5b5c4d038834f2c Author: Karel Zak Date: Thu Apr 8 12:42:36 2021 +0200 fdisk: always skips zeros in dumps The expert command 'D'ump skips zeros when print label hexdump on terminal, but for non-terminal it prints all buffer. It seems better to use the same semantic everywhere and skip zeros. Signed-off-by: Karel Zak disk-utils/fdisk.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit 22a900a90fd7d1bd0792cc773fdc36b5fcc45f63 Author: Karel Zak Date: Wed Apr 7 10:19:03 2021 +0200 build-sys: add UL_REQUIRES_PROGRAM() macro, use it for asciidoc * use our generic UL_BUILD_INIT() stuff for ENABLE_ASCIIDOC * add UL_REQUIRES_PROGRAM() * add "Manual pages: yes|no" to ./configure summary Signed-off-by: Karel Zak configure.ac | 29 ++++++++++++----------------- m4/ul.m4 | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 17 deletions(-) commit 236421a49103ea510bcba1e7ef90b57d24aeab76 Author: Karel Zak Date: Tue Apr 6 17:17:42 2021 +0200 build-sys: make man pages optional, add --disable-asciidoc * don't use dist_noinst_DATA= for generated man pages (use man_MANS=) * make asciidoctor optional * add --disable-asciidoc to explicitly disable man pages Addresses: https://github.com/karelzak/util-linux/issues/1257 Signed-off-by: Karel Zak Makefile.am | 28 +++++++++++++--------------- configure.ac | 18 +++++++++++++++++- sys-utils/Makemodule.am | 3 +++ 3 files changed, 33 insertions(+), 16 deletions(-) commit 53b37016c31eb9aadbc03a611516f600d4252246 Author: Karel Zak Date: Tue Apr 6 15:32:46 2021 +0200 meson: generate man pages from asciidoc Signed-off-by: Karel Zak disk-utils/meson.build | 7 -- lib/meson.build | 3 - libblkid/meson.build | 4 - libuuid/meson.build | 16 ---- meson.build | 241 ++++++++++++++++++++++++++++++------------------- misc-utils/meson.build | 12 --- sys-utils/meson.build | 21 ----- 7 files changed, 150 insertions(+), 154 deletions(-) commit ae4e859f6872f68656d38e602246d03e490ff821 Merge: ba3b93525 e899168a1 Author: Karel Zak Date: Tue Apr 6 11:24:40 2021 +0200 Merge branch 'more-fixes' of https://github.com/h-c-mueller/util-linux * 'more-fixes' of https://github.com/h-c-mueller/util-linux: more: fix ARROW_DOWN and PAGE_DOWN behaviour to not skip lines more: fix command 'f' (screen forward) behaviour commit ba3b93525920f2782e12016e7444fca89fb5bb9c Author: Karel Zak Date: Thu Apr 1 12:30:25 2021 +0200 tests: update lscpu output Signed-off-by: Karel Zak tests/expected/lscpu/lscpu-ppc64-POWER7 | 4 ++-- tests/expected/lscpu/lscpu-ppc64-POWER7-64cpu | 4 ++-- tests/expected/lscpu/lscpu-s390-lpar-drawer | 8 ++++---- tests/expected/lscpu/lscpu-s390-nested-virt | 8 ++++---- tests/expected/lscpu/lscpu-vbox-win | 4 ++-- tests/expected/lscpu/lscpu-vmware_fpe | 8 ++++---- tests/expected/lscpu/lscpu-x86_64-64cpu | 8 ++++---- tests/expected/lscpu/lscpu-x86_64-dell_e4310 | 8 ++++---- tests/expected/lscpu/lscpu-x86_64-epyc_7451 | 8 ++++---- 9 files changed, 30 insertions(+), 30 deletions(-) commit 9dadd3e60c9f75bcf0e29f182ac6c53a4985bb98 Author: Karel Zak Date: Thu Apr 1 12:27:05 2021 +0200 lscpu: report also number of cache instances Caches (sum of all): L1d: 128 KiB (4 instances) L1i: 128 KiB (4 instances) L2: 1 MiB (4 instances) L3: 8 MiB (1 instance) Suggested-by: John Henning Signed-off-by: Karel Zak sys-utils/lscpu-topology.c | 18 ++++++++++++------ sys-utils/lscpu.c | 15 +++++++++++---- sys-utils/lscpu.h | 2 +- 3 files changed, 24 insertions(+), 11 deletions(-) commit 8bb50864c18f50442fb47df5bab4f0490f8b2e35 Author: Karel Zak Date: Thu Apr 1 11:47:21 2021 +0200 build-sys: improve asciidoc generic rule * keep it based on suffixes to make possible to generate individual pages in dependence on original .adoc * use absolute builddir to be robust enough for 'make distcheck' * make man page links depend on man pages Signed-off-by: Karel Zak Makefile.am | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit e185f57e34498cb6408017c7b035216f14cf972d Author: Karel Zak Date: Wed Mar 31 11:57:22 2021 +0200 build-sys: cleanup distcheck options Signed-off-by: Karel Zak Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 625e9c61e8c45e736277073c8449380c0c46c5f6 Author: Karel Zak Date: Wed Mar 31 11:33:06 2021 +0200 build-sys: make man pages location independent We need to evaluate "include::" directive relatively to project top-level source directory rather than to the current document location. Signed-off-by: Karel Zak Makefile.am | 2 +- disk-utils/addpart.8.adoc | 6 +++--- disk-utils/blockdev.8.adoc | 6 +++--- disk-utils/cfdisk.8.adoc | 6 +++--- disk-utils/delpart.8.adoc | 6 +++--- disk-utils/fdformat.8.adoc | 6 +++--- disk-utils/fdisk.8.adoc | 6 +++--- disk-utils/fsck.8.adoc | 6 +++--- disk-utils/fsck.cramfs.8.adoc | 6 +++--- disk-utils/fsck.minix.8.adoc | 6 +++--- disk-utils/isosize.8.adoc | 6 +++--- disk-utils/mkfs.8.adoc | 6 +++--- disk-utils/mkfs.bfs.8.adoc | 6 +++--- disk-utils/mkfs.cramfs.8.adoc | 6 +++--- disk-utils/mkfs.minix.8.adoc | 6 +++--- disk-utils/mkswap.8.adoc | 6 +++--- disk-utils/partx.8.adoc | 6 +++--- disk-utils/raw.8.adoc | 6 +++--- disk-utils/resizepart.8.adoc | 6 +++--- disk-utils/sfdisk.8.adoc | 6 +++--- disk-utils/swaplabel.8.adoc | 6 +++--- lib/terminal-colors.d.5.adoc | 6 +++--- libblkid/libblkid.3.adoc | 6 +++--- libuuid/man/uuid.3.adoc | 6 +++--- libuuid/man/uuid_clear.3.adoc | 6 +++--- libuuid/man/uuid_compare.3.adoc | 4 ++-- libuuid/man/uuid_copy.3.adoc | 6 +++--- libuuid/man/uuid_generate.3.adoc | 6 +++--- libuuid/man/uuid_is_null.3.adoc | 6 +++--- libuuid/man/uuid_parse.3.adoc | 6 +++--- libuuid/man/uuid_time.3.adoc | 6 +++--- libuuid/man/uuid_unparse.3.adoc | 6 +++--- login-utils/chfn.1.adoc | 6 +++--- login-utils/chsh.1.adoc | 6 +++--- login-utils/last.1.adoc | 6 +++--- login-utils/login.1.adoc | 6 +++--- login-utils/lslogins.1.adoc | 6 +++--- login-utils/newgrp.1.adoc | 6 +++--- login-utils/nologin.8.adoc | 6 +++--- login-utils/runuser.1.adoc | 6 +++--- login-utils/su.1.adoc | 6 +++--- login-utils/sulogin.8.adoc | 6 +++--- login-utils/utmpdump.1.adoc | 6 +++--- man-common/manpage-stub.adoc | 6 +++--- misc-utils/blkid.8.adoc | 6 +++--- misc-utils/cal.1.adoc | 6 +++--- misc-utils/fincore.1.adoc | 6 +++--- misc-utils/findfs.8.adoc | 6 +++--- misc-utils/findmnt.8.adoc | 6 +++--- misc-utils/getopt.1.adoc | 6 +++--- misc-utils/hardlink.1.adoc | 6 +++--- misc-utils/kill.1.adoc | 6 +++--- misc-utils/logger.1.adoc | 6 +++--- misc-utils/look.1.adoc | 6 +++--- misc-utils/lsblk.8.adoc | 6 +++--- misc-utils/lslocks.8.adoc | 6 +++--- misc-utils/mcookie.1.adoc | 6 +++--- misc-utils/namei.1.adoc | 6 +++--- misc-utils/rename.1.adoc | 6 +++--- misc-utils/uuidd.8.adoc | 6 +++--- misc-utils/uuidgen.1.adoc | 6 +++--- misc-utils/uuidparse.1.adoc | 6 +++--- misc-utils/whereis.1.adoc | 6 +++--- misc-utils/wipefs.8.adoc | 6 +++--- schedutils/chrt.1.adoc | 6 +++--- schedutils/ionice.1.adoc | 6 +++--- schedutils/taskset.1.adoc | 6 +++--- schedutils/uclampset.1.adoc | 6 +++--- sys-utils/adjtime_config.5.adoc | 6 +++--- sys-utils/blkdiscard.8.adoc | 6 +++--- sys-utils/blkzone.8.adoc | 6 +++--- sys-utils/chcpu.8.adoc | 6 +++--- sys-utils/chmem.8.adoc | 6 +++--- sys-utils/choom.1.adoc | 6 +++--- sys-utils/ctrlaltdel.8.adoc | 6 +++--- sys-utils/dmesg.1.adoc | 6 +++--- sys-utils/eject.1.adoc | 6 +++--- sys-utils/fallocate.1.adoc | 6 +++--- sys-utils/flock.1.adoc | 6 +++--- sys-utils/fsfreeze.8.adoc | 6 +++--- sys-utils/fstab.5.adoc | 6 +++--- sys-utils/fstrim.8.adoc | 6 +++--- sys-utils/hwclock.8.adoc | 6 +++--- sys-utils/ipcmk.1.adoc | 6 +++--- sys-utils/ipcrm.1.adoc | 6 +++--- sys-utils/ipcs.1.adoc | 6 +++--- sys-utils/irqtop.1.adoc | 6 +++--- sys-utils/ldattach.8.adoc | 6 +++--- sys-utils/losetup.8.adoc | 6 +++--- sys-utils/lscpu.1.adoc | 6 +++--- sys-utils/lsipc.1.adoc | 6 +++--- sys-utils/lsirq.1.adoc | 6 +++--- sys-utils/lsmem.1.adoc | 6 +++--- sys-utils/lsns.8.adoc | 6 +++--- sys-utils/mount.8.adoc | 6 +++--- sys-utils/mountpoint.1.adoc | 6 +++--- sys-utils/nsenter.1.adoc | 6 +++--- sys-utils/pivot_root.8.adoc | 6 +++--- sys-utils/prlimit.1.adoc | 6 +++--- sys-utils/readprofile.8.adoc | 6 +++--- sys-utils/renice.1.adoc | 6 +++--- sys-utils/rfkill.8.adoc | 6 +++--- sys-utils/rtcwake.8.adoc | 6 +++--- sys-utils/setarch.8.adoc | 6 +++--- sys-utils/setpriv.1.adoc | 6 +++--- sys-utils/setsid.1.adoc | 6 +++--- sys-utils/swapon.8.adoc | 6 +++--- sys-utils/switch_root.8.adoc | 6 +++--- sys-utils/tunelp.8.adoc | 6 +++--- sys-utils/umount.8.adoc | 6 +++--- sys-utils/unshare.1.adoc | 6 +++--- sys-utils/wdctl.8.adoc | 6 +++--- sys-utils/zramctl.8.adoc | 6 +++--- term-utils/agetty.8.adoc | 6 +++--- term-utils/mesg.1.adoc | 6 +++--- term-utils/script.1.adoc | 6 +++--- term-utils/scriptlive.1.adoc | 6 +++--- term-utils/scriptreplay.1.adoc | 6 +++--- term-utils/setterm.1.adoc | 6 +++--- term-utils/wall.1.adoc | 6 +++--- term-utils/write.1.adoc | 6 +++--- text-utils/col.1.adoc | 6 +++--- text-utils/colcrt.1.adoc | 6 +++--- text-utils/colrm.1.adoc | 6 +++--- text-utils/column.1.adoc | 6 +++--- text-utils/hexdump.1.adoc | 6 +++--- text-utils/line.1.adoc | 6 +++--- text-utils/more.1.adoc | 6 +++--- text-utils/pg.1.adoc | 6 +++--- text-utils/rev.1.adoc | 6 +++--- text-utils/ul.1.adoc | 6 +++--- 131 files changed, 390 insertions(+), 390 deletions(-) commit e2463a8f92d777e96078f2097521f8c25d5604b4 Author: Karel Zak Date: Mon Mar 29 18:56:12 2021 +0200 github: fix asciidoctror dependence Signed-off-by: Karel Zak .github/workflows/cibuild-setup-ubuntu.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1d997bbbec2356ed6541a96bee461104a75909e2 Author: Karel Zak Date: Mon Mar 29 15:26:37 2021 +0200 github: add ruby-asciidoctor to CI-build Signed-off-by: Karel Zak .github/workflows/cibuild-setup-ubuntu.sh | 1 + 1 file changed, 1 insertion(+) commit 6a23bf93fd83caa6d37c3e9b3c4936ee1ba17954 Author: Karel Zak Date: Mon Mar 29 15:04:15 2021 +0200 docs: update Documentation/howto-man-page.txt Signed-off-by: Karel Zak Documentation/howto-man-page.txt | 198 +-------------------------------------- 1 file changed, 2 insertions(+), 196 deletions(-) commit 97c5380f9ce298e356f3ce06776ffd45cd48471d Author: Karel Zak Date: Mon Mar 29 14:41:26 2021 +0200 Asciidoc: Incorporate latest changes in findmnt.8 Signed-off-by: Karel Zak misc-utils/findmnt.8.adoc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 25ce8fb1ed160fe5b3285facabb0b4ddca5c70d8 Merge: 928f320f0 3a2135574 Author: Karel Zak Date: Mon Mar 29 15:09:27 2021 +0200 Merge remote-tracking branch 'mariobl/topic/asciidoc' * mariobl/topic/asciidoc: (71 commits) Asciidoc: Update .pot template Asciidoc: Reorder example command sequence Asciidoc: Update .pot template Asciidoc: Better gettext message splitting in nsenter.1.adoc Asciidoc: Update .pot template Asciidoc: Fix typo and remove invisible spaces which confuse po4a Asciidoc: Update .pot template Asciidoc: Fix typo Asciidoc: Fix artifact from initial import, sixth attempt Asciidoc: Update .pot template Asciidoc: Fix artifacts from initial import, fifth attempt Asciidoc: Fix artifacts from initial import, fourth attempt Asciidoc: Update .pot template Asciidoc: Fix artifacts from initial import, third attempt Asciidoc: Fix artifacts from initial import, second attempt Asciidoc: Fix artifacts from initial import Asciidoc: Add po4a config file and initial translation template for man pages Asciidoc: Small indentation fix in mount.8.adoc Asciidoc: Review sys-utils man pages, part 2 build-sys: fix out-of-tree build ... Signed-off-by: Karel Zak commit 3a2135574063c54645e3002b01c60759eb6989cf Author: Mario Blättermann Date: Sun Mar 28 14:31:13 2021 +0200 Asciidoc: Update .pot template man-common/util-linux-man.pot | 40 ++++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-) commit c8dae3d8fa5e9f07dca8b9a36d192eaf836235b1 Author: Mario Blättermann Date: Sun Mar 28 14:29:45 2021 +0200 Asciidoc: Reorder example command sequence sys-utils/pivot_root.8.adoc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 982aa62baa4b7f20d4c5d9381ce30b4f859abf24 Author: Mario Blättermann Date: Sun Mar 28 12:00:01 2021 +0200 Asciidoc: Update .pot template man-common/util-linux-man.pot | 115 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 107 insertions(+), 8 deletions(-) commit 86cc47aa51caf6e1a8364834fcfcf9e4f6a0ef74 Author: Mario Blättermann Date: Sun Mar 28 11:58:08 2021 +0200 Asciidoc: Better gettext message splitting in nsenter.1.adoc sys-utils/nsenter.1.adoc | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 5db1d29a045fd946ed80b210155a53bbb8204fd5 Author: Mario Blättermann Date: Sun Mar 28 10:47:42 2021 +0200 Asciidoc: Update .pot template man-common/util-linux-man.pot | 154 ++++++++++++++++++++---------------------- 1 file changed, 73 insertions(+), 81 deletions(-) commit 544e64e09e872c0cbf99f77fdb784be94486e107 Author: Mario Blättermann Date: Sun Mar 28 10:47:00 2021 +0200 Asciidoc: Fix typo and remove invisible spaces which confuse po4a login-utils/login.1.adoc | 6 +++--- misc-utils/findmnt.8.adoc | 6 +++--- sys-utils/fstab.5.adoc | 2 +- sys-utils/hwclock.8.adoc | 12 ++++++------ sys-utils/mount.8.adoc | 8 ++++---- sys-utils/rfkill.8.adoc | 2 +- sys-utils/unshare.1.adoc | 6 +++--- term-utils/agetty.8.adoc | 4 ++-- term-utils/script.1.adoc | 2 +- term-utils/scriptlive.1.adoc | 4 +++- text-utils/column.1.adoc | 2 +- 11 files changed, 28 insertions(+), 26 deletions(-) commit 3cb9715628d2711858f10293ba0dc706efc1ad0e Author: Mario Blättermann Date: Sat Mar 27 00:45:15 2021 +0100 Asciidoc: Update .pot template man-common/util-linux-man.pot | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) commit ff6009fd20acd2cad5e889ee7fe0c091c404deb8 Author: Mario Blättermann Date: Sat Mar 27 00:30:37 2021 +0100 Asciidoc: Fix typo misc-utils/findmnt.8.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ab3e786dd11f563a59ebda4b33f0be7f574e4d8e Author: Mario Blättermann Date: Sat Mar 27 00:10:27 2021 +0100 Asciidoc: Fix artifact from initial import, sixth attempt disk-utils/isosize.8.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b81d59719b04739094de98ecdb7e6500635e3cf6 Author: Mario Blättermann Date: Fri Mar 26 21:42:47 2021 +0100 Asciidoc: Update .pot template man-common/util-linux-man.pot | 173 +++++++++++++++++++++--------------------- 1 file changed, 87 insertions(+), 86 deletions(-) commit f933e53c31ca35e3ab5aed513cdece22ff209548 Author: Mario Blättermann Date: Fri Mar 26 21:41:03 2021 +0100 Asciidoc: Fix artifacts from initial import, fifth attempt sys-utils/flock.1.adoc | 4 +++- sys-utils/hwclock.8.adoc | 8 ++++---- sys-utils/mount.8.adoc | 8 ++++---- 3 files changed, 11 insertions(+), 9 deletions(-) commit f67dbc88cab6f907d7bccb617e89162790beb3c2 Author: Mario Blättermann Date: Fri Mar 26 21:11:25 2021 +0100 Asciidoc: Fix artifacts from initial import, fourth attempt sys-utils/hwclock.8.adoc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 7a29fa6fe4238098534337c7486588c415349c43 Author: Mario Blättermann Date: Fri Mar 26 20:55:26 2021 +0100 Asciidoc: Update .pot template man-common/util-linux-man.pot | 269 +++++++++++++++++++++--------------------- 1 file changed, 133 insertions(+), 136 deletions(-) commit 9b7051d5bf7ccf64469f9602abe8c885c57f5899 Author: Mario Blättermann Date: Fri Mar 26 20:54:06 2021 +0100 Asciidoc: Fix artifacts from initial import, third attempt man-common/util-linux-man.pot | 507 +++++++++++++++++++++--------------------- sys-utils/hwclock.8.adoc | 116 +++++----- 2 files changed, 311 insertions(+), 312 deletions(-) commit 109525d66ad1963733df039b6e1009c8e9a6cf53 Author: Mario Blättermann Date: Fri Mar 26 20:17:45 2021 +0100 Asciidoc: Fix artifacts from initial import, second attempt sys-utils/hwclock.8.adoc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit b53360d8a8decf24c9275cde8c3736373ad44488 Author: Mario Blättermann Date: Fri Mar 26 20:12:42 2021 +0100 Asciidoc: Fix artifacts from initial import disk-utils/mkfs.cramfs.8.adoc | 4 ++-- login-utils/lslogins.1.adoc | 2 +- sys-utils/hwclock.8.adoc | 32 +++++++++++++++++--------------- sys-utils/mount.8.adoc | 2 +- 4 files changed, 21 insertions(+), 19 deletions(-) commit 36e96905f5c4e1f55dc01444142bb1090f94f9eb Author: Mario Blättermann Date: Fri Mar 26 17:32:17 2021 +0100 Asciidoc: Add po4a config file and initial translation template for man pages man-common/po4a.cfg | 148 + man-common/util-linux-man.pot | 40777 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 40925 insertions(+) commit 9637ed960ab9cd999c04e0e1a429392bd45d28d2 Author: Mario Blättermann Date: Fri Mar 26 17:29:16 2021 +0100 Asciidoc: Small indentation fix in mount.8.adoc sys-utils/mount.8.adoc | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit 4eab78d379dd72471dd6e8850810edeff070b4d6 Author: Mario Blättermann Date: Fri Mar 26 17:19:27 2021 +0100 Asciidoc: Review sys-utils man pages, part 2 sys-utils/hwclock.8.adoc | 195 +++++----- sys-utils/ipcmk.1.adoc | 12 +- sys-utils/ipcrm.1.adoc | 26 +- sys-utils/ipcs.1.adoc | 30 +- sys-utils/irqtop.1.adoc | 26 +- sys-utils/ldattach.8.adoc | 56 +-- sys-utils/losetup.8.adoc | 54 +-- sys-utils/lscpu.1.adoc | 114 +++--- sys-utils/lsipc.1.adoc | 48 +-- sys-utils/lsirq.1.adoc | 20 +- sys-utils/lsmem.1.adoc | 26 +- sys-utils/lsns.8.adoc | 28 +- sys-utils/mount.8.adoc | 904 ++++++++++++++++++++++--------------------- sys-utils/mountpoint.1.adoc | 20 +- sys-utils/nsenter.1.adoc | 108 +++--- sys-utils/pivot_root.8.adoc | 4 +- sys-utils/prlimit.1.adoc | 64 +-- sys-utils/readprofile.8.adoc | 30 +- sys-utils/renice.1.adoc | 14 +- sys-utils/rfkill.8.adoc | 26 +- sys-utils/rtcwake.8.adoc | 73 ++-- sys-utils/setarch.8.adoc | 36 +- sys-utils/setpriv.1.adoc | 74 ++-- sys-utils/setsid.1.adoc | 10 +- sys-utils/swapon.8.adoc | 80 ++-- sys-utils/switch_root.8.adoc | 8 +- sys-utils/tunelp.8.adoc | 34 +- sys-utils/umount.8.adoc | 72 ++-- sys-utils/unshare.1.adoc | 82 ++-- sys-utils/wdctl.8.adoc | 26 +- sys-utils/zramctl.8.adoc | 30 +- 31 files changed, 1184 insertions(+), 1146 deletions(-) commit fc86ec98deddde7ea42647c3975d4e83d59b7001 Merge: 69dc8997d 92c380cbc Author: Mario Blättermann Date: Fri Mar 26 14:35:55 2021 +0100 Merge pull request #1 from karelzak/asciidoc-for-mario Asciidoc for mario commit 92c380cbc3a572a63cc7b55be8de39ff89ab9e09 Author: Karel Zak Date: Fri Mar 26 14:20:03 2021 +0100 build-sys: fix out-of-tree build asciidoctor cannot write to source directory, we need to force it to use $builddir. Signed-off-by: Karel Zak Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 19feed6d96e0f19b245a1590c6c5a3b6b158d31f Author: Karel Zak Date: Fri Mar 26 12:42:12 2021 +0100 build-sys: add man-common/Makemodule.am Signed-off-by: Karel Zak Makefile.am | 8 +++++--- man-common/Makemodule.am | 7 +++++++ 2 files changed, 12 insertions(+), 3 deletions(-) commit 69dc8997dc484f950a1efcab8c688d035c0aee7d Author: Mario Blättermann Date: Fri Mar 26 13:35:42 2021 +0100 Asciidoc: Incorporate latest changes in rfkill.8 and umount.8 sys-utils/rfkill.8.adoc | 3 +++ sys-utils/umount.8.adoc | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) commit b49072cf79eda0b0d7bf7e61f3371d538d6e4c64 Author: Mario Blättermann Date: Fri Mar 26 13:26:16 2021 +0100 Asciidoc: Remove old man page links libuuid/man/uuid_generate_random.3 | 1 - libuuid/man/uuid_generate_time.3 | 1 - libuuid/man/uuid_generate_time_safe.3 | 1 - login-utils/lastb.1 | 1 - login-utils/vigr.8 | 1 - sys-utils/swapoff.8 | 1 - 6 files changed, 6 deletions(-) commit ad67a438cf4f8ea5c6f5f9833b0849081d2d6cc6 Author: Karel Zak Date: Fri Mar 26 11:57:07 2021 +0100 build-sys: fix typo Signed-off-by: Karel Zak login-utils/Makemodule.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b94cc212fdd3cbf262790a6e35749d02bb467acd Author: Karel Zak Date: Fri Mar 26 11:55:01 2021 +0100 build-sys: cleanup .gitignore files Signed-off-by: Karel Zak .gitignore | 4 ++++ libuuid/man/.gitignore | 3 --- 2 files changed, 4 insertions(+), 3 deletions(-) commit 4f79d3032e4962e6b71610ceabb75e2f4f82c855 Author: Karel Zak Date: Fri Mar 26 11:49:59 2021 +0100 build-sys: split man pages and man page links The symlinks are generated by asciidoctor and current dist_man_MANS depends on order (nan page before man link). This solutions is useless when execute "make -j". The real solution is to keep man pages in separate variable and use only this variable evaluate what we need to generate. Signed-off-by: Karel Zak Makefile.am | 9 +++-- disk-utils/Makemodule.am | 34 +++++++++--------- lib/Makemodule.am | 2 +- libblkid/Makemodule.am | 2 +- libuuid/man/Makemodule.am | 6 ++-- login-utils/Makemodule.am | 28 +++++++-------- misc-utils/Makemodule.am | 40 +++++++++++----------- schedutils/Makemodule.am | 8 ++--- sys-utils/Makemodule.am | 87 +++++++++++++++++++++++------------------------ term-utils/Makemodule.am | 16 ++++----- text-utils/Makemodule.am | 20 +++++------ 11 files changed, 128 insertions(+), 124 deletions(-) commit c2096885afd256b2ecddf97c236b8705723849f0 Author: Karel Zak Date: Fri Mar 26 11:03:35 2021 +0100 build-sys: remove man page link files It seems asciidoctor generates all necessary files. Signed-off-by: Karel Zak libuuid/man/uuid_generate_random.3 | 1 - libuuid/man/uuid_generate_time.3 | 1 - libuuid/man/uuid_generate_time_safe.3 | 1 - login-utils/Makemodule.am | 4 ++-- login-utils/lastb.1 | 1 - login-utils/vigr.8 | 1 - sys-utils/Makemodule.am | 4 ++-- sys-utils/swapoff.8 | 1 - 8 files changed, 4 insertions(+), 10 deletions(-) commit bdda0dc0515118325ceb9a2daa7a1892537ecd35 Author: Karel Zak Date: Fri Mar 26 10:31:29 2021 +0100 build-sys: remove duplicate hook Signed-off-by: Karel Zak login-utils/Makemodule.am | 3 --- 1 file changed, 3 deletions(-) commit eac3674f76a87a86540018cdd35a626623195936 Author: Karel Zak Date: Fri Mar 26 10:13:17 2021 +0100 build-sys: remove some man pages from PATHFILES fix warnings: Makefile:15936: warning: overriding recipe for target 'misc-utils/uuidd.8' Makefile:15928: warning: ignoring old recipe for target 'misc-utils/uuidd.8' Makefile:15936: warning: overriding recipe for target 'misc-utils/getopt.1' Makefile:15928: warning: ignoring old recipe for target 'misc-utils/getopt.1' Signed-off-by: Karel Zak misc-utils/Makemodule.am | 2 -- 1 file changed, 2 deletions(-) commit 68860732a7cb0a85b7a3f0d028816833d9cdfa7e Author: Mario Blättermann Date: Thu Mar 25 20:27:34 2021 +0100 Asciidoc: Review sys-utils man pages,part 1 sys-utils/adjtime_config.5.adoc | 10 ++-- sys-utils/blkdiscard.8.adoc | 20 ++++---- sys-utils/blkzone.8.adoc | 20 ++++---- sys-utils/chcpu.8.adoc | 32 ++++++------ sys-utils/chmem.8.adoc | 40 +++++++-------- sys-utils/choom.1.adoc | 8 +-- sys-utils/ctrlaltdel.8.adoc | 8 +-- sys-utils/dmesg.1.adoc | 108 ++++++++++++++++++++-------------------- sys-utils/eject.1.adoc | 44 ++++++++-------- sys-utils/fallocate.1.adoc | 58 ++++++++++----------- sys-utils/flock.1.adoc | 36 +++++++------- sys-utils/fsfreeze.8.adoc | 12 ++--- sys-utils/fstab.5.adoc | 26 +++------- sys-utils/fstrim.8.adoc | 42 ++++++++-------- 14 files changed, 223 insertions(+), 241 deletions(-) commit bbeadfdd5b11bad44b196f31f840586be0640ce6 Author: Mario Blättermann Date: Thu Mar 25 19:17:48 2021 +0100 Asciidoc: Review text-utils man pages text-utils/col.1.adoc | 46 +++++++++++--------------- text-utils/colcrt.1.adoc | 16 +++++---- text-utils/colrm.1.adoc | 5 ++- text-utils/column.1.adoc | 59 +++++++++++++++++----------------- text-utils/hexdump.1.adoc | 66 ++++++++++++++++++++------------------ text-utils/line.1.adoc | 1 - text-utils/more.1.adoc | 82 +++++++++++++++++++++++------------------------ text-utils/pg.1.adoc | 69 ++++++++++++++++++++------------------- text-utils/rev.1.adoc | 7 ++-- text-utils/ul.1.adoc | 13 ++++---- 10 files changed, 177 insertions(+), 187 deletions(-) commit 28f4f1a37d3bacc99544a491172d5b75ea6858ef Author: Mario Blättermann Date: Thu Mar 25 18:22:30 2021 +0100 Asciidoc: Review term-utils man pages term-utils/agetty.8.adoc | 190 ++++++++++++++++++++--------------------- term-utils/mesg.1.adoc | 18 ++-- term-utils/script.1.adoc | 52 +++++------ term-utils/scriptlive.1.adoc | 16 ++-- term-utils/scriptreplay.1.adoc | 34 ++++---- term-utils/setterm.1.adoc | 102 +++++++++++----------- term-utils/wall.1.adoc | 12 +-- term-utils/write.1.adoc | 4 +- 8 files changed, 215 insertions(+), 213 deletions(-) commit 928f320f093b3c54b934011a548a7bd54ef43d3d Author: Karel Zak Date: Thu Mar 25 12:39:23 2021 +0100 ttymsg: fix resource leak [coverity scan] Signed-off-by: Karel Zak term-utils/ttymsg.c | 2 ++ 1 file changed, 2 insertions(+) commit 4397707e7a42275d6a29e2a09bdec842dd8e3fb0 Author: Karel Zak Date: Thu Mar 25 12:23:21 2021 +0100 lsmem: use ul_path_readf_string() readable for analysers [coverity scan] Signed-off-by: Karel Zak sys-utils/lsmem.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 01a895d8404a3fc1692e68459f718da0225bd41d Author: Karel Zak Date: Thu Mar 25 12:14:46 2021 +0100 lsirq: fix resources leak [coverity scan] Signed-off-by: Karel Zak sys-utils/irq-common.c | 1 + 1 file changed, 1 insertion(+) commit e37babc0eca4c8bb4271791fb0f513483b1c1a48 Author: Karel Zak Date: Thu Mar 25 12:13:00 2021 +0100 lsirq: fix resources leak [coverity scan] Signed-off-by: Karel Zak sys-utils/irq-common.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 645577c755dcc2580f7fe44633403724fdef6f8a Author: Karel Zak Date: Thu Mar 25 12:12:11 2021 +0100 meson: add irq utils Signed-off-by: Karel Zak meson.build | 32 ++++++++++++++++++++++++++++++++ meson_options.txt | 4 ++++ sys-utils/meson.build | 13 +++++++++++++ 3 files changed, 49 insertions(+) commit a887d587bf960e8970b8bc5448c64c2139456219 Author: Karel Zak Date: Thu Mar 25 11:53:02 2021 +0100 fstrim: fix memory leak [coverity scan] Signed-off-by: Karel Zak sys-utils/fstrim.c | 1 + 1 file changed, 1 insertion(+) commit 903f812d0b32dec3ee0e7a2d79a03d9a477b999a Author: Karel Zak Date: Thu Mar 25 11:03:03 2021 +0100 libmount: fix memory leak [coverity scan] Signed-off-by: Karel Zak libmount/src/context_mount.c | 1 + libmount/src/context_umount.c | 1 + 2 files changed, 2 insertions(+) commit 23b9caa1fcdb65ce957a4fc3d6b574fb854c9186 Author: Karel Zak Date: Thu Mar 25 10:51:54 2021 +0100 libmount: add assert() to umount lookup code Signed-off-by: Karel Zak libmount/src/context_umount.c | 6 ++++++ 1 file changed, 6 insertions(+) commit fe7ef272d0e09015b1ef9107b578b32b7ee9d706 Author: Karel Zak Date: Thu Mar 25 10:43:20 2021 +0100 libfdisk: make labels allocations readable for analysers [coverity scan] Signed-off-by: Karel Zak libfdisk/src/bsd.c | 3 ++- libfdisk/src/dos.c | 3 ++- libfdisk/src/gpt.c | 3 ++- libfdisk/src/sgi.c | 3 ++- libfdisk/src/sun.c | 4 +++- 5 files changed, 11 insertions(+), 5 deletions(-) commit 8207f99b7a7426f0ce41f8df866d6baa7dbf9e25 Author: Karel Zak Date: Thu Mar 25 10:25:12 2021 +0100 sfdisk: fix resources leak [coverity scan] Signed-off-by: Karel Zak disk-utils/sfdisk.c | 1 + 1 file changed, 1 insertion(+) commit d9a67eb510e71f1ab0fa98459b58d4417a2f5649 Author: Mario Blättermann Date: Wed Mar 24 20:28:08 2021 +0100 Add missing backslash to Makefile.am Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 62fde24f47c135b517070d0f10976ae5e84b454b Author: Mario Blättermann Date: Wed Mar 24 20:01:34 2021 +0100 Asciidoc: Review login-utils man pages login-utils/chfn.1.adoc | 22 ++++----- login-utils/chsh.1.adoc | 8 ++-- login-utils/last.1.adoc | 30 ++++++------ login-utils/login.1.adoc | 114 ++++++++++++++++---------------------------- login-utils/lslogins.1.adoc | 66 ++++++++++++------------- login-utils/newgrp.1.adoc | 2 +- login-utils/nologin.8.adoc | 34 ++++++++----- login-utils/runuser.1.adoc | 85 +++++++++++++++------------------ login-utils/su.1.adoc | 91 +++++++++++++++-------------------- login-utils/sulogin.8.adoc | 18 +++---- login-utils/utmpdump.1.adoc | 10 ++-- login-utils/vipw.8.adoc | 2 +- 12 files changed, 220 insertions(+), 262 deletions(-) commit 299604dd0b91b2a61bf5b201a93cc346e4f00e7a Author: Mario Blättermann Date: Wed Mar 24 18:53:27 2021 +0100 Asciidoc: Review disk-utils man pages disk-utils/addpart.8.adoc | 8 +- disk-utils/blockdev.8.adoc | 52 +++++----- disk-utils/cfdisk.8.adoc | 72 +++++++------- disk-utils/fdformat.8.adoc | 12 +-- disk-utils/fdisk.8.adoc | 122 +++++++++++------------ disk-utils/fsck.8.adoc | 110 ++++++++++---------- disk-utils/fsck.cramfs.8.adoc | 24 ++--- disk-utils/fsck.minix.8.adoc | 33 +++--- disk-utils/isosize.8.adoc | 16 ++- disk-utils/mkfs.8.adoc | 17 ++-- disk-utils/mkfs.bfs.8.adoc | 16 +-- disk-utils/mkfs.cramfs.8.adoc | 30 +++--- disk-utils/mkfs.minix.8.adoc | 28 +++--- disk-utils/mkswap.8.adoc | 30 +++--- disk-utils/partx.8.adoc | 72 +++++++------- disk-utils/raw.8.adoc | 8 +- disk-utils/resizepart.8.adoc | 6 +- disk-utils/sfdisk.8.adoc | 227 +++++++++++++++++++++--------------------- 18 files changed, 439 insertions(+), 444 deletions(-) commit ea81716d0c9929ac3fd2df102cf1ac696680ba0a Author: Mario Blättermann Date: Wed Mar 24 17:37:34 2021 +0100 Asciidoc: Review terminal-colors.d.5.adoc lib/terminal-colors.d.5.adoc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 1630e65371efaa70c154f312d32496d1228f93ee Merge: 529b51706 20fae1bde Author: Karel Zak Date: Wed Mar 24 12:54:41 2021 +0100 Merge branch 'topic/rfkill' commit 529b51706ef06611a8165023f14e6593e06901de Author: Karel Zak Date: Wed Mar 24 12:43:17 2021 +0100 libsmartcols: introduce default sort column * add default sort column, set by scols_sort_table() * sort tree according to default sort column also in scols_sort_table_by_tree() The function scols_sort_table() does not sort tree branches if tree is not enabled. The function scols_sort_table_by_tree() does not care if tree is enabled and it always follows parent->child relations. For scols_sort_table_by_tree() we need to follow order in branches if previously scols_sort_table() has been called. For example lsblk calls scols_sort_table(tb, cl); scols_sort_table_by_tree(tb); for list-like output (for example lsblk -P) and users assume the same order as for tree (lsblk --tree). Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1940607 Signed-off-by: Karel Zak libsmartcols/src/smartcolsP.h | 2 ++ libsmartcols/src/table.c | 60 +++++++++++++++++++++++++++++++------------ 2 files changed, 45 insertions(+), 17 deletions(-) commit c59d442809ebb51b6bde17c541e51253fc2cba5b Author: Karel Zak Date: Wed Mar 24 12:42:58 2021 +0100 libsmartcols: add sort sunction to the sample Signed-off-by: Karel Zak libsmartcols/samples/tree.c | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) commit fc394b5b021f8c646a8704783e971a076b72136f Author: Mario Blättermann Date: Tue Mar 23 21:09:22 2021 +0100 Define the asciidoctor command in configure.ac configure.ac | 1 + 1 file changed, 1 insertion(+) commit 5a52459e0f384aacdda97bdd126d9bbc3655bd70 Author: Mario Blättermann Date: Tue Mar 23 20:43:52 2021 +0100 Asciidoc: Review schedutils man pages schedutils/chrt.1.adoc | 52 ++++++++++++++++++++++----------------------- schedutils/ionice.1.adoc | 43 ++++++++++++++++++++----------------- schedutils/taskset.1.adoc | 44 +++++++++++++++++++++----------------- schedutils/uclampset.1.adoc | 51 ++++++++++++++++++++++++-------------------- 4 files changed, 102 insertions(+), 88 deletions(-) commit 925a9b5d72c0c1d994ce71fa1f3afe488d04cea7 Author: Mario Blättermann Date: Tue Mar 23 20:10:02 2021 +0100 Asciidoc: Incorporate latest change in findmnt.8 misc-utils/findmnt.8.adoc | 3 +++ 1 file changed, 3 insertions(+) commit 2c646c80d84daa24d51004893d2f585ac3ea80f6 Author: Mario Blättermann Date: Tue Mar 23 20:07:15 2021 +0100 Asciidoc: Review misc-utils man pages misc-utils/blkid.8.adoc | 134 ++++++++++++++++++++++--------------------- misc-utils/cal.1.adoc | 66 ++++++++++----------- misc-utils/fincore.1.adoc | 16 +++--- misc-utils/findfs.8.adoc | 28 +++++---- misc-utils/findmnt.8.adoc | 137 ++++++++++++++++++++++---------------------- misc-utils/getopt.1.adoc | 46 +++++++++------ misc-utils/hardlink.1.adoc | 30 +++++----- misc-utils/kill.1.adoc | 62 ++++++++++---------- misc-utils/logger.1.adoc | 110 +++++++++++++++++------------------ misc-utils/look.1.adoc | 22 +++---- misc-utils/lsblk.8.adoc | 90 ++++++++++++++--------------- misc-utils/lslocks.8.adoc | 61 ++++++++++++-------- misc-utils/mcookie.1.adoc | 17 +++--- misc-utils/namei.1.adoc | 18 +++--- misc-utils/rename.1.adoc | 24 ++++---- misc-utils/uuidd.8.adoc | 32 +++++------ misc-utils/uuidgen.1.adoc | 20 +++---- misc-utils/uuidparse.1.adoc | 14 ++--- misc-utils/whereis.1.adoc | 26 ++++----- misc-utils/wipefs.8.adoc | 42 +++++++------- 20 files changed, 510 insertions(+), 485 deletions(-) commit 20fae1bde21e7924b8b52f1e1a21ca9593cc08cc Author: Karel Zak Date: Tue Mar 23 15:20:44 2021 +0100 rfkill: add "toggle" command Addresses: https://github.com/karelzak/util-linux/issues/1269 Signed-off-by: Karel Zak sys-utils/rfkill.8 | 3 ++ sys-utils/rfkill.c | 110 +++++++++++++++++++++++++++++++++++++++-------------- 2 files changed, 84 insertions(+), 29 deletions(-) commit d928b9afe2e928032e6cb7ed3dfc4ff63d535458 Author: Karel Zak Date: Mon Mar 22 15:15:52 2021 +0100 tests: make it compatible with meson Signed-off-by: Karel Zak tests/run.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 3ab4ef3ca9bf77b7dbb924fa75dcc9f7c6c3ea59 Author: Karel Zak Date: Mon Mar 22 14:58:05 2021 +0100 findmnt: add --shadowed Signed-off-by: Karel Zak misc-utils/findmnt.8 | 3 +++ misc-utils/findmnt.c | 16 +++++++++++++++- misc-utils/findmnt.h | 13 +++++++------ 3 files changed, 25 insertions(+), 7 deletions(-) commit 1c81dfff1a6a79c6c78a051e0ef2ead0e017177a Author: Karel Zak Date: Mon Mar 22 14:57:07 2021 +0100 libmount: mnt_table_over_fs() make child optional Signed-off-by: Karel Zak libmount/src/tab.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit 667c87c50c64e44c7e96c3c75249944a4d68a453 Author: Karel Zak Date: Mon Mar 22 12:41:37 2021 +0100 findmnt: sort columns Let's make "Available columns" in --help more readable. Signed-off-by: Karel Zak misc-utils/findmnt.c | 70 ++++++++++++++++++++++++++-------------------------- 1 file changed, 35 insertions(+), 35 deletions(-) commit e2f6c9eaa2deb019ba2a9dad495881b20e797f91 Author: Karel Zak Date: Mon Mar 22 11:29:28 2021 +0100 umount: support over-mounts for --recursive For example for hierarchy: $ findmnt -oTARGET,ID,PARENT TARGET ID PARENT /mnt/A 802 62 └─/mnt/A/B 937 802 ├─/mnt/A/B/C 964 937 │ └─/mnt/A/B/C 991 964 └─/mnt/A/B 1018 937 └─/mnt/A/B 1045 1018 we need umount in order (id): 1045, 1018, 991, 964, 937, 802. The current code first tries 991 in 937 branch. Reported-by: Lennart Poettering Signed-off-by: Karel Zak sys-utils/umount.8 | 3 ++- sys-utils/umount.c | 12 +++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) commit a6055682811bac0dc5c6219bfde03c53290ad142 Author: Karel Zak Date: Mon Mar 22 11:24:49 2021 +0100 libmount: add mnt_table_over_fs() The function returns the first over-mount for specified filesystem. Signed-off-by: Karel Zak libmount/docs/libmount-sections.txt | 1 + libmount/src/libmount.h.in | 2 ++ libmount/src/libmount.sym | 1 + libmount/src/tab.c | 49 +++++++++++++++++++++++++++++++++++++ 4 files changed, 53 insertions(+) commit f37298c2c21ab1001f2cfccd8ec0f77772383d5a Author: Mario Blättermann Date: Sun Mar 21 18:24:47 2021 +0100 Asciidoc: Yet another formatting fix disk-utils/raw.8.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 99157f44da052a3b445cce6c252a25f9c8235330 Author: Mario Blättermann Date: Sun Mar 21 13:02:56 2021 +0100 Asciidoc: Formatting cleanup disk-utils/fsck.8.adoc | 2 +- disk-utils/mkswap.8.adoc | 2 +- text-utils/more.1.adoc | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) commit 78fec3e5bab7237c2c6afcaf120f6926efeb95e4 Author: Mario Blättermann Date: Sun Mar 21 12:50:16 2021 +0100 Asciidoc: Remove already imported text-utils *roff man pages text-utils/col.1 | 158 --------------------- text-utils/colcrt.1 | 105 -------------- text-utils/colrm.1 | 75 ---------- text-utils/column.1 | 192 -------------------------- text-utils/hexdump.1 | 382 --------------------------------------------------- text-utils/line.1 | 17 --- text-utils/more.1 | 258 ---------------------------------- text-utils/pg.1 | 238 -------------------------------- text-utils/rev.1 | 63 --------- text-utils/ul.1 | 113 --------------- 10 files changed, 1601 deletions(-) commit f42ed8190c24557259e680fff1f6c2fe5c38ac2f Author: Mario Blättermann Date: Sun Mar 21 10:00:16 2021 +0100 Asciidoc: Unify spelling of »User Commands« login-utils/chfn.1.adoc | 2 +- login-utils/chsh.1.adoc | 2 +- login-utils/last.1.adoc | 2 +- login-utils/login.1.adoc | 2 +- login-utils/lslogins.1.adoc | 2 +- login-utils/newgrp.1.adoc | 2 +- login-utils/runuser.1.adoc | 2 +- login-utils/su.1.adoc | 2 +- login-utils/utmpdump.1.adoc | 2 +- schedutils/chrt.1.adoc | 2 +- schedutils/ionice.1.adoc | 2 +- schedutils/taskset.1.adoc | 2 +- schedutils/uclampset.1.adoc | 2 +- sys-utils/choom.1.adoc | 2 +- sys-utils/dmesg.1.adoc | 2 +- sys-utils/eject.1.adoc | 2 +- sys-utils/fallocate.1.adoc | 2 +- sys-utils/flock.1.adoc | 2 +- sys-utils/ipcmk.1.adoc | 2 +- sys-utils/ipcrm.1.adoc | 2 +- sys-utils/ipcs.1.adoc | 2 +- sys-utils/irqtop.1.adoc | 2 +- sys-utils/lscpu.1.adoc | 2 +- sys-utils/lsipc.1.adoc | 2 +- sys-utils/lsirq.1.adoc | 2 +- sys-utils/lsmem.1.adoc | 2 +- sys-utils/mountpoint.1.adoc | 2 +- sys-utils/nsenter.1.adoc | 2 +- sys-utils/prlimit.1.adoc | 2 +- sys-utils/renice.1.adoc | 2 +- sys-utils/setpriv.1.adoc | 2 +- sys-utils/setsid.1.adoc | 2 +- sys-utils/unshare.1.adoc | 2 +- term-utils/mesg.1.adoc | 2 +- term-utils/script.1.adoc | 2 +- term-utils/scriptlive.1.adoc | 2 +- term-utils/scriptreplay.1.adoc | 2 +- term-utils/setterm.1.adoc | 2 +- term-utils/wall.1.adoc | 2 +- term-utils/write.1.adoc | 2 +- text-utils/col.1.adoc | 2 +- text-utils/colcrt.1.adoc | 2 +- text-utils/colrm.1.adoc | 2 +- text-utils/column.1.adoc | 2 +- text-utils/hexdump.1.adoc | 2 +- text-utils/line.1.adoc | 2 +- text-utils/more.1.adoc | 2 +- text-utils/pg.1.adoc | 2 +- text-utils/rev.1.adoc | 2 +- text-utils/ul.1.adoc | 2 +- 50 files changed, 50 insertions(+), 50 deletions(-) commit 295b3979d99c2166aa63269e1651d35eb029bebe Author: Mario Blättermann Date: Sat Mar 20 16:42:47 2021 +0100 Asciidoc: Add Po4a hint to file headers disk-utils/addpart.8.adoc | 1 + disk-utils/blockdev.8.adoc | 1 + disk-utils/cfdisk.8.adoc | 1 + disk-utils/delpart.8.adoc | 1 + disk-utils/fdformat.8.adoc | 1 + disk-utils/fdisk.8.adoc | 1 + disk-utils/fsck.8.adoc | 1 + disk-utils/fsck.cramfs.8.adoc | 1 + disk-utils/fsck.minix.8.adoc | 1 + disk-utils/isosize.8.adoc | 1 + disk-utils/mkfs.8.adoc | 1 + disk-utils/mkfs.bfs.8.adoc | 1 + disk-utils/mkfs.cramfs.8.adoc | 1 + disk-utils/mkfs.minix.8.adoc | 1 + disk-utils/mkswap.8.adoc | 1 + disk-utils/partx.8.adoc | 1 + disk-utils/raw.8.adoc | 1 + disk-utils/resizepart.8.adoc | 1 + disk-utils/sfdisk.8.adoc | 1 + disk-utils/swaplabel.8.adoc | 1 + lib/terminal-colors.d.5.adoc | 1 + libblkid/libblkid.3.adoc | 1 + libuuid/man/uuid.3.adoc | 1 + libuuid/man/uuid_clear.3.adoc | 1 + libuuid/man/uuid_compare.3.adoc | 1 + libuuid/man/uuid_copy.3.adoc | 1 + libuuid/man/uuid_generate.3.adoc | 1 + libuuid/man/uuid_is_null.3.adoc | 1 + libuuid/man/uuid_parse.3.adoc | 1 + libuuid/man/uuid_time.3.adoc | 1 + libuuid/man/uuid_unparse.3.adoc | 1 + login-utils/chfn.1.adoc | 1 + login-utils/chsh.1.adoc | 1 + login-utils/last.1.adoc | 1 + login-utils/login.1.adoc | 1 + login-utils/lslogins.1.adoc | 1 + login-utils/newgrp.1.adoc | 1 + login-utils/nologin.8.adoc | 1 + login-utils/runuser.1.adoc | 1 + login-utils/su.1.adoc | 1 + login-utils/sulogin.8.adoc | 1 + login-utils/utmpdump.1.adoc | 1 + login-utils/vipw.8.adoc | 1 + misc-utils/blkid.8.adoc | 1 + misc-utils/cal.1.adoc | 1 + misc-utils/fincore.1.adoc | 1 + misc-utils/findfs.8.adoc | 1 + misc-utils/findmnt.8.adoc | 1 + misc-utils/getopt.1.adoc | 1 + misc-utils/hardlink.1.adoc | 1 + misc-utils/kill.1.adoc | 1 + misc-utils/logger.1.adoc | 1 + misc-utils/look.1.adoc | 1 + misc-utils/lsblk.8.adoc | 1 + misc-utils/lslocks.8.adoc | 1 + misc-utils/mcookie.1.adoc | 1 + misc-utils/namei.1.adoc | 1 + misc-utils/rename.1.adoc | 1 + misc-utils/uuidd.8.adoc | 1 + misc-utils/uuidgen.1.adoc | 1 + misc-utils/uuidparse.1.adoc | 1 + misc-utils/whereis.1.adoc | 1 + misc-utils/wipefs.8.adoc | 1 + schedutils/chrt.1.adoc | 1 + schedutils/ionice.1.adoc | 1 + schedutils/taskset.1.adoc | 1 + schedutils/uclampset.1.adoc | 1 + sys-utils/adjtime_config.5.adoc | 1 + sys-utils/blkdiscard.8.adoc | 1 + sys-utils/blkzone.8.adoc | 1 + sys-utils/chcpu.8.adoc | 1 + sys-utils/chmem.8.adoc | 1 + sys-utils/choom.1.adoc | 1 + sys-utils/ctrlaltdel.8.adoc | 1 + sys-utils/dmesg.1.adoc | 1 + sys-utils/eject.1.adoc | 1 + sys-utils/fallocate.1.adoc | 1 + sys-utils/flock.1.adoc | 1 + sys-utils/fsfreeze.8.adoc | 1 + sys-utils/fstab.5.adoc | 1 + sys-utils/fstrim.8.adoc | 1 + sys-utils/hwclock.8.adoc | 1 + sys-utils/ipcmk.1.adoc | 1 + sys-utils/ipcrm.1.adoc | 1 + sys-utils/ipcs.1.adoc | 1 + sys-utils/irqtop.1.adoc | 1 + sys-utils/ldattach.8.adoc | 1 + sys-utils/losetup.8.adoc | 1 + sys-utils/lscpu.1.adoc | 1 + sys-utils/lsipc.1.adoc | 1 + sys-utils/lsirq.1.adoc | 1 + sys-utils/lsmem.1.adoc | 1 + sys-utils/lsns.8.adoc | 1 + sys-utils/mount.8.adoc | 1 + sys-utils/mountpoint.1.adoc | 1 + sys-utils/nsenter.1.adoc | 1 + sys-utils/pivot_root.8.adoc | 1 + sys-utils/prlimit.1.adoc | 1 + sys-utils/readprofile.8.adoc | 1 + sys-utils/renice.1.adoc | 1 + sys-utils/rfkill.8.adoc | 1 + sys-utils/rtcwake.8.adoc | 1 + sys-utils/setarch.8.adoc | 1 + sys-utils/setpriv.1.adoc | 1 + sys-utils/setsid.1.adoc | 1 + sys-utils/swapon.8.adoc | 1 + sys-utils/switch_root.8.adoc | 1 + sys-utils/tunelp.8.adoc | 1 + sys-utils/umount.8.adoc | 1 + sys-utils/unshare.1.adoc | 1 + sys-utils/wdctl.8.adoc | 1 + sys-utils/zramctl.8.adoc | 1 + term-utils/agetty.8.adoc | 1 + term-utils/mesg.1.adoc | 1 + term-utils/script.1.adoc | 1 + term-utils/scriptlive.1.adoc | 1 + term-utils/scriptreplay.1.adoc | 1 + term-utils/setterm.1.adoc | 1 + term-utils/wall.1.adoc | 1 + term-utils/write.1.adoc | 1 + text-utils/col.1.adoc | 1 + text-utils/colcrt.1.adoc | 1 + text-utils/colrm.1.adoc | 1 + text-utils/column.1.adoc | 1 + text-utils/hexdump.1.adoc | 1 + text-utils/line.1.adoc | 1 + text-utils/more.1.adoc | 1 + text-utils/pg.1.adoc | 1 + text-utils/rev.1.adoc | 1 + text-utils/ul.1.adoc | 1 + 130 files changed, 130 insertions(+) commit b4e57a8a90ae6123b4a996fa10dd22c3ab54b4a1 Author: Mario Blättermann Date: Sat Mar 20 15:23:32 2021 +0100 Asciidoc: Small fix in nsenter.1.adoc sys-utils/nsenter.1.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5723eae79123b9fbc000f02730736b6d99c6f2e5 Author: Mario Blättermann Date: Sat Mar 20 09:45:23 2021 +0100 Asciidoc: Some more man page formatting improvements Besides some formatting tweaks, I've changed »lsblk(1)« into »lsblk(8)« in the SEE ALSO section of mount.8.adoc. At least Archlinux and Debian ship lsblk as a system administration command. sys-utils/lsipc.1.adoc | 4 ++-- sys-utils/mount.8.adoc | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) commit d315cc4d960d891d1aa3c459e295c56dcb008091 Author: Mario Blättermann Date: Fri Mar 19 20:52:00 2021 +0100 Asciidoc: Re-add empty lines to man pages disk-utils/cfdisk.8.adoc | 5 +++ disk-utils/fdisk.8.adoc | 2 ++ disk-utils/fsck.8.adoc | 11 ++++++ disk-utils/mkswap.8.adoc | 1 + disk-utils/partx.8.adoc | 1 + disk-utils/sfdisk.8.adoc | 14 ++++++++ login-utils/login.1.adoc | 1 + login-utils/lslogins.1.adoc | 1 + login-utils/runuser.1.adoc | 4 +++ login-utils/su.1.adoc | 4 +++ login-utils/sulogin.8.adoc | 1 + misc-utils/blkid.8.adoc | 16 +++++++++ misc-utils/cal.1.adoc | 4 +++ misc-utils/findmnt.8.adoc | 4 +++ misc-utils/kill.1.adoc | 4 +++ misc-utils/logger.1.adoc | 16 ++++++++- misc-utils/look.1.adoc | 1 + misc-utils/lsblk.8.adoc | 3 ++ misc-utils/lslocks.8.adoc | 1 + misc-utils/mcookie.1.adoc | 1 + misc-utils/wipefs.8.adoc | 1 + schedutils/ionice.1.adoc | 2 ++ sys-utils/dmesg.1.adoc | 14 +++++--- sys-utils/fallocate.1.adoc | 8 +++++ sys-utils/fsfreeze.8.adoc | 1 + sys-utils/fstrim.8.adoc | 4 ++- sys-utils/hwclock.8.adoc | 33 +++++++++++++++-- sys-utils/ipcrm.1.adoc | 1 + sys-utils/lscpu.1.adoc | 20 ++++++++--- sys-utils/lsns.8.adoc | 1 + sys-utils/mount.8.adoc | 78 ++++++++++++++++++++++++++++++++++++++-- sys-utils/nsenter.1.adoc | 2 ++ sys-utils/rtcwake.8.adoc | 25 ++++++------- sys-utils/setpriv.1.adoc | 9 +++++ sys-utils/swapon.8.adoc | 4 +++ sys-utils/tunelp.8.adoc | 3 ++ sys-utils/umount.8.adoc | 6 ++++ sys-utils/unshare.1.adoc | 3 ++ sys-utils/zramctl.8.adoc | 1 + term-utils/agetty.8.adoc | 87 ++++++++++++++++++++++++++------------------- term-utils/script.1.adoc | 5 ++- term-utils/setterm.1.adoc | 4 +++ text-utils/column.1.adoc | 1 + text-utils/pg.1.adoc | 1 + 44 files changed, 342 insertions(+), 67 deletions(-) commit 4d29743519ec2837c8cc9ce3805c628fda597354 Author: Mario Blättermann Date: Fri Mar 19 18:25:50 2021 +0100 Asciidoc: Some formatting cleanup in man pages disk-utils/cfdisk.8.adoc | 2 +- disk-utils/fdformat.8.adoc | 2 +- disk-utils/fdisk.8.adoc | 2 +- disk-utils/fsck.cramfs.8.adoc | 2 +- disk-utils/fsck.minix.8.adoc | 2 +- disk-utils/isosize.8.adoc | 2 +- disk-utils/mkfs.8.adoc | 2 +- disk-utils/mkfs.bfs.8.adoc | 2 +- disk-utils/mkfs.cramfs.8.adoc | 2 +- disk-utils/mkfs.minix.8.adoc | 2 +- disk-utils/mkswap.8.adoc | 2 +- disk-utils/sfdisk.8.adoc | 5 ++--- lib/terminal-colors.d.5.adoc | 32 ++++++++++++++------------------ login-utils/vipw.8.adoc | 4 ++-- schedutils/chrt.1.adoc | 14 +++++--------- schedutils/ionice.1.adoc | 29 ++++++++++++++--------------- schedutils/taskset.1.adoc | 5 ++--- schedutils/uclampset.1.adoc | 9 +++------ sys-utils/blkzone.8.adoc | 2 +- sys-utils/dmesg.1.adoc | 4 ++-- sys-utils/eject.1.adoc | 2 +- sys-utils/flock.1.adoc | 6 +++--- sys-utils/ipcmk.1.adoc | 2 +- sys-utils/ipcrm.1.adoc | 2 +- sys-utils/ipcs.1.adoc | 2 +- sys-utils/irqtop.1.adoc | 2 +- sys-utils/losetup.8.adoc | 2 +- sys-utils/lscpu.1.adoc | 2 +- sys-utils/lsipc.1.adoc | 4 ++-- sys-utils/lsirq.1.adoc | 2 +- sys-utils/lsmem.1.adoc | 2 +- sys-utils/lsns.8.adoc | 2 +- sys-utils/nsenter.1.adoc | 4 ++-- sys-utils/pivot_root.8.adoc | 2 +- sys-utils/prlimit.1.adoc | 4 ++-- sys-utils/readprofile.8.adoc | 13 +++++++++---- sys-utils/rfkill.8.adoc | 4 ++-- sys-utils/rtcwake.8.adoc | 6 +++--- sys-utils/setarch.8.adoc | 4 ++-- sys-utils/setpriv.1.adoc | 2 +- sys-utils/setsid.1.adoc | 2 +- sys-utils/swapon.8.adoc | 13 ++++++++----- sys-utils/tunelp.8.adoc | 2 +- sys-utils/umount.8.adoc | 2 +- sys-utils/unshare.1.adoc | 2 +- sys-utils/wdctl.8.adoc | 2 +- sys-utils/zramctl.8.adoc | 2 +- term-utils/agetty.8.adoc | 4 +--- term-utils/script.1.adoc | 2 +- term-utils/scriptlive.1.adoc | 2 +- term-utils/scriptreplay.1.adoc | 2 +- term-utils/setterm.1.adoc | 2 +- 52 files changed, 112 insertions(+), 120 deletions(-) commit d7f0a0dfffa138977d0910676ca87afd844949a3 Author: Mario Blättermann Date: Fri Mar 19 17:16:40 2021 +0100 Asciidoc: Remove already imported misc-utils *roff man pages misc-utils/blkid.8 | 343 ------------------------------------ misc-utils/cal.1 | 233 ------------------------- misc-utils/fincore.1 | 62 ------- misc-utils/findfs.8 | 79 --------- misc-utils/findmnt.8 | 316 --------------------------------- misc-utils/getopt.1.in | 464 ------------------------------------------------- misc-utils/hardlink.1 | 103 ----------- misc-utils/kill.1 | 240 ------------------------- misc-utils/logger.1 | 387 ----------------------------------------- misc-utils/look.1 | 123 ------------- misc-utils/lsblk.8 | 242 -------------------------- misc-utils/lslocks.8 | 108 ------------ misc-utils/mcookie.1 | 69 -------- misc-utils/namei.1 | 80 --------- misc-utils/rename.1 | 122 ------------- misc-utils/uuidd.8.in | 94 ---------- misc-utils/uuidgen.1 | 102 ----------- misc-utils/uuidparse.1 | 78 --------- misc-utils/whereis.1 | 166 ------------------ misc-utils/wipefs.8 | 152 ---------------- 20 files changed, 3563 deletions(-) commit 6c64d12d1370e6aa65f0739a99b82915dc4788ee Author: Mario Blättermann Date: Fri Mar 19 17:12:57 2021 +0100 Asciidoc: Import misc-utils man pages misc-utils/blkid.8.adoc | 172 +++++++++++++++++++++++++++++++ misc-utils/cal.1.adoc | 170 +++++++++++++++++++++++++++++++ misc-utils/fincore.1.adoc | 66 ++++++++++++ misc-utils/findfs.8.adoc | 78 +++++++++++++++ misc-utils/findmnt.8.adoc | 217 ++++++++++++++++++++++++++++++++++++++++ misc-utils/getopt.1.adoc | 156 +++++++++++++++++++++++++++++ misc-utils/hardlink.1.adoc | 93 +++++++++++++++++ misc-utils/kill.1.adoc | 119 ++++++++++++++++++++++ misc-utils/logger.1.adoc | 239 ++++++++++++++++++++++++++++++++++++++++++++ misc-utils/look.1.adoc | 114 +++++++++++++++++++++ misc-utils/lsblk.8.adoc | 174 ++++++++++++++++++++++++++++++++ misc-utils/lslocks.8.adoc | 111 ++++++++++++++++++++ misc-utils/mcookie.1.adoc | 68 +++++++++++++ misc-utils/namei.1.adoc | 86 ++++++++++++++++ misc-utils/rename.1.adoc | 107 ++++++++++++++++++++ misc-utils/uuidd.8.adoc | 95 ++++++++++++++++++ misc-utils/uuidgen.1.adoc | 80 +++++++++++++++ misc-utils/uuidparse.1.adoc | 83 +++++++++++++++ misc-utils/whereis.1.adoc | 126 +++++++++++++++++++++++ misc-utils/wipefs.8.adoc | 116 +++++++++++++++++++++ 20 files changed, 2470 insertions(+) commit 7f8b7774074867686bafac99c08157bce6cddc8f Author: Karel Zak Date: Fri Mar 19 16:39:27 2021 +0100 findmnt: add PARENT column Signed-off-by: Karel Zak misc-utils/findmnt.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 93737ad3518b98c3b42b4373cdd5d50376560f61 Author: Karel Zak Date: Fri Mar 19 14:54:34 2021 +0100 libfdisk: (gpt) returns location of the backup header too Reported-by: Lennart Poettering Signed-off-by: Karel Zak libfdisk/src/gpt.c | 12 ++++++++++++ libfdisk/src/label.c | 16 +++++++++++++--- 2 files changed, 25 insertions(+), 3 deletions(-) commit 1ad8db5521ec03d41a058674437f648d15ef8344 Author: Karel Zak Date: Thu Mar 18 10:23:36 2021 +0100 prlimit: fix optional arguments parsing $ prlimit -f=100:100 failed to parse FSIZE limit Fixes: https://github.com/karelzak/util-linux/issues/1265 Signed-off-by: Karel Zak sys-utils/prlimit.c | 3 +++ 1 file changed, 3 insertions(+) commit e899168a1d5c552008ad2df4cc4d18caf95e57b5 Author: Hannes Müller <> Date: Wed Mar 17 20:42:11 2021 +0100 more: fix ARROW_DOWN and PAGE_DOWN behaviour to not skip lines Currently ARROW_DOWN and PAGE_DOWN is bound to command 's' (skip lines). But this behaviour is not what the user expects, since at least one line is always missing! Furthermore at the end of the file there is typically this skipping lines message, if the remainder does not fit in a complete screen. This conflicts also with e.g. less and man PAGE_DOWN behaviour. The 'natural' behaviour is binding to more_kc_jump_lines_per_screen. If more is extended to also jump only a specific number of lines forward, this would be even a better binding for ARROW_DOWN. text-utils/more.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9f303a2bf425bfca4af46474947b06ae05832455 Author: Hannes Müller <> Date: Wed Mar 17 20:37:47 2021 +0100 more: fix command 'f' (screen forward) behaviour Currently 'f' behaves like 's', which is not correct according to man page. Bug was introduced with 1f861935a7292acbecc4d1618657e740e46175d9 text-utils/more.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) commit a48b5068a795f39f5a2a71096527d25bdca6b19e Author: Mario Blättermann Date: Wed Mar 17 20:00:15 2021 +0100 Asciidoc: Remove already imported login-utils *roff man pages login-utils/chfn.1 | 107 ------------- login-utils/chsh.1 | 67 -------- login-utils/last.1 | 198 ------------------------ login-utils/login.1 | 411 ------------------------------------------------- login-utils/lslogins.1 | 162 ------------------- login-utils/newgrp.1 | 33 ---- login-utils/nologin.8 | 83 ---------- login-utils/runuser.1 | 291 ---------------------------------- login-utils/su.1 | 339 ---------------------------------------- login-utils/sulogin.8 | 94 ----------- login-utils/utmpdump.1 | 92 ----------- login-utils/vipw.8 | 88 ----------- 12 files changed, 1965 deletions(-) commit a7574d8878a3c337858e31c962efcc8ede2603a6 Author: Mario Blättermann Date: Wed Mar 17 19:57:15 2021 +0100 Asciidoc: Import login-utils man pages login-utils/chfn.1.adoc | 91 +++++++++++++++++++ login-utils/chsh.1.adoc | 71 +++++++++++++++ login-utils/last.1.adoc | 132 ++++++++++++++++++++++++++++ login-utils/login.1.adoc | 209 ++++++++++++++++++++++++++++++++++++++++++++ login-utils/lslogins.1.adoc | 143 ++++++++++++++++++++++++++++++ login-utils/newgrp.1.adoc | 44 ++++++++++ login-utils/nologin.8.adoc | 72 +++++++++++++++ login-utils/runuser.1.adoc | 149 +++++++++++++++++++++++++++++++ login-utils/su.1.adoc | 167 +++++++++++++++++++++++++++++++++++ login-utils/sulogin.8.adoc | 80 +++++++++++++++++ login-utils/utmpdump.1.adoc | 91 +++++++++++++++++++ login-utils/vipw.8.adoc | 76 ++++++++++++++++ 12 files changed, 1325 insertions(+) commit 6e13cfed58d88a79498a8d9c4e59428b4458b3f7 Author: Karel Zak Date: Wed Mar 17 15:52:08 2021 +0100 meson: add missing HAVE_ definitions Signed-off-by: Karel Zak meson.build | 4 ++++ 1 file changed, 4 insertions(+) commit bdaed0cde46c59e0f29b1642b98a225f146d8c99 Author: Karel Zak Date: Wed Mar 17 15:42:26 2021 +0100 meson: update for new hardlink Signed-off-by: Karel Zak meson.build | 6 +++--- meson_options.txt | 2 +- misc-utils/meson.build | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) commit ec98fc6b1a139460b41379f49a50afe1717b006e Author: Karel Zak Date: Wed Mar 17 15:07:19 2021 +0100 meson: port localstatedir and sysconfdir Signed-off-by: Karel Zak meson.build | 2 ++ 1 file changed, 2 insertions(+) commit 308a097968f9724b14c90be6a9ceaac68849a856 Author: Karel Zak Date: Tue Feb 16 18:09:24 2021 +0100 meson: update sources and dependencies Signed-off-by: Karel Zak disk-utils/meson.build | 9 ++++++--- lib/Makemodule.am | 14 +++++++------- lib/meson.build | 48 ++++++++++++++++++++++++++++-------------------- libblkid/meson.build | 5 +++-- libsmartcols/meson.build | 1 - meson.build | 15 +++++++++++---- meson_options.txt | 5 +++++ misc-utils/meson.build | 9 +++++---- sys-utils/meson.build | 13 ++++++++++--- 9 files changed, 75 insertions(+), 44 deletions(-) commit 6e92db54cf192a2416605d556cf596de2e2a8517 Author: Karel Zak Date: Tue Feb 16 12:10:36 2021 +0100 meson: update configuration Signed-off-by: Karel Zak meson.build | 77 +++++++++++++++++++++++++++++-------------------------- meson_options.txt | 3 ++- 2 files changed, 43 insertions(+), 37 deletions(-) commit 69939195bdb8110738fcf5f8893f836be4edc468 Author: Zbigniew Jędrzejewski-Szmek Date: Mon May 11 12:06:39 2020 +0200 meson: implement building of static programs The whole thing is complicated by the fact that we have two layers of libraries: e.g. libmount also needs libblkid. If we just tell meson to make libmount static, this is not enough, because we also need it to link to a static libblkid. Hence in the case of libs that link to other libs internally, we need to create a different object with a a different set of link_with items. To avoid building the libraries twice, libfdisk and libmount are first built into an internal "convenience" library, which is then linked into the static and shared versions as appropriate. libblkid/meson.build | 2 + libfdisk/meson.build | 19 +++++-- libmount/meson.build | 21 ++++++-- libsmartcols/meson.build | 2 + meson.build | 136 +++++++++++++++++++++++++++++++++++++++++++++-- meson_options.txt | 9 ++++ 6 files changed, 177 insertions(+), 12 deletions(-) commit d4c880d5a4339d3865cbd7d30264785cd3794322 Author: Zbigniew Jędrzejewski-Szmek Date: Sun Feb 23 19:42:55 2020 +0100 meson: add second build system To build: meson build && ninja -C build To run tests: ninja -C build check To install for packaging: DESTDIR=/var/tmp/inst ninja -C build install To install for realz: sudo ninja -C build install v2: - Optional items are now based on the 'feature' feature in meson. Built libraries which are disabled turn into disabler() objects and also poison any executables which link to them. What is there: - building of the binaries and libs and the python module - installation of binaries, libs, python module, localization files, man pages, pkgconfig files - running of tests - most options to configure build equivalently to the ./configure settings Partially implemented: - disabling of stuff when things missing. In the C code, the defines are all used, so that should be fine. In the build system, some files should be skipped, but that is probably not always done properly. Getting this right might require some testing of various build option combinations to get the details right. Not implemented: - static builds of fdisk and other binaries - things marked with XXX or FIXME - ??? Differences: - .la files are not created. They are useless and everybody hates them. - Requires.private in pkgconfig files are not present in the autogenerated .pc file. Not sure if they should be there or not. If necessary, they can be added by hand. - man pages and systemd units are installed by the install target. Not sure why 'make install' doesn't do that. - the split between / and /usr is probably wrong. But it's all pointless anyway, so maybe we could simplify things but not implementing it at all under meson? .gitignore | 1 + disk-utils/meson.build | 95 ++ include/meson.build | 3 + lib/meson.build | 92 ++ libblkid/meson.build | 144 +++ libfdisk/meson.build | 67 + libmount/meson.build | 80 ++ libmount/python/meson.build | 34 + libsmartcols/meson.build | 48 + libuuid/meson.build | 60 + login-utils/meson.build | 75 ++ meson.build | 2828 +++++++++++++++++++++++++++++++++++++++++++ meson_options.txt | 184 +++ misc-utils/meson.build | 136 +++ po/LINGUAS | 27 + po/meson.build | 4 + sys-utils/meson.build | 232 ++++ term-utils/meson.build | 41 + tests/functions.sh | 24 +- tests/run.sh | 6 +- text-utils/meson.build | 43 + tools/meson-make-symlink.sh | 12 + 22 files changed, 4229 insertions(+), 7 deletions(-) commit 9fb5486c27300082c716df48058cdb82fb66756e Author: Zbigniew Jędrzejewski-Szmek Date: Thu Feb 27 12:13:09 2020 +0100 tests/run: create failure directory The test would occasionally fail with tests/run.sh: line 241: /home/fedora/util-linux/build/tests/failures: No such file or directory I don't quite understand why the file does not get created... The outupt directory missing seems the most likely explanation. tests/run.sh | 1 + 1 file changed, 1 insertion(+) commit d246854aa89a23abff4efc9c5b81e6fa3a8d8e8b Author: Karel Zak Date: Wed Mar 17 12:46:22 2021 +0100 tests: update build test results Update as usually before release to see differences (on Fedora 33). - static programs are not enabled by tools/config-gen.d/all.conf anymore (see 63f4e199287c6b2cfbb092f1e2b0f0a3e0e576e3) - add new uclampset - libdl and libpython3 seems unnecessary - fdformat disabled by default - new hardlink uses libpcre2-posix Signed-off-by: Karel Zak Signed-off-by: Karel Zak tests/expected/build-sys/config-all | 21 +++++---------- tests/expected/build-sys/config-all-non-nls | 21 +++++---------- tests/expected/build-sys/config-audit | 20 +++++---------- tests/expected/build-sys/config-chfnsh-libuser | 20 +++++---------- tests/expected/build-sys/config-chfnsh-no-password | 20 +++++---------- tests/expected/build-sys/config-chfnsh-pam | 20 +++++---------- tests/expected/build-sys/config-core | 20 +++++---------- tests/expected/build-sys/config-devel | 21 +++++---------- tests/expected/build-sys/config-devel-non-asan | 21 +++++---------- tests/expected/build-sys/config-devel-non-docs | 21 +++++---------- tests/expected/build-sys/config-disable-all | 8 ------ tests/expected/build-sys/config-enable-schedutils | 9 +------ tests/expected/build-sys/config-fuzz | 1 + tests/expected/build-sys/config-non-libblkid | 30 ++-------------------- tests/expected/build-sys/config-non-libmount | 18 ++++--------- tests/expected/build-sys/config-non-libs | 13 ++-------- tests/expected/build-sys/config-non-libsmartcols | 16 +++--------- tests/expected/build-sys/config-non-libuuid | 18 ++++--------- tests/expected/build-sys/config-non-nls | 20 +++++---------- tests/expected/build-sys/config-non-widechar | 8 ------ tests/expected/build-sys/config-selinux | 20 +++++---------- tests/expected/build-sys/config-slang | 16 +++--------- tests/expected/build-sys/config-static | 12 ++++----- 23 files changed, 107 insertions(+), 287 deletions(-) commit e86e30b89c13feb8dbb272705cc8dd3da59771e4 Author: Karel Zak Date: Wed Mar 17 12:45:40 2021 +0100 tools: use libcryptsetup in config-gen.d/all.conf Signed-off-by: Karel Zak tools/config-gen.d/all.conf | 1 + 1 file changed, 1 insertion(+) commit 4251413a14fddb2988bf25963448d554971f1963 Author: Mario Blättermann Date: Tue Mar 16 21:17:50 2021 +0100 Asciidoc: add missing bugreports section to libblkid and some cleanup libblkid/libblkid.3.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 47a2685b44006774ffda93dd889a3ab7f4fa9937 Author: Mario Blättermann Date: Tue Mar 16 21:13:57 2021 +0100 Asciidoc: Remove already imported disk-utils *roff man pages disk-utils/addpart.8 | 40 --- disk-utils/blockdev.8 | 105 -------- disk-utils/cfdisk.8 | 230 ---------------- disk-utils/delpart.8 | 27 -- disk-utils/fdformat.8 | 79 ------ disk-utils/fdisk.8 | 395 --------------------------- disk-utils/fsck.8 | 418 ----------------------------- disk-utils/fsck.cramfs.8 | 61 ----- disk-utils/fsck.minix.8 | 167 ------------ disk-utils/isosize.8 | 55 ---- disk-utils/mkfs.8 | 94 ------- disk-utils/mkfs.bfs.8 | 58 ---- disk-utils/mkfs.cramfs.8 | 90 ------- disk-utils/mkfs.minix.8 | 100 ------- disk-utils/mkswap.8 | 163 ------------ disk-utils/partx.8 | 198 -------------- disk-utils/raw.8 | 102 ------- disk-utils/resizepart.8 | 38 --- disk-utils/sfdisk.8 | 677 ----------------------------------------------- disk-utils/swaplabel.8 | 69 ----- 20 files changed, 3166 deletions(-) commit c6a568fccb118f0ceb52bdbf6e34dae4fe4e2e48 Author: Mario Blättermann Date: Tue Mar 16 21:08:43 2021 +0100 Asciidoc: Import disk-utils man pages disk-utils/addpart.8.adoc | 56 ++++++ disk-utils/blockdev.8.adoc | 124 +++++++++++++ disk-utils/cfdisk.8.adoc | 162 +++++++++++++++++ disk-utils/delpart.8.adoc | 42 +++++ disk-utils/fdformat.8.adoc | 91 ++++++++++ disk-utils/fdisk.8.adoc | 236 ++++++++++++++++++++++++ disk-utils/fsck.8.adoc | 169 ++++++++++++++++++ disk-utils/fsck.cramfs.8.adoc | 67 +++++++ disk-utils/fsck.minix.8.adoc | 117 ++++++++++++ disk-utils/isosize.8.adoc | 49 +++++ disk-utils/mkfs.8.adoc | 76 ++++++++ disk-utils/mkfs.bfs.8.adoc | 66 +++++++ disk-utils/mkfs.cramfs.8.adoc | 90 ++++++++++ disk-utils/mkfs.minix.8.adoc | 100 +++++++++++ disk-utils/mkswap.8.adoc | 112 ++++++++++++ disk-utils/partx.8.adoc | 151 ++++++++++++++++ disk-utils/raw.8.adoc | 70 ++++++++ disk-utils/resizepart.8.adoc | 54 ++++++ disk-utils/sfdisk.8.adoc | 405 ++++++++++++++++++++++++++++++++++++++++++ disk-utils/swaplabel.8.adoc | 60 +++++++ 20 files changed, 2297 insertions(+) commit ef63c72a33b6d1b640b5582bed7e57d3f91cb908 Author: Mario Blättermann Date: Tue Mar 16 19:41:23 2021 +0100 Asciidoc: Fix man pages with variables to use the same value as in previous *.in files sys-utils/hwclock.8.adoc | 32 ++++++++++++++++---------------- sys-utils/rtcwake.8.adoc | 2 +- 2 files changed, 17 insertions(+), 17 deletions(-) commit b366e6fc6b6292ae0b2b55ca0ad1ff8fcb2f331f Author: Mario Blättermann Date: Tue Mar 16 19:35:37 2021 +0100 Asciidoc: Remove already imported *roff man pages lib/terminal-colors.d.5 | 192 --- libblkid/libblkid.3 | 80 -- libuuid/man/uuid.3 | 66 - libuuid/man/uuid_clear.3 | 62 - libuuid/man/uuid_compare.3 | 68 - libuuid/man/uuid_copy.3 | 64 - libuuid/man/uuid_generate.3 | 139 --- libuuid/man/uuid_is_null.3 | 64 - libuuid/man/uuid_parse.3 | 86 -- libuuid/man/uuid_time.3 | 78 -- libuuid/man/uuid_unparse.3 | 81 -- schedutils/chrt.1 | 191 --- schedutils/ionice.1 | 141 --- schedutils/taskset.1 | 139 --- schedutils/uclampset.1 | 174 --- sys-utils/adjtime_config.5 | 64 - sys-utils/blkdiscard.8 | 90 -- sys-utils/blkzone.8 | 141 --- sys-utils/chcpu.8 | 104 -- sys-utils/chmem.8 | 114 -- sys-utils/choom.1 | 83 -- sys-utils/ctrlaltdel.8 | 58 - sys-utils/dmesg.1 | 274 ---- sys-utils/eject.1 | 196 --- sys-utils/fallocate.1 | 191 --- sys-utils/flock.1 | 206 --- sys-utils/fsfreeze.8 | 87 -- sys-utils/fstab.5 | 251 ---- sys-utils/fstrim.8 | 146 --- sys-utils/hwclock.8.in | 993 --------------- sys-utils/ipcmk.1 | 55 - sys-utils/ipcrm.1 | 118 -- sys-utils/ipcs.1 | 135 -- sys-utils/irqtop.1 | 78 -- sys-utils/ldattach.8 | 155 --- sys-utils/losetup.8 | 222 ---- sys-utils/lscpu.1 | 210 ---- sys-utils/lsipc.1 | 143 --- sys-utils/lsirq.1 | 62 - sys-utils/lsmem.1 | 100 -- sys-utils/lsns.8 | 92 -- sys-utils/mount.8 | 2903 ------------------------------------------- sys-utils/mountpoint.1 | 61 - sys-utils/nsenter.1 | 269 ---- sys-utils/pivot_root.8 | 75 -- sys-utils/prlimit.1 | 120 -- sys-utils/readprofile.8 | 151 --- sys-utils/renice.1 | 119 -- sys-utils/rfkill.8 | 120 -- sys-utils/rtcwake.8.in | 189 --- sys-utils/setarch.8 | 143 --- sys-utils/setpriv.1 | 251 ---- sys-utils/setsid.1 | 42 - sys-utils/swapon.8 | 280 ----- sys-utils/switch_root.8 | 61 - sys-utils/tunelp.8 | 122 -- sys-utils/umount.8 | 310 ----- sys-utils/unshare.1 | 414 ------ sys-utils/wdctl.8 | 74 -- sys-utils/zramctl.8 | 131 -- term-utils/agetty.8 | 532 -------- term-utils/mesg.1 | 118 -- term-utils/script.1 | 301 ----- term-utils/scriptlive.1 | 104 -- term-utils/scriptreplay.1 | 159 --- term-utils/setterm.1 | 307 ----- term-utils/wall.1 | 103 -- term-utils/write.1 | 101 -- 68 files changed, 13553 deletions(-) commit 34455501de74c405b56daa438ee3e839e92fbc17 Author: Mario Blättermann Date: Tue Mar 16 19:34:59 2021 +0100 Asciidoc: Adapt Makefiles to new asciidoc man pages Makefile.am | 18 ++++++++++++++++++ sys-utils/Makemodule.am | 2 -- 2 files changed, 18 insertions(+), 2 deletions(-) commit c8650db3438cafeef94a515be5c7ca71b272dac7 Author: Łukasz Stelmach Date: Tue Mar 16 12:53:13 2021 +0100 hwclock: fix indentation Fixes: 042f62dfc ("[clang-tidy] do not use else after return") Signed-off-by: Łukasz Stelmach sys-utils/hwclock-rtc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 075e9f9cbd2e11c4ab5b0e8abf0c6553129a831e Author: Karel Zak Date: Tue Mar 16 12:32:21 2021 +0100 build-sys: add EXTRA_LTLIBRARIES beween CLEANFILES Signed-off-by: Karel Zak Makefile.am | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f823700f61c999cf2897feaf4652d6ef3cdd10ad Author: Karel Zak Date: Mon Mar 15 16:37:47 2021 +0100 pylibmount: PyEval_Call* is deprecate, use PyObject_Call* Signed-off-by: Karel Zak libmount/python/tab.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ff3a3c3c49f0344d9db8f471974005b66f69a34f Merge: ef7e258b3 e18f057b5 Author: Karel Zak Date: Mon Mar 15 16:22:20 2021 +0100 Merge branch 'extra_ltlibraries' of https://github.com/bluca/util-linux * 'extra_ltlibraries' of https://github.com/bluca/util-linux: Automake: install uuidgen bash completion only if it is built Automake: use EXTRA_LTLIBRARIES instead of noinst_LTLIBRARIES commit ef7e258b3d5e5b24a89800710f84497c1461e5f6 Author: Karel Zak Date: Mon Mar 15 16:19:23 2021 +0100 libsmratcols: print title color only when wanted Reference: 676fb001d6b092470d5390adbd0424dfdecafa3c. Signed-off-by: Karel Zak libsmartcols/src/print.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit e18f057b5635e17c6f6272add4b3da4204f4600a Author: Luca Boccassi Date: Mon Mar 15 12:26:27 2021 +0000 Automake: install uuidgen bash completion only if it is built Check for BUILD_UUIDGEN instead of BUILD_LIBUUID bash-completion/Makemodule.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c65953d72bbc7412f32e566d9fa6e780d84f0696 Author: Luca Boccassi Date: Mon Mar 15 12:16:08 2021 +0000 Automake: use EXTRA_LTLIBRARIES instead of noinst_LTLIBRARIES noinst_LTLIBRARIES causes the libraries to be always built unconditionally. EXTRA_LTLIBRARIES causes them to be built only if other build target needs them. In other words, avoid building libcommon.a and libtcolors.a unless they are needed by another library/executable and save some build time. https://www.gnu.org/software/automake/manual/html_node/Libtool-Convenience-Libraries.html Makefile.am | 2 +- lib/Makemodule.am | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 056fc1747889b976637fd59f75fe4481fcfb878b Author: Mario Blättermann Date: Sun Mar 14 14:29:44 2021 +0100 Asciidoc: Import libuuid man pages libuuid/man/uuid.3.adoc | 79 ++++++++++++++++++++++++++++++ libuuid/man/uuid_clear.3.adoc | 74 ++++++++++++++++++++++++++++ libuuid/man/uuid_compare.3.adoc | 76 +++++++++++++++++++++++++++++ libuuid/man/uuid_copy.3.adoc | 78 ++++++++++++++++++++++++++++++ libuuid/man/uuid_generate.3.adoc | 102 +++++++++++++++++++++++++++++++++++++++ libuuid/man/uuid_is_null.3.adoc | 75 ++++++++++++++++++++++++++++ libuuid/man/uuid_parse.3.adoc | 86 +++++++++++++++++++++++++++++++++ libuuid/man/uuid_time.3.adoc | 79 ++++++++++++++++++++++++++++++ libuuid/man/uuid_unparse.3.adoc | 83 +++++++++++++++++++++++++++++++ 9 files changed, 732 insertions(+) commit 6cac37e3c15467573a37f1968ebb80e924a001fa Author: Mario Blättermann Date: Sun Mar 14 10:48:27 2021 +0100 Asciidoc: Import term-utils man pages term-utils/agetty.8.adoc | 332 +++++++++++++++++++++++++++++++++++++++++ term-utils/mesg.1.adoc | 114 ++++++++++++++ term-utils/script.1.adoc | 172 +++++++++++++++++++++ term-utils/scriptlive.1.adoc | 87 +++++++++++ term-utils/scriptreplay.1.adoc | 105 +++++++++++++ term-utils/setterm.1.adoc | 179 ++++++++++++++++++++++ term-utils/wall.1.adoc | 97 ++++++++++++ term-utils/write.1.adoc | 95 ++++++++++++ 8 files changed, 1181 insertions(+) commit 84851dc21f62a3fddd9a37718b4c2e768ca36cf7 Author: Mario Blättermann Date: Sun Mar 14 08:58:13 2021 +0100 Asciidoc: Import hwclock.8.in sys-utils/hwclock.8.adoc | 360 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 360 insertions(+) commit fd8c150483899f4d49bcb91572a8a95da69910ea Author: Mario Blättermann Date: Sat Mar 13 22:55:02 2021 +0100 Asciidoc: Import rtcwake.8.in man-common/README | 7 ++- sys-utils/rtcwake.8.adoc | 134 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 139 insertions(+), 2 deletions(-) commit b9d2ddfbb1275935a5233eff93e9a3b0b776af1c Author: Mario Blättermann Date: Sat Mar 13 22:33:34 2021 +0100 Asciidoc: Import sys-utils man pages, part 3 sys-utils/setarch.8.adoc | 104 ++++++++++++++++++ sys-utils/setpriv.1.adoc | 121 +++++++++++++++++++++ sys-utils/setsid.1.adoc | 53 ++++++++++ sys-utils/swapon.8.adoc | 173 ++++++++++++++++++++++++++++++ sys-utils/switch_root.8.adoc | 63 +++++++++++ sys-utils/tunelp.8.adoc | 72 +++++++++++++ sys-utils/umount.8.adoc | 186 ++++++++++++++++++++++++++++++++ sys-utils/unshare.1.adoc | 245 +++++++++++++++++++++++++++++++++++++++++++ sys-utils/wdctl.8.adoc | 73 +++++++++++++ sys-utils/zramctl.8.adoc | 112 ++++++++++++++++++++ 10 files changed, 1202 insertions(+) commit a09649ca89f5ba9ee13a7de4b90eabc7e7ea1253 Author: Mario Blättermann Date: Sat Mar 13 12:49:26 2021 +0100 Asciidoc: Use correct ':man manual:' for man pages from section 8 sys-utils/blkdiscard.8.adoc | 2 +- sys-utils/blkzone.8.adoc | 2 +- sys-utils/chcpu.8.adoc | 2 +- sys-utils/chmem.8.adoc | 2 +- sys-utils/ctrlaltdel.8.adoc | 2 +- sys-utils/fsfreeze.8.adoc | 2 +- sys-utils/fstrim.8.adoc | 2 +- sys-utils/ldattach.8.adoc | 2 +- sys-utils/losetup.8.adoc | 2 +- sys-utils/lsns.8.adoc | 2 +- sys-utils/mount.8.adoc | 2 +- sys-utils/pivot_root.8.adoc | 2 +- sys-utils/readprofile.8.adoc | 2 +- sys-utils/rfkill.8.adoc | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) commit 141796828506fb301055443125c4030fc8f8b1a6 Author: Mario Blättermann Date: Sat Mar 13 12:22:34 2021 +0100 Asciidoc: Import sys-utils man pages, part 2 sys-utils/mount.8.adoc | 1388 ++++++++++++++++++++++++++++++++++++++++++ sys-utils/mountpoint.1.adoc | 78 +++ sys-utils/nsenter.1.adoc | 147 +++++ sys-utils/pivot_root.8.adoc | 76 +++ sys-utils/prlimit.1.adoc | 147 +++++ sys-utils/readprofile.8.adoc | 119 ++++ sys-utils/renice.1.adoc | 110 ++++ sys-utils/rfkill.8.adoc | 90 +++ 8 files changed, 2155 insertions(+) commit 6d5b69483a58885d58f741de68d4c20286311fa5 Author: Mario Blättermann Date: Fri Mar 12 21:10:37 2021 +0100 Asciidoc: Import sys-utils man pages, part 1 sys-utils/adjtime_config.5.adoc | 64 ++++++++++++++ sys-utils/blkdiscard.8.adoc | 71 +++++++++++++++ sys-utils/blkzone.8.adoc | 121 +++++++++++++++++++++++++ sys-utils/chcpu.8.adoc | 89 +++++++++++++++++++ sys-utils/chmem.8.adoc | 98 +++++++++++++++++++++ sys-utils/choom.1.adoc | 64 ++++++++++++++ sys-utils/ctrlaltdel.8.adoc | 61 +++++++++++++ sys-utils/dmesg.1.adoc | 191 ++++++++++++++++++++++++++++++++++++++++ sys-utils/eject.1.adoc | 133 ++++++++++++++++++++++++++++ sys-utils/fallocate.1.adoc | 93 +++++++++++++++++++ sys-utils/flock.1.adoc | 136 ++++++++++++++++++++++++++++ sys-utils/fsfreeze.8.adoc | 65 ++++++++++++++ sys-utils/fstab.5.adoc | 160 +++++++++++++++++++++++++++++++++ sys-utils/fstrim.8.adoc | 95 ++++++++++++++++++++ sys-utils/ipcmk.1.adoc | 64 ++++++++++++++ sys-utils/ipcrm.1.adoc | 88 ++++++++++++++++++ sys-utils/ipcs.1.adoc | 109 +++++++++++++++++++++++ sys-utils/irqtop.1.adoc | 71 +++++++++++++++ sys-utils/ldattach.8.adoc | 132 +++++++++++++++++++++++++++ sys-utils/losetup.8.adoc | 169 +++++++++++++++++++++++++++++++++++ sys-utils/lscpu.1.adoc | 161 +++++++++++++++++++++++++++++++++ sys-utils/lsipc.1.adoc | 125 ++++++++++++++++++++++++++ sys-utils/lsirq.1.adoc | 60 +++++++++++++ sys-utils/lsmem.1.adoc | 85 ++++++++++++++++++ sys-utils/lsns.8.adoc | 87 ++++++++++++++++++ 25 files changed, 2592 insertions(+) commit 676fb001d6b092470d5390adbd0424dfdecafa3c Author: Karel Zak Date: Fri Mar 12 16:14:39 2021 +0100 libsmartcols: fix colors use * use color for all cell * always switch back to line color Signed-off-by: Karel Zak Documentation/TODO | 2 - libsmartcols/samples/Makemodule.am | 5 + libsmartcols/samples/colors.c | 125 ++++++++++++++++++++++++ libsmartcols/src/print.c | 188 ++++++++++++++++++++++++------------- libsmartcols/src/smartcolsP.h | 2 + 5 files changed, 257 insertions(+), 65 deletions(-) commit aad107b6d7fd695994941a7cee00433ca59ad0f7 Author: Mario Blättermann Date: Fri Mar 12 14:16:26 2021 +0100 Asciidoc: Import textutils man pages text-utils/col.1.adoc | 146 ++++++++++++++++++++++++++ text-utils/colcrt.1.adoc | 107 +++++++++++++++++++ text-utils/colrm.1.adoc | 84 +++++++++++++++ text-utils/column.1.adoc | 210 +++++++++++++++++++++++++++++++++++++ text-utils/hexdump.1.adoc | 260 ++++++++++++++++++++++++++++++++++++++++++++++ text-utils/line.1.adoc | 33 ++++++ text-utils/more.1.adoc | 209 +++++++++++++++++++++++++++++++++++++ text-utils/pg.1.adoc | 161 ++++++++++++++++++++++++++++ text-utils/rev.1.adoc | 75 +++++++++++++ text-utils/ul.1.adoc | 99 ++++++++++++++++++ 10 files changed, 1384 insertions(+) commit 1b73028b899328859bf106df9a12a1ec7446259c Author: Mario Blättermann Date: Fri Mar 12 13:34:59 2021 +0100 libblikid.3.adoc: Add missing SYNOPSIS section libblkid/libblkid.3.adoc | 2 ++ 1 file changed, 2 insertions(+) commit b09ed927d79c17d7cc9eec5224118b4effd3a896 Author: Karel Zak Date: Fri Mar 12 11:39:12 2021 +0100 tests: update mountpoint return code chack This is necessary due to e0ecd196414c03699cd8e8dd2c6f4fe533999837. Signed-off-by: Karel Zak tests/ts/mount/move | 5 +++++ 1 file changed, 5 insertions(+) commit 4e9be5a4391e4a41b21762537c81945e4fe520a2 Author: Karel Zak Date: Fri Mar 12 11:00:56 2021 +0100 findmnt: (man) add more info about --target Signed-off-by: Karel Zak misc-utils/findmnt.8 | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit da67bcf9382239620b3426a3dfaa37f3a69810fd Author: Mario Blättermann Date: Thu Mar 11 18:48:13 2021 +0100 Remove no longer valid part of man/common/README man-common/README | 8 -------- 1 file changed, 8 deletions(-) commit e2db4d9410ef1e2dbb53fd7dcd237a0625d7964e Author: Mario Blättermann Date: Thu Mar 11 18:38:46 2021 +0100 Add asciidoc man pages and some include files lib/terminal-colors.d.5.adoc | 175 ++++++++++++++++++++++++++++++++++++++++++ libblkid/libblkid.3.adoc | 64 +++++++++++++++ man-common/README | 16 ++++ man-common/bugreports.adoc | 3 + man-common/footer-config.adoc | 4 + man-common/footer-lib.adoc | 4 + man-common/footer.adoc | 4 + man-common/manpage-stub.adoc | 50 ++++++++++++ man-common/translation.adoc | 12 +++ schedutils/chrt.1.adoc | 160 ++++++++++++++++++++++++++++++++++++++ schedutils/ionice.1.adoc | 98 +++++++++++++++++++++++ schedutils/taskset.1.adoc | 125 ++++++++++++++++++++++++++++++ schedutils/uclampset.1.adoc | 141 ++++++++++++++++++++++++++++++++++ 13 files changed, 856 insertions(+) commit 70a7b61a846714842222209af12d63850b908220 Author: Karel Zak Date: Thu Mar 11 10:52:11 2021 +0100 tests: update mountpoint tests Signed-off-by: Karel Zak tests/expected/misc/mountpoint-nofollow | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e0ecd196414c03699cd8e8dd2c6f4fe533999837 Author: Karel Zak Date: Thu Mar 11 10:48:36 2021 +0100 mountpoint: different exit status for errors and non-mountpoint situation Fixes: https://github.com/karelzak/util-linux/issues/1260 Signed-off-by: Karel Zak sys-utils/mountpoint.1 | 12 +++++++++++- sys-utils/mountpoint.c | 8 ++++++-- 2 files changed, 17 insertions(+), 3 deletions(-) commit 6b6dbcbae6d1fb2ba195236c22722c701e026546 Author: Karel Zak Date: Wed Mar 10 16:15:30 2021 +0100 docs: update TODO Signed-off-by: Karel Zak Documentation/TODO | 5 +++++ 1 file changed, 5 insertions(+) commit c173ba11ec3b3c537a5e853298dff17e04c3df80 Author: Karel Zak Date: Wed Mar 10 11:30:53 2021 +0100 libsmartcols: add comments to private header file Signed-off-by: Karel Zak libsmartcols/src/smartcolsP.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2b1322f478d0149d3d570025dbec7cdf897b99a1 Author: Karel Zak Date: Wed Mar 10 10:21:57 2021 +0100 docs: update TODO Signed-off-by: Karel Zak Documentation/TODO | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit b4f60062090bbfdad539cbb050832db510351f39 Author: Karel Zak Date: Tue Mar 9 15:55:33 2021 +0100 lscpu: use size_t for ncolumns Signed-off-by: Karel Zak sys-utils/lscpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1242c3fde7c62e8426cb3111ebbc45e8f1391080 Author: Karel Zak Date: Tue Mar 9 10:37:36 2021 +0100 lscpu: support +list for -e, -p and -C For example "lscpu -e=+MHZ" to list the default columns and MHZ. We use the same in other tools. Signed-off-by: Karel Zak sys-utils/lscpu.1 | 9 +++++++++ sys-utils/lscpu.c | 27 +++++++++++++++++---------- 2 files changed, 26 insertions(+), 10 deletions(-) commit 0b83e26373d2b81fc40318f2bb03a2b81525ab1c Author: Karel Zak Date: Mon Mar 8 11:25:15 2021 +0100 lscpu: add info that caches sizes are sum Addresses: https://github.com/karelzak/util-linux/issues/1258 Signed-off-by: Karel Zak sys-utils/lscpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 347332796fc9199bd75a4e1bb1a0af095f16f2af Author: Karel Zak Date: Mon Mar 8 10:56:47 2021 +0100 fdisk: (man) add info about order for -l Reported-by: Dan Jacobson Signed-off-by: Karel Zak disk-utils/fdisk.8 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 81329c8d1c4f6b22bcd521a70e3754d810ff9eac Author: Karel Zak Date: Thu Mar 4 11:27:47 2021 +0100 hwclock: use pointer to adjtime data Signed-off-by: Karel Zak sys-utils/hwclock.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit f3a7b057ac28adaaf81c503abab2d8731cdc9b0c Author: Andrew Shapiro Date: Mon Mar 1 13:18:27 2021 -0500 utmpdup: Ensure flushing when using follow flag The following usages of utmpdump result in no output being flushed to the specified file because the default output buffering is fully buffered: $ utmpdump --follow --output myOutputFile /var/log/utmp $ utmpdump --follow /var/log/utmp > myOutputFile This change configures line buffering for these scenarios so that output will be flushed after each log event. Signed-off-by: Andrew Shapiro login-utils/utmpdump.c | 4 ++++ 1 file changed, 4 insertions(+) commit 50cc633257aa0844dd01e9572d6b0ddbfb19f6d5 Author: Karel Zak Date: Mon Mar 1 16:50:20 2021 +0100 dmesg: fix and cleanup --read-clear The function read_buffer() implements read and clear functionally, but we do not differentiate between these actions in main() for error messages, and one generic "dmesg: read kernel buffer failed" is used in all cases. That's a bug. This patch removes the "clear" action from read_buffer() and keeps it for buffer reading only. The "clear" action is implemented in main() by separate klogctl(SYSLOG_ACTION_CLEAR) for cases. It means also for "dmesg --read-clear"; we do not use SYSLOG_ACTION_READ_CLEAR anymore. Now "clear+read" is: * syslog: SYSLOG_ACTION_READ_ALL + SYSLOG_ACTION_CLEAR * kmsg: /dev/kmsg read() + SYSLOG_ACTION_CLEAR In old versions "dmesg --syslog --read-clear" (syalog backed) was implemented by logctl(SYSLOG_ACTION_READ_CLEAR) and it returns no data for non-root users (due to EPERM), "dmesg --read-clear" (kmsg) returns data and EPERM for the "clear" action. Now the command "dmesg --syslog --read-clear" and "dmesg --read-clear" behaves in the same way -- returns data and EPERM for the "clear" action. Fixes: https://github.com/karelzak/util-linux/issues/1255 Signed-off-by: Karel Zak sys-utils/dmesg.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) commit 66134b5c2bbd22bf69d5afc0f6fbd7b827b37305 Author: Karel Zak Date: Mon Mar 1 14:51:28 2021 +0100 lsblk: update man page Signed-off-by: Karel Zak misc-utils/lsblk.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7de3b2ce59831b55211e36475511f0c8d381ff81 Merge: 55d2dfa12 679686b27 Author: Karel Zak Date: Mon Mar 1 14:46:50 2021 +0100 Merge branch 'master' of https://github.com/adigitoleo/util-linux commit 679686b27ca971624f288c61a8d84f2f32bbb8db Author: Leon Date: Mon Mar 1 22:47:27 2021 +1100 Update lsblk.8 misc-utils/lsblk.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 55d2dfa12ceb88a8aebcbb69eb358ac5c9518fe7 Author: Karel Zak Date: Thu Feb 25 14:37:17 2021 +0100 irqtop: check scols_line_set_data() return code Signed-off-by: Karel Zak sys-utils/irq-common.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 61074478fa4066113944ed7496516951c4f3aa06 Author: Karel Zak Date: Thu Feb 25 09:57:49 2021 +0100 irqtop: small cleanup Signed-off-by: Karel Zak sys-utils/irq-common.c | 32 ++++++++++++++++---------------- sys-utils/irq-common.h | 4 ++-- 2 files changed, 18 insertions(+), 18 deletions(-) commit 3d0620a9a8078b9c5aa065cbdd3f07c9abf81138 Author: Štěpán Němec Date: Tue Feb 23 16:25:54 2021 +0100 su: fix man page typos Signed-off-by: Štěpán Němec login-utils/su.1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit a23aecc1bfcde8b66eff3c261f1d972fcbe06d62 Author: Karel Zak Date: Wed Feb 24 20:10:56 2021 +0100 irqtop: add per-cpu stats irqtop | total: 1245107402 delta: 7394 | ws.net.home | 2021-02-24 20:11:09+01:00 cpu0 cpu1 cpu2 cpu3 cpu4 cpu5 cpu6 cpu7 %irq: 12.9 13.0 12.8 11.9 12.4 13.4 11.6 12.0 %delta: 13.7 9.7 22.6 7.9 9.5 17.5 8.3 10.8 IRQ TOTAL DELTA NAME LOC 989162414 6111 Local timer interrupts TLB 100492740 67 TLB shootdowns CAL 95058001 321 Function call interrupts 42 23893801 241 IR-PCI-MSI 1048576-edge nvidia 30 20209392 494 IR-PCI-MSI 327680-edge xhci_hcd RES 12996335 86 Rescheduling interrupts 29 1354219 4 IR-PCI-MSI 512000-edge ahci[0000:00:1f.2] 41 682653 31 IR-PCI-MSI 409600-edge eno1 ... Signed-off-by: Karel Zak sys-utils/irq-common.c | 101 ++++++++++++++++++++++++++++++++++++++++++++++++- sys-utils/irq-common.h | 12 +++++- sys-utils/irqtop.c | 18 +++++++-- 3 files changed, 124 insertions(+), 7 deletions(-) commit 1b889dcc07fcbf1ca797082d3a45f89e028d6b07 Author: Karel Zak Date: Wed Feb 24 14:29:20 2021 +0100 irqtop: print header in reverse mode Signed-off-by: Karel Zak sys-utils/irqtop.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) commit 244fc4d57d9d8f8941d8f9e2e0082989086b8594 Author: Karel Zak Date: Wed Feb 24 13:06:40 2021 +0100 docs: update TODO (scols borders) Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1931776 Signed-off-by: Karel Zak Documentation/TODO | 6 ++++++ 1 file changed, 6 insertions(+) commit 17d5b264367debb745b678fcafacbaa938b29455 Author: Karel Zak Date: Tue Feb 23 11:52:45 2021 +0100 su: (pty) change owner and mode for pty The current situation: # su --pty - kzak $ ll $(tty) crw--w---- 1 root tty 136, 9 Feb 23 11:53 /dev/pts/9  $ mesg mesg: cannot open /dev/pts/9: Permission denied the pseudo-terminal is still owned by the original user. New version: # su --pty - kzak  # ll $(tty) crw--w---- 1 kzak tty 136, 9 Feb 23 11:56 /dev/pts/9  # mesg is y The patch follows login(1) to change the pty owner and group. It follows "TTYPERM" and "TTYGROUP" from login.defs (or econf lib). Signed-off-by: Karel Zak include/pty-session.h | 2 ++ lib/pty-session.c | 9 +++++++++ login-utils/su-common.c | 26 ++++++++++++++++++++++++-- 3 files changed, 35 insertions(+), 2 deletions(-) commit 726ffb4a26153e1ae881612065940580f0a24cdb Author: Karel Zak Date: Tue Feb 23 11:46:10 2021 +0100 login: move generic setting to ttyutils.h Signed-off-by: Karel Zak include/ttyutils.h | 7 +++++++ login-utils/login.c | 7 ------- 2 files changed, 7 insertions(+), 7 deletions(-) commit 497c61f7b038ee7e0b776c3f3dfb3c31ede1a148 Author: Karel Zak Date: Tue Feb 23 11:37:15 2021 +0100 su: explicitly enable echo for --pty Since 75ccd75a2fa1194c6415c47b0024a438e26f1ad7 we need to explicitly set echo flag by ul_pty_slave_echo(pty, 1). Signed-off-by: Karel Zak login-utils/su-common.c | 2 ++ 1 file changed, 2 insertions(+) commit 8d720dbed6b8c2c1f899b9123f76404b51ba4459 Author: Karel Zak Date: Tue Feb 23 09:25:57 2021 +0100 fdisk: support partition type name in dialogs Command (m for help): t Selected partition 1 Partition type or alias (type L to list all): linux root x86 Changed type of partition 'Linux /usr (x86)' to 'Linux root (x86)'. Signed-off-by: Karel Zak disk-utils/fdisk.c | 1 + 1 file changed, 1 insertion(+) commit 45c2daa61228d198800e2e63ba9be20d90e2a8f9 Author: Karel Zak Date: Tue Feb 23 09:21:40 2021 +0100 sfdisk: support for type="partition type name" For example: # echo 'size=10MiB, type="linux usr x86"' | sfdisk /dev/sdc ... New situation: Device Start End Sectors Size Type /dev/sdc1 2048 22527 20480 10M Linux /usr (x86) Signed-off-by: Karel Zak disk-utils/sfdisk.8 | 7 ++++++- disk-utils/sfdisk.c | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) commit 5353ba3f0d4cd40e6ede294258ae1a7716fd42a1 Author: Karel Zak Date: Tue Feb 23 09:19:51 2021 +0100 libfdisk: support partition type name parsing Add to fdisk_label_advparse_parttype() support for FDISK_PARTTYPE_PARSE_NAME to parse partition type name. Signed-off-by: Karel Zak libfdisk/src/libfdisk.h.in | 3 +++ libfdisk/src/parttype.c | 21 +++++++++++++++++++++ libfdisk/src/script.c | 1 + 3 files changed, 25 insertions(+) commit 27e6b3a92e3dddb61ca8b15dfa61c6a41388a9c4 Author: Karel Zak Date: Tue Feb 23 09:19:48 2021 +0100 lib/strutils: add ul_stralnumcmp() Signed-off-by: Karel Zak include/strutils.h | 1 + lib/strutils.c | 38 +++++++++++++++++++++++++++++++++++++- 2 files changed, 38 insertions(+), 1 deletion(-) commit 3d2899651791bcb4ee8fe4e605acc83f3ae3471b Author: Karel Zak Date: Fri Feb 19 12:04:39 2021 +0100 build-sys: set localstatedir and sysconfdir default Let's follow our policy for default directories and explicitly default to localstatedir=/var and sysconfdir=/etc when the default $prefix is used. Reported-by: Bruce Dubbs Signed-off-by: Karel Zak configure.ac | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) commit 4f62b0b1dd0aea388861054cbcb180bbf93343fa Author: Karel Zak Date: Thu Feb 18 11:15:48 2021 +0100 readprofile: fix static analyzer warning [coverity scan] Make sure we do not use step=0 and zero "fn_add - add0" as divisor. Signed-off-by: Karel Zak sys-utils/readprofile.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 061e26d06df54e9ba6fd092b230206e4c3c5e6dc Author: Karel Zak Date: Thu Feb 18 11:09:31 2021 +0100 rfkill: fix static analyzer warning [coverity scan] >>> CID 365738: Uninitialized variables (UNINIT) >>> Using uninitialized value "ret". Field "ret" is uninitialized. 326 return ret; Signed-off-by: Karel Zak sys-utils/rfkill.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 36c67e033e4d5974ba03a149684c1831475cba20 Author: Karel Zak Date: Thu Feb 18 10:48:47 2021 +0100 hardlink: fix typo in man page Addresses: https://github.com/karelzak/util-linux/commit/3292501316f5731d8e311a000012b49a411a36e6#commitcomment-47222034 Signed-off-by: Karel Zak misc-utils/hardlink.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 296b58a79e21be1b575869c7b37cc06d7c6c2a41 Author: Karel Zak Date: Wed Feb 17 12:25:49 2021 +0100 libmount: (python) fix compiler warning Signed-off-by: Karel Zak libmount/python/context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 71ba2792ab3f96b5f5d5d3b0a68d35ecfd0f93a2 Author: Karel Zak Date: Wed Feb 17 12:24:13 2021 +0100 lib: use procutils.c on Linux only Fixes: https://github.com/karelzak/util-linux/issues/1251 Signed-off-by: Karel Zak lib/Makemodule.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5c7cac85c9324a201b4a5d426903f4b5b0e497c7 Author: Karel Zak Date: Wed Feb 17 11:48:03 2021 +0100 hardlink: fix indention The original Julian's hardlink.c code is pretty readable, but for util-linux we use a little different indention (aka Linux kernel coding style). Signed-off-by: Karel Zak misc-utils/hardlink.c | 1229 +++++++++++++++++++++++++------------------------ 1 file changed, 623 insertions(+), 606 deletions(-) commit 4bf9ebca2bb8f1d62395c4b17449cb151e003f92 Author: Karel Zak Date: Wed Feb 17 11:15:45 2021 +0100 tests: update hardlink tests The important is result, not summary or verbose output. Signed-off-by: Karel Zak tests/expected/hardlink/options-dryrun | 6 ------ tests/expected/hardlink/options-nargs | 6 ------ tests/ts/hardlink/options | 10 +++++----- 3 files changed, 5 insertions(+), 17 deletions(-) commit 4c467ebc5cb53d58956112f9466b7507f639e585 Author: Karel Zak Date: Wed Feb 17 11:14:54 2021 +0100 hardlink: add --quiet option Signed-off-by: Karel Zak misc-utils/hardlink.1 | 3 +++ misc-utils/hardlink.c | 20 ++++++++++++++++++-- 2 files changed, 21 insertions(+), 2 deletions(-) commit 3292501316f5731d8e311a000012b49a411a36e6 Author: Karel Zak Date: Fri Feb 5 11:42:44 2021 +0100 hardlink: cleanup man page Signed-off-by: Karel Zak misc-utils/hardlink.1 | 66 ++++++++++++++++++++++++++++++--------------------- 1 file changed, 39 insertions(+), 27 deletions(-) commit 5034cd9f2b4137d06e283d51a4fd7190cd3e73a1 Author: Karel Zak Date: Fri Feb 5 11:13:13 2021 +0100 hardlink: s/DEBUG/VERBOSE/ We usually use "debug" for very detailed information. For end-user information is better to talk about "verbose" output. Signed-off-by: Karel Zak misc-utils/hardlink.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 82e32c0659ae626bd46ead0ccba3fbc17f7e77dd Author: Karel Zak Date: Fri Feb 5 11:09:50 2021 +0100 hardlink: translate verbose messages Signed-off-by: Karel Zak misc-utils/hardlink.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 053ef448a67743d6d2e47a20214b26e83481bd62 Author: Karel Zak Date: Fri Feb 5 11:06:48 2021 +0100 hardlink: cleanup summary Signed-off-by: Karel Zak misc-utils/hardlink.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 423e80c1e9c7eebfef6ec51f6a2d020928d9e30e Author: Karel Zak Date: Fri Feb 5 10:58:29 2021 +0100 hardlink: use size_to_human_string() Signed-off-by: Karel Zak misc-utils/hardlink.c | 58 +++++++++++++++++++++------------------------------ 1 file changed, 24 insertions(+), 34 deletions(-) commit 3c52b1c83c5bbfbb9d72dd5fc39bd885d3efde6b Author: Karel Zak Date: Thu Feb 4 13:56:45 2021 +0100 hardlink: use only err.h to print errors and warnings Signed-off-by: Karel Zak misc-utils/hardlink.c | 43 ++++++++++++++----------------------------- 1 file changed, 14 insertions(+), 29 deletions(-) commit 06d8fe89093568fca9864ca14f93a0d9e9640857 Author: Karel Zak Date: Thu Feb 4 13:43:05 2021 +0100 hardlink: use monotonic time like other utils - use out gettime_monotonic() - use timeval for calculation rather than double Signed-off-by: Karel Zak misc-utils/Makemodule.am | 4 ++-- misc-utils/hardlink.c | 28 +++++++++++----------------- 2 files changed, 13 insertions(+), 19 deletions(-) commit ec194114e140b25fdd80932a9f90309fe5250271 Author: Karel Zak Date: Thu Feb 4 13:23:32 2021 +0100 hardlink: use errx() when parse options Don't waste time with some cleanup on --exclude and --include regex errors. Signed-off-by: Karel Zak misc-utils/hardlink.c | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) commit c12b63944364af7b8acc2f12be27a1cfe15e9353 Author: Karel Zak Date: Thu Feb 4 13:14:51 2021 +0100 hardlink: use err() if possible Signed-off-by: Karel Zak misc-utils/hardlink.c | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) commit 631e6865e3b3b409ee4ee14c2f03ebf41d821a2e Author: Karel Zak Date: Thu Feb 4 13:06:56 2021 +0100 hardlink: cleanup --minimum-size stuff * use uintmax_t * use strtosize_or_err() * add info about suffixes to man page Signed-off-by: Karel Zak misc-utils/hardlink.1 | 8 ++++---- misc-utils/hardlink.c | 37 +++++++------------------------------ 2 files changed, 11 insertions(+), 34 deletions(-) commit 9e7235e7e07a79c328a5e037c4060e51ec58411c Author: Karel Zak Date: Thu Feb 4 12:54:45 2021 +0100 hardlink: move default to options initialization Signed-off-by: Karel Zak misc-utils/hardlink.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit d2c3c5a68414ad309f3b6925901ef7159e9eb598 Author: Karel Zak Date: Thu Feb 4 12:50:10 2021 +0100 hardlink: cleanup usage() Let's make --help more util-linux compatible. Signed-off-by: Karel Zak misc-utils/hardlink.c | 92 ++++++++++++++++++++++----------------------------- 1 file changed, 40 insertions(+), 52 deletions(-) commit 0361f7440c2e2621b7498f8bb29348aded0d8b86 Author: Karel Zak Date: Thu Feb 4 12:19:34 2021 +0100 hardlink: use our xalloc.h Signed-off-by: Karel Zak misc-utils/hardlink.c | 60 ++++++++++----------------------------------------- 1 file changed, 11 insertions(+), 49 deletions(-) commit 40b119b990b33b5b76e5f09e4fbc844e5b1310fc Author: Karel Zak Date: Thu Feb 4 12:14:13 2021 +0100 hardlink: check and use sys/xattr.h Signed-off-by: Karel Zak configure.ac | 1 + misc-utils/hardlink.c | 12 +++++------- 2 files changed, 6 insertions(+), 7 deletions(-) commit 43989bad9e4b863d1655e63ad2924b060e0459a6 Author: Karel Zak Date: Thu Feb 4 12:06:53 2021 +0100 hardlink: use PRCE2 posix header file Signed-off-by: Karel Zak configure.ac | 11 +++++++---- misc-utils/Makemodule.am | 6 +++--- misc-utils/hardlink.c | 18 ++++++------------ 3 files changed, 16 insertions(+), 19 deletions(-) commit cd6b8d39263830435b1590aa1c97fc126e9a3f60 Author: Karel Zak Date: Thu Feb 4 11:12:21 2021 +0100 hardlink: cleanup includes and types * use config.h like other code on package * use c.h and remove from code stuff defined in the header file * remove FALSE/TRUE redefinition Signed-off-by: Karel Zak misc-utils/hardlink.c | 71 +++++++++++++-------------------------------------- 1 file changed, 18 insertions(+), 53 deletions(-) commit 2180ecc81b5f7635adbe5412010642e15fa212d3 Author: Karel Zak Date: Thu Feb 4 10:42:53 2021 +0100 hardlink: replace with code from Debian The current version used in util-linux is based on original code from Jakub Jelinek. The new version is based on Debian implementation from https://salsa.debian.org/jak/hardlink. This new version uses nftw() to walk on directories tree and organize internal data binary tree (tsearch() and twalk()). This new version provides more features like --ignore-{mode,owner,time}, --respect-xattrs, --respect-name, --include, --keep-oldest, --minimize, --maximize, etc. Note that the new version uses -f for --respect-name, the old version uses -f to hardlinking across filesystems (very probably rarely unused feature). Addresses: https://github.com/karelzak/util-linux/issues/808 Signed-off-by: Karel Zak misc-utils/hardlink.1 | 131 ++-- misc-utils/hardlink.c | 1642 ++++++++++++++++++++++++++++++++++--------------- 2 files changed, 1237 insertions(+), 536 deletions(-) commit a7c22c164b77d07fc3f26571d56ea4d6daefcc89 Author: Evgeny Vereshchagin Date: Mon Feb 15 13:25:19 2021 +0000 ci: trigger CiFuzz for the master branch only CIFuzz and OSS-Fuzz are in sync with the master branch so it would probably make sense to avoid running it for long-lived branches. Inspired by https://github.com/karelzak/util-linux/pull/1248#issuecomment-776342252 Signed-off-by: Evgeny Vereshchagin .github/workflows/cifuzz.yml | 2 ++ 1 file changed, 2 insertions(+) commit 15a37d00e5e59f0f628d0a6b6cd2f9636702fd7c Author: Karel Zak Date: Thu Feb 11 12:44:44 2021 +0100 tests: don't reply on scsi_debug partitions The disk layout as created by scsi_debug depends on kernel version. Let's make the partition sizes hardcoded in our tests than rely on kernel. Signed-off-by: Karel Zak tests/expected/partx/partx-detect-parts | 6 +++--- tests/ts/partx/partx | 14 +++++++++++--- 2 files changed, 14 insertions(+), 6 deletions(-) commit e1efda47dd881a2216297c86499c65315b052b4b Author: Karel Zak Date: Thu Feb 11 11:49:56 2021 +0100 libfdisk: (dos) fix last possible sector calculation * rename 'last' to 'first' as we use this value as the first available free sector rather than last used * use '-1' when calculate last partition sector to compare with last disk sector * improve debug messages Fixes: https://github.com/karelzak/util-linux/issues/1249 Signed-off-by: Karel Zak libfdisk/src/dos.c | 24 +++++++++++++++++------- libfdisk/src/table.c | 4 ++-- 2 files changed, 19 insertions(+), 9 deletions(-) commit ee978576b10cf0d62d7ef2081fa627e21dbf9d88 Author: Sami Loone Date: Tue Feb 9 10:46:36 2021 +0100 agetty: tty eol defaults to REPRINT Adapting tty eol settings from defaults misbehaves as CTRL('r') aka REPRINT is confused with CR. Consequently --skip-login does not set tty CR<->NL translations and thus acts against advertised CR as eol default. [kzak@redhat.com: It seems this issue has been introduced by commit f566447 where we merged sulogin and agetty terminal initialization together to the file include/ttyutils.h. The original agetty has really used .eol=13 (aka CR) for the default. The problem is invisible for sulogin(1) because it always asks for a password and .eol= is set to NL/CR, the same agetty when it asks for username.] Addresses: https://github.com/karelzak/util-linux/pull/1247 Signed-off-by: Karel Zak include/ttyutils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 78d43728b1af991ef72ce5a3e49861297dd9d065 Merge: c3a635033 037c7816c Author: Karel Zak Date: Wed Feb 10 10:52:16 2021 +0100 Merge branch 'switch_root-check-if-mounted' of https://github.com/Whissi/util-linux commit c3a63503350ecfca2f38c506feb1a9e3c8e3aa30 Author: Karel Zak Date: Tue Feb 9 18:02:13 2021 +0100 tests: be explicit with file permissions for cramfs Signed-off-by: Karel Zak tests/ts/cramfs/mkfs | 10 ++++++++-- tests/ts/cramfs/mkfs-endianness | 6 +++++- 2 files changed, 13 insertions(+), 3 deletions(-) commit b6787fca021945d06bcb016c3bd245ec0bdaf92e Author: Karel Zak Date: Tue Feb 9 10:36:04 2021 +0100 libmount: fix /{etc,proc}/filesystems use * always update context->helper * consolidate helper and syscall status use Signed-off-by: Karel Zak libmount/src/context.c | 5 +++++ libmount/src/context_mount.c | 18 +++++++++++++++--- 2 files changed, 20 insertions(+), 3 deletions(-) commit 037c7816cec2c6a768edd85ec3c305ff7194e035 Author: Thomas Deutschmann Date: Mon Feb 8 15:30:25 2021 +0100 switch_root: check if mount point to move even exists Signed-off-by: Thomas Deutschmann sys-utils/switch_root.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit d4b58873549e1931a170a9087359c6e49b277e6c Author: Karel Zak Date: Mon Feb 8 15:01:33 2021 +0100 build-sys: add --disable-scriptutils This new ./configure option disables script, scriptreplay ans scriptlive. Fixes: https://github.com/karelzak/util-linux/issues/1244 Signed-off-by: Karel Zak configure.ac | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) commit f458782f14f97111139cb88ab2dbbaf5c874674e Author: Karel Zak Date: Mon Feb 8 14:47:38 2021 +0100 libsmartcols: remove unnecessary code Fixes: https://github.com/karelzak/util-linux/pull/1243 Signed-off-by: Karel Zak libsmartcols/src/calculate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 56fc4adac9ad54871eb068720151bbcfbcd5cff9 Author: Karel Zak Date: Fri Feb 5 15:21:56 2021 +0100 github: fix distcheck job Signed-off-by: Karel Zak .github/workflows/cibuild.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 63900c506b944038631ddec2e52bdd4f39bfa266 Author: Karel Zak Date: Fri Feb 5 15:03:49 2021 +0100 github: add 'distcheck' workflow job Signed-off-by: Karel Zak .github/workflows/cibuild.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit ec89bec1cddd6984fecdc7b1a2fc7f323058b856 Merge: 0edc23954 f30ec3eee Author: Karel Zak Date: Fri Feb 5 10:29:26 2021 +0100 Merge branch 'gh-actions-bionic' of https://github.com/mrc0mmand/util-linux * 'gh-actions-bionic' of https://github.com/mrc0mmand/util-linux: ci: run the build test for each pull request ci: build both w/ and w/o sanitizers on GH Actions ci: code cleanup ci: deal with uninstrumented binaries using instrumented libs text-utils: correctly detect ASan under clang ci: use the correct compiler version ci: 'downgrade' Ubuntu version to Bionic commit 0edc239542416648a5462f144251c4110d24e2cb Author: Karel Zak Date: Fri Feb 5 10:23:04 2021 +0100 build-sys: fix schedutils/sched_attr.h include Signed-off-by: Karel Zak schedutils/Makemodule.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9c7a613c82692753a8ac48630c7af89f1805df2a Author: Karel Zak Date: Wed Feb 3 14:45:15 2021 +0100 login: use full tty path for PAM_TTY pam_set_item() man page: PAM_TTY The terminal name: prefixed by /dev/ if it is a device file; for graphical, X-based, applications the value for this item should be the $DISPLAY variable. It seems for example pam_timestamp module is not robust enough to differentiate between /dev/ and pty/0 and it assumes that '/' in the path always means '/dev/' prefix ... Fixes: https://github.com/karelzak/util-linux/issues/1242 Signed-off-by: Karel Zak login-utils/login.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 61653767371048c805ae8032951476c547d19e09 Author: Karel Zak Date: Wed Feb 3 14:45:15 2021 +0100 su: use full tty path for PAM_TTY pam_set_item() man page: PAM_TTY The terminal name: prefixed by /dev/ if it is a device file; for graphical, X-based, applications the value for this item should be the $DISPLAY variable. It seems for example pam_timestamp module is not robust enough to differentiate between /dev/ and pty/0 and it assumes that '/' in the path always means '/dev/' prefix ... Fixes: https://github.com/karelzak/util-linux/issues/1242 Signed-off-by: Karel Zak login-utils/su-common.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 82643a9be507bd20df98d38c8248299d1084ac74 Author: Karel Zak Date: Tue Feb 2 16:32:51 2021 +0100 build-sys: cleanup uclampset dependencies chrt requires sched_setattr() or sched_setscheduler(), the both is covered by have_schedsetter variable in ./configure.ac. This variable is useless for uclampset, because it requires sched_setattr(). Let's make it more explicit for uclampset. Signed-off-by: Karel Zak configure.ac | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit f4b07719ee74f7d01b09255f6ebacde1d33cd48b Author: Karel Zak Date: Tue Feb 2 12:40:39 2021 +0100 uclampset: cleanup --hel output Signed-off-by: Karel Zak schedutils/uclampset.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 12d776c8339b3fabfd21162bba8e12d5f609f131 Author: Karel Zak Date: Tue Feb 2 12:39:57 2021 +0100 include/pathnames: cleanup /proc/sys/kernel use Signed-off-by: Karel Zak include/pathnames.h | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) commit 9a823f1536098b5b89d31ed984e5939c78a79c7b Merge: 5df455dbb 860112cb2 Author: Karel Zak Date: Tue Feb 2 16:53:50 2021 +0100 Merge branch 'uclampset-v3' of https://github.com/qais-yousef/util-linux * 'uclampset-v3' of https://github.com/qais-yousef/util-linux: uclampset: Plumb in bash-completion uclampset: Plump into the build system uclampset: Add man page Add uclampset schedutil Move sched_attr struct and syscall definitions into header file commit 860112cb21fb317f9519792bde384899a43ce364 Author: Qais Yousef Date: Tue Oct 13 16:04:14 2020 +0100 uclampset: Plumb in bash-completion Signed-off-by: Qais Yousef bash-completion/Makemodule.am | 3 +++ bash-completion/uclampset | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) commit f59654bb068303c90c48258536cce92937a366cb Author: Qais Yousef Date: Tue Oct 13 16:04:06 2020 +0100 uclampset: Plump into the build system Signed-off-by: Qais Yousef configure.ac | 9 +++++++++ schedutils/Makemodule.am | 7 +++++++ 2 files changed, 16 insertions(+) commit 9dd95bea42a3b467c1f773fd2e781cc9f0d88847 Author: Qais Yousef Date: Tue Oct 13 16:03:57 2020 +0100 uclampset: Add man page Signed-off-by: Qais Yousef schedutils/uclampset.1 | 174 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 174 insertions(+) commit 5407f8978247c01081f120ddabf4920cee65d01a Author: Qais Yousef Date: Tue Oct 13 16:03:44 2020 +0100 Add uclampset schedutil Utilization clamping is a new kernel feature that got merged in 5.3. It allows controlling the performance of a process by manipulating the utilization such that the task appears bigger or smaller than what it really is. There's a system-wide control to to restrict what maximum values the process are allowed to use. Man page added in a later patch attempts to explain the usage in more detail. Signed-off-by: Qais Yousef .gitignore | 1 + include/pathnames.h | 4 + schedutils/sched_attr.h | 30 +++++ schedutils/uclampset.c | 337 ++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 372 insertions(+) commit 5df455dbbc3454f83241122d4ebffdee7d39fdbc Author: Ivan Mironov Date: Mon Feb 1 21:58:27 2021 +0500 agetty: Allow --init-string on a virtual console This option has valid use cases on virtual consoles. Example: enabling screen blanking in the same way as `setterm --blank ...` does. Signed-off-by: Ivan Mironov term-utils/agetty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d687a6b4b098035ae5df9240096c9bb42ed3bc9c Author: Karel Zak Date: Mon Feb 1 12:21:18 2021 +0100 eject: cleanup before successful exit Fixes: https://github.com/karelzak/util-linux/issues/1239 Signed-off-by: Karel Zak sys-utils/eject.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) commit f30ec3eee6df6d0b564312aa0d24313ebec3f9ae Author: Frantisek Sumsal Date: Sat Jan 30 19:13:16 2021 +0100 ci: run the build test for each pull request .github/workflows/cibuild.yml | 4 ++++ 1 file changed, 4 insertions(+) commit eed6393d14d7b5456e61937dcd449284e9d8916c Author: Frantisek Sumsal Date: Sat Jan 30 18:43:33 2021 +0100 ci: build both w/ and w/o sanitizers on GH Actions .github/workflows/cibuild.sh | 72 +++++++++++++++++++++++-------------------- .github/workflows/cibuild.yml | 6 ++-- 2 files changed, 43 insertions(+), 35 deletions(-) commit b17a3860040dbf322f510b3e6aecb97863ce8192 Author: Frantisek Sumsal Date: Sat Jan 30 18:33:26 2021 +0100 ci: code cleanup .github/workflows/cibuild.sh | 123 +++++++++++++++++++++---------------------- 1 file changed, 60 insertions(+), 63 deletions(-) commit 81edf9f0da682b8e39f20633f4d6a3e1ebabf61f Author: Frantisek Sumsal Date: Fri Jan 29 22:01:02 2021 +0100 ci: deal with uninstrumented binaries using instrumented libs All `eject` tests were failing under ASan, since they call /bin/mount, which is uninstrumented, but it picks up the instrumented `libblkid` library, causing ASan to complain: gcc: ASan runtime does not come first in initial library list; you should either link runtime to your application or manually preload it with LD_PRELOAD. eject: unmount of `/home/runner/work/util-linux/util-linux/tests/output/eject/umount-by-disk-mounted-mnt' failed clang: /bin/umount: symbol lookup error: /home/runner/work/util-linux/util-linux/.libs/libblkid.so.1: undefined symbol: __sancov_lowest_stack eject: unmount of `/home/runner/work/util-linux/util-linux/tests/output/eject/umount-by-disk-mounted-mnt' failed Subsequently, all tests which require the `scsi_debug` module get skipped, since it's still in use due to the failed umount: fdisk: align 512/4K ... SKIPPED (cannot remove scsi_debug module (rmmod)) fdisk: align 512/4K +alignment_offset ... SKIPPED (cannot remove scsi_debug module (rmmod)) fdisk: align 512/4K +MD ... SKIPPED (cannot remove scsi_debug module (rmmod)) In case of gcc this can be easily resolved by setting $LD_PRELOAD to the respective ASan library. clang makes this a bit more difficult, since it compiles the ASan library statically, so firstly we need to force dynamic linking (via -shared-asan), and then add the runtime DSO path to the linker cache, since it's in a non-standard path. .github/workflows/cibuild.sh | 34 ++++++++++++++++++++++++++++++++- libfdisk/src/Makemodule.am | 2 +- libmount/src/Makemodule.am | 2 +- login-utils/Makemodule.am | 1 + tests/functions.sh | 14 ++++++++++++++ tests/ts/eject/umount | 8 ++++++++ tests/ts/fuzzers/test_fdisk_script_fuzz | 3 +++ tests/ts/fuzzers/test_last_fuzz | 3 +++ tests/ts/fuzzers/test_mount_fuzz | 3 +++ 9 files changed, 67 insertions(+), 3 deletions(-) commit c40b3cd03d963286f0f21f3299bd33b7ceaea3b1 Author: Frantisek Sumsal Date: Sat Jan 30 13:12:42 2021 +0100 text-utils: correctly detect ASan under clang __SANITIZE_ADDRESS__ is not defined when compiling with clang, so cover both use cases with a special set of macros include/c.h | 17 +++++++++++++++++ include/closestream.h | 2 +- text-utils/col.c | 3 ++- 3 files changed, 20 insertions(+), 2 deletions(-) commit 0388289e3aedf554ee795f0b641ca01a903a0304 Author: Frantisek Sumsal Date: Fri Jan 29 19:00:56 2021 +0100 ci: use the correct compiler version .github/workflows/cibuild.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 4076d51e2ede48fa0aa4492a62067c5d26da0a23 Author: Frantisek Sumsal Date: Fri Jan 29 18:13:13 2021 +0100 ci: 'downgrade' Ubuntu version to Bionic Since the current Ubuntu Focal image in GH Actions is missing the `kernel-modules-extra` package with the `scsi_debug` module[0], let's change the distro flag from `ubuntu-20.04` (Focal) to `ubuntu-latest` (currently Bionic, as Focal is still in the beta phase). [0] https://github.community/t/missing-scsi-debug-linux-kernel-module-on-gh-actions/157698 .github/workflows/cibuild.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ee3f4a3dfcd1932df5eb8d7d05784238d00951c9 Author: Qais Yousef Date: Tue Oct 13 16:03:35 2020 +0100 Move sched_attr struct and syscall definitions into header file So that we can re-use them in other files. Signed-off-by: Qais Yousef schedutils/chrt.c | 77 +-------------------------------------- schedutils/sched_attr.h | 97 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 98 insertions(+), 76 deletions(-) commit deba6720fb96951bf81338363eb9e6c2f352ffd3 Author: ToddRK Date: Thu Jan 28 12:44:41 2021 +0100 fsck.cramfs: fix fsck.cramfs crashes on blocksizes > 4K fsck.cramfs crashes when extracting a cramfs image with a 16KB blocksize. The read_buffer is hardcoded for a 4KB blocksize. When using a blocksize larger than 4KB, the program's code uses indexes that go past the end of the allocated space for the read_buffer and this causes the crash. The following changes fix the problem for me in the latest 2.36.1 release of fsck.cramfs.c. However there are hardcoded values of 4096 in the code that might cause problems under other circumstances and I have not attempted to fix those. [kzak@redhat.com: - some coding style changes to code] Fixes: https://github.com/karelzak/util-linux/issues/1232 Signed-off-by: ToddRK Signed-off-by: Karel Zak disk-utils/fsck.cramfs.c | 37 +++++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 10 deletions(-) commit 867df2617cdf2a0eca0778c016ac684ead7c91c7 Author: Karel Zak Date: Thu Jan 28 10:27:21 2021 +0100 lib: use ul_prefix for close_all_fds() and mkdir_p() The names are too generic and it makes problems in static libraries. Addresses: https://gitlab.com/cryptsetup/cryptsetup/-/issues/623 Signed-off-by: Karel Zak include/fileutils.h | 4 ++-- lib/fileutils.c | 6 +++--- libmount/src/context.c | 2 +- libmount/src/utils.c | 2 +- login-utils/login.c | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) commit 67f2918a6b1e1d0417f832a2e78f56aee422b379 Author: Karel Zak Date: Tue Jan 26 15:52:41 2021 +0100 github: enable ci-build for all basic branches Signed-off-by: Karel Zak .github/workflows/cibuild.yml | 3 +++ 1 file changed, 3 insertions(+) commit ba8fbf21ef7c8746239eb3f61afcf2946e095092 Author: Karel Zak Date: Tue Jan 26 15:51:26 2021 +0100 docs: update TODO Signed-off-by: Karel Zak Documentation/TODO | 8 ++++++++ 1 file changed, 8 insertions(+) commit b94c187069fb7e136da7dafe047b1c060a654a45 Author: Karel Zak Date: Tue Jan 26 15:23:29 2021 +0100 travis: remove old ubuntu Ubuntu 12.04 LTS (Precise Pangolin) -- from April 2012 to April 2017. It's more and more difficult to keep code and tests in all details compatible with it 4 years dead distro. Signed-off-by: Karel Zak .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit bf32069382930c5de352ebd763332f3864c0cadf Author: Karel Zak Date: Tue Jan 26 12:39:22 2021 +0100 github: make sure compiler is defined Signed-off-by: Karel Zak .github/workflows/cibuild-setup-ubuntu.sh | 12 ------------ .github/workflows/cibuild.sh | 12 ++++++++++++ 2 files changed, 12 insertions(+), 12 deletions(-) commit cf82a233eb2a1941e997724c37ba4c876bfde8d3 Author: Karel Zak Date: Tue Jan 26 12:09:01 2021 +0100 github: CC fix export Signed-off-by: Karel Zak .github/workflows/cibuild-setup-ubuntu.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 025c43dfe11e0bbb742ca04eeaf7e026279e61dc Author: Karel Zak Date: Tue Jan 26 11:56:33 2021 +0100 github: export CC and CXX Signed-off-by: Karel Zak .github/workflows/cibuild-setup-ubuntu.sh | 11 +++++++++++ .github/workflows/cibuild.sh | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) commit e589e25f19190c9f7fdc011978c1e4ff18790942 Author: Karel Zak Date: Tue Jan 26 11:54:38 2021 +0100 tests: skip hwclock/systohc on GH Actions It seems the delay on GH is too large to get proper result for this tests. We already ignore it on Travis. Signed-off-by: Karel Zak tests/ts/hwclock/systohc | 4 ++++ 1 file changed, 4 insertions(+) commit f9d7ed551763a756b3018141f9111a76e261a4d4 Author: Karel Zak Date: Tue Jan 26 11:39:10 2021 +0100 tests: mark ul/basic as KNOWN_FAIL It works locally and on Travis, but fail on Github Actions. Signed-off-by: Karel Zak tests/ts/ul/basic | 4 ++++ 1 file changed, 4 insertions(+) commit 8839d980892eac7036c6eb625e0ff9fa557e041e Author: Karel Zak Date: Tue Jan 26 11:11:14 2021 +0100 tests: migrate from ext3 to ext2 Signed-off-by: Karel Zak tests/ts/fsck/ismounted | 6 +++--- tests/ts/libmount/context | 6 +++--- tests/ts/libmount/context-py | 6 +++--- tests/ts/libmount/loop | 4 ++-- tests/ts/libmount/loop-overlay | 2 +- tests/ts/libmount/tabfiles-tags | 4 ++-- tests/ts/libmount/tabfiles-tags-py | 4 ++-- tests/ts/mount/devname | 6 +++--- tests/ts/mount/fslists | 14 +++++++------- tests/ts/mount/fstab-devname | 6 +++--- tests/ts/mount/fstab-devname2label | 4 ++-- tests/ts/mount/fstab-devname2uuid | 4 ++-- tests/ts/mount/fstab-label | 4 ++-- tests/ts/mount/fstab-label2devname | 4 ++-- tests/ts/mount/fstab-label2uuid | 4 ++-- tests/ts/mount/fstab-loop | 8 ++++---- tests/ts/mount/fstab-symlink | 6 +++--- tests/ts/mount/fstab-uuid | 4 ++-- tests/ts/mount/fstab-uuid2devname | 4 ++-- tests/ts/mount/fstab-uuid2label | 4 ++-- tests/ts/mount/label | 4 ++-- tests/ts/mount/regfile | 4 ++-- tests/ts/mount/rlimit | 4 ++-- tests/ts/mount/shared-subtree | 6 +++--- tests/ts/mount/uuid | 4 ++-- 25 files changed, 63 insertions(+), 63 deletions(-) commit bf7e7d5c84d951cdfa183c597153db916c053547 Author: Karel Zak Date: Tue Jan 26 10:30:01 2021 +0100 tests: dump more information about CFS and block devices Signed-off-by: Karel Zak tests/functions.sh | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) commit 8b6019e65a6d0204569c367e59a73457f245fe4d Author: Karel Zak Date: Tue Jan 26 09:44:44 2021 +0100 github: remove distcheck Signed-off-by: Karel Zak .github/workflows/cibuild.sh | 4 ++-- .github/workflows/cibuild.yml | 10 ++++------ 2 files changed, 6 insertions(+), 8 deletions(-) commit 830a871e16d5eb1711914615467dc9d6a6e01764 Author: Karel Zak Date: Mon Jan 25 17:32:17 2021 +0100 github: cleanup cibuild.sh Signed-off-by: Karel Zak .github/workflows/cibuild.sh | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) commit 48575df6e81be96c3201d2d7afc63cf40d404d0a Author: Karel Zak Date: Mon Jan 25 17:13:51 2021 +0100 github: fix btrfs package name Signed-off-by: Karel Zak .github/workflows/cibuild-setup-ubuntu.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 263db7f6bff1924d52448bd5439127a6debbab8f Author: Karel Zak Date: Mon Jan 25 16:57:06 2021 +0100 github: fix cibuild typo Signed-off-by: Karel Zak .github/workflows/cibuild.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 84cccd3eb5c4cdaea65a77346a9646585fefa4cf Author: Karel Zak Date: Mon Jan 25 16:51:51 2021 +0100 github: add build workflow Signed-off-by: Karel Zak .github/workflows/cibuild-setup-ubuntu.sh | 51 ++++++++++++++++++++++++++++ .github/workflows/cibuild.sh | 55 +++++++++++++++++++++++++++++++ .github/workflows/cibuild.yml | 32 ++++++++++++++++++ 3 files changed, 138 insertions(+) commit 7b78b571b7907d98a53dd74c5325249c2057e7b4 Author: Karel Zak Date: Mon Jan 25 11:11:05 2021 +0100 libmount: allow --read-only for not-root users The command "mount -r" was supported for non-root users in very old mount(8) versions. Unfortunately, in this case libmount replaces all mount options from command line by options from fstab. We need exception for MS_RDONLY. Fixes: https://github.com/karelzak/util-linux/issues/1235 Signed-off-by: Karel Zak libmount/src/context.c | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) commit 34a58c05a7260370d6238bb3d1c29938a9a31f9b Author: Karel Zak Date: Mon Jan 25 09:23:16 2021 +0100 travis: use verbose mode (V=1) for make Signed-off-by: Karel Zak .travis-functions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7397f2c1f955569743c68c900ca873fd9e211833 Author: Karel Zak Date: Fri Jan 22 13:28:02 2021 +0100 build-sys: add restrict keyword fallback Signed-off-by: Karel Zak include/c.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 33b09aebf505acfbbb2137319093fbb9ed7eea7d Author: Karel Zak Date: Fri Jan 22 10:44:01 2021 +0100 libuuid: improve "restrict" keyword use gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3 on travis-ci returns: libuuid/src/unparse.c:42:67: error: ‘restrict’ undeclared here (not in a function) libuuid/src/unparse.c: In function ‘uuid_fmt’: Signed-off-by: Karel Zak libuuid/src/unparse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 798608c842e5fef0641e61c845cd2da47839514f Merge: 31862cde0 2c2ff04fe Author: Karel Zak Date: Thu Jan 21 12:01:19 2021 +0100 Merge branch 'fix-vms' of https://github.com/Govelius/util-linux commit 31862cde0a0551b42e6b84015da7719a784007d9 Author: Karel Zak Date: Thu Jan 21 10:26:25 2021 +0100 fix compiler warnings Signed-off-by: Karel Zak libuuid/src/unparse.c | 3 ++- misc-utils/cal.c | 4 +++- sys-utils/ipcutils.c | 12 ++++++------ term-utils/agetty.c | 16 ++++++++++------ 4 files changed, 21 insertions(+), 14 deletions(-) commit 2c2ff04fe96abd8acebba5b33b7c0383dbe73b79 Author: Shahid Laher Date: Wed Jan 20 18:04:33 2021 +0000 libmount: add vboxsf, virtiofs to pseudo filesystems Filesystems provided by a hypervisor for guest kernels: * vboxsf: Linux 5.6 * virtiofs: Linux 5.4 Signed-off-by: Shahid Laher libmount/src/utils.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit df0836dc90cde2bb8333f2f50574f55579527608 Author: Karel Zak Date: Wed Jan 20 09:20:54 2021 +0100 wipefs: fix compiler warning misc-utils/wipefs.c: In function ‘main’: misc-utils/wipefs.c:838:3: error: ‘for’ loop initial declarations are only allowed in C99 mode misc-utils/wipefs.c:838:3: note: use option -std=c99 or -std=gnu99 to compile your code Signed-off-by: Karel Zak misc-utils/wipefs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 734678205af89c2022fd1ad86fddd7c07d188f20 Author: Karel Zak Date: Tue Jan 19 16:25:33 2021 +0100 tests: improve u64 use in ipcs test UINT64_MAX is 18446744073709551615, but 2^64 is 18446744073709551616. We also need to use kbytes in all calculation in the test than bytes as ipcs by default do not use bytes anymore. Signed-off-by: Karel Zak tests/helpers/test_sysinfo.c | 9 +++++++++ tests/ts/ipcs/functions.sh | 17 ++++++++++------- 2 files changed, 19 insertions(+), 7 deletions(-) commit 8399fe089b61a17926033d1659b21f7096c2c73f Author: Karel Zak Date: Tue Jan 19 14:59:01 2021 +0100 lsblk: fix filesystem array allocation Signed-off-by: Karel Zak misc-utils/lsblk-mnt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c52d16098c5fbc12a4edd01ba62e5c4cd5d1a336 Author: Karel Zak Date: Mon Jan 18 16:04:18 2021 +0100 ipcs: fallback for overflow The previous commit 7a08784ab053d6aa30db990cbec1fd35b34ed00a reduced number of situation when we need fallback when kbytes calculated for shmall pages, but there is still possible to see overflows. This patch add fallback also for kbytes. Signed-off-by: Karel Zak sys-utils/ipcs.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit a992cc0d98bc45581c3a9f7e216742c4b20fc875 Author: Karel Zak Date: Mon Jan 18 13:22:26 2021 +0100 tests: set shmmni to 32k Linux kernel since 6730e6580177d13f4612767873cb5a533ad63c61 checks for limits and kernel ipc/utils.h defines #define IPCMNI_SHIFT 15 #define IPCMNI (1 << IPCMNI_SHIFT) it means 32768 (aka shortint max). Let's use it in our tests too to avoid "Invalid argument" when write to /proc/sys/kernel/shmmni. Signed-off-by: Karel Zak tests/ts/ipcs/functions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7a08784ab053d6aa30db990cbec1fd35b34ed00a Author: Vasilis Liaskovitis Date: Fri Jan 15 15:00:11 2021 +0100 ipcs: Avoid shmall overflows Avoid computing the number of bytes in shmall, by only computing and printing the number of Kbytes. This avoids some overflows, e.g. $ echo "4503599627370496" > /proc/sys/kernel/shmall $ ipcs -l | grep 'max total shared memory' Before: max total shared memory (kbytes) = 18014398509481980 After: max total shared memory (kbytes) = 18014398509481984 $ echo "99993599627370500" > /proc/sys/kernel/shmall 99993599627370500 $ ipcs -l | grep 'max total shared memory' Before: max total shared memory (kbytes) = 18014398509481980 After: max total shared memory (kbytes) = 399974398509482000 v1->v2: Print the non-overflow KB value only for IPC_UNIT_KB and IPC_UNIT_DEFAULT. This way --bytes and --human options will still get an expected output (but not avoiding the overflow). Signed-off-by: Vasilis Liaskovitis Signed-off-by: Karel Zak sys-utils/ipcs.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) commit ff21f476f85ac9855452f4aac43a231c3c1e2ebc Author: Roberto Bergantinos Corpas Date: Tue Jan 12 11:58:53 2021 +0100 findmnt: add option to list all fs-independent flags It might be useful for security auditing purposes list all possible mount flags/options including default set which are normally not listed. This patch adds "--vfs-all" option to list all fs-independent flags on VFS-OPTIONS column, as well as libmount funcionality to accomplish it. i.e.: $ findmnt -o VFS-OPTIONS VFS-OPTIONS rw,relatime rw,nosuid,nodev,noexec,relatime rw,nosuid,nodev,noexec,relatime ro,nosuid,nodev,noexec ... $ findmnt --vfs-all -o VFS-OPTIONS VFS-OPTIONS rw,exec,suid,dev,async,loud,nomand,atime,noiversion,diratime,relatime,nostrictatime,nolazytime,symfollow rw,noexec,nosuid,nodev,async,loud,nomand,atime,noiversion,diratime,relatime,nostrictatime,nolazytime,symfollow rw,noexec,nosuid,nodev,async,loud,nomand,atime,noiversion,diratime,relatime,nostrictatime,nolazytime,symfollow ro,noexec,nosuid,nodev,async,loud,nomand,atime,noiversion,diratime,norelatime,nostrictatime,nolazytime,symfollow ... [kzak@redhat.com: - cleanup coding style and comments] Signed-off-by: Roberto Bergantinos Corpas Signed-off-by: Karel Zak libmount/docs/libmount-sections.txt | 1 + libmount/src/fs.c | 32 ++++++++++++++++++++++++++++++++ libmount/src/libmount.h.in | 1 + libmount/src/libmount.sym | 4 ++++ misc-utils/findmnt.8 | 6 ++++++ misc-utils/findmnt.c | 12 ++++++++++-- misc-utils/findmnt.h | 1 + 7 files changed, 55 insertions(+), 2 deletions(-) commit 372ce5b74e79470b1bda1fc284c19a313a422361 Author: Karel Zak Date: Thu Jan 14 12:45:28 2021 +0100 libmount: do not canonicalize ZFS source dataset Fixes: https://github.com/karelzak/util-linux/issues/1231 Addresses: https://github.com/systemd/systemd/issues/18188 Addresses: https://github.com/openzfs/zfs/pull/11295 Signed-off-by: Karel Zak libmount/src/context.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 0735d0efe1029a8c4c6b8cdfb5ab675616004b9e Author: Karel Zak Date: Wed Jan 13 15:04:02 2021 +0100 lib/selinux-utils: tiny cleanup Signed-off-by: Karel Zak lib/selinux-utils.c | 15 +++++++++++---- login-utils/chfn.c | 2 +- 2 files changed, 12 insertions(+), 5 deletions(-) commit b105446e69e5c9274d2d8ef8df35fdc61cb700ac Author: Karel Zak Date: Wed Jan 13 14:58:43 2021 +0100 mkswap: remove deprecated SELinux matchpathcon() Signed-off-by: Karel Zak disk-utils/Makemodule.am | 3 +++ disk-utils/mkswap.c | 8 ++++++-- include/selinux-utils.h | 1 + lib/selinux-utils.c | 30 ++++++++++++++++++++++++++++++ 4 files changed, 40 insertions(+), 2 deletions(-) commit e1de70b3c3f6b5e26709f02197b406e2ece4ae41 Author: Karel Zak Date: Wed Jan 13 14:25:12 2021 +0100 chfs-chfn: remove deprecated selinux_check_passwd_access() Signed-off-by: Karel Zak include/selinux-utils.h | 2 +- lib/selinux-utils.c | 32 +++++++++++++++++++++++++------- login-utils/chfn.c | 21 +++++++-------------- login-utils/chsh.c | 19 ++++++------------- 4 files changed, 39 insertions(+), 35 deletions(-) commit b5debf7105a4c63ac8d2d8c79655559c8f1dc52d Author: Karel Zak Date: Wed Jan 13 13:33:41 2021 +0100 lib/selinux-utils: cleanup function names Signed-off-by: Karel Zak include/selinux-utils.h | 2 +- lib/selinux-utils.c | 2 +- login-utils/chfn.c | 2 +- login-utils/chsh.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 68f4aa2a2f4559619bb78dbc5ca69fb79292c56e Author: Karel Zak Date: Wed Jan 13 13:30:31 2021 +0100 build-sys: move selinux_utils.c Signed-off-by: Karel Zak include/Makemodule.am | 1 + login-utils/selinux_utils.h => include/selinux-utils.h | 0 login-utils/selinux_utils.c => lib/selinux-utils.c | 2 +- login-utils/Makemodule.am | 4 ++-- login-utils/chfn.c | 2 +- login-utils/chsh.c | 2 +- 6 files changed, 6 insertions(+), 5 deletions(-) commit ca27216aa69d641391429d4abf0066f4ec305471 Author: Karel Zak Date: Wed Jan 13 13:12:19 2021 +0100 build-sys: remove fallback for security_context_t It seems like overkill to provide this #ifdef. For example coreutils use "char *" for all selinux contexts (since 2014). Signed-off-by: Karel Zak configure.ac | 10 +--------- disk-utils/mkswap.c | 6 +----- libmount/src/optstr.c | 14 ++------------ login-utils/chfn.c | 7 ++----- login-utils/chsh.c | 7 ++----- login-utils/lslogins.c | 4 ---- login-utils/selinux_utils.c | 7 ++----- login-utils/sulogin.c | 10 +++------- login-utils/vipw.c | 7 ++----- sys-utils/mount.c | 6 +----- 10 files changed, 16 insertions(+), 62 deletions(-) commit 3d725afab4783c8f61f4b37e108d8c3525cff8d0 Author: Karel Zak Date: Wed Jan 13 11:00:34 2021 +0100 libblkid: fix comment block The command block with /** triggers gtkdoc; don't use it for regular comments. Signed-off-by: Karel Zak libblkid/src/probe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4301ba768a75522684ee1c421b3efb5d9cf9f377 Merge: fbc2fe824 a527a3601 Author: Karel Zak Date: Tue Jan 12 11:53:36 2021 +0100 Merge branch 'autoconf-2.70' of https://github.com/kerolasa/util-linux * 'autoconf-2.70' of https://github.com/kerolasa/util-linux: build-sys: silence non-POSIX variable name warning build-sys: update to autoconf 2.70 commit fbc2fe824dd3450df122d8416da8689f82fb0b4c Author: Karel Zak Date: Tue Jan 12 11:43:31 2021 +0100 lib/loopdev: make is_loopdev() more robust It seems the current kernel can create a loop devices with a different major number. For example # losetup /dev/loop12345678 file.img # lsblk /dev/loop12345678 NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT loop12345678 15:811342 0 5M 0 loop We need a way how to verify the device is loopdev also when the device is not associated with any backing file -- in this case there is no "loop" directory in /sys/dev/block//, but we can cannonicalize this sysfs symlink as it points to /sys/devices/virtual/block/loop (see "loop" in the path). Note that without this change losetup is not able to list and delete the loop device. Addresses: https://github.com/karelzak/util-linux/issues/1202 Signed-off-by: Karel Zak lib/loopdev.c | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) commit a527a360191648d272db76832150e9b360ef0fd6 Author: Sami Kerola Date: Thu Dec 24 20:22:59 2020 +0000 build-sys: silence non-POSIX variable name warning Easiest way to get rid of the following warning is to ignore the warning. This might cause people who use non-GNU make to have hard time, but are there such people compiling this project? sys-utils/Makemodule.am:226: warning: addprefix sys-utils/,$(SETARCH_LINKS: non-POSIX variable name sys-utils/Makemodule.am:226: (probably a GNU make extension) Signed-off-by: Sami Kerola configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4230b2d47a26e3ab406d2dda3551a401142dadbd Author: Sami Kerola Date: Thu Dec 24 11:12:14 2020 +0000 build-sys: update to autoconf 2.70 Reference: https://lwn.net/Articles/839395/ Reviewed-by: Chris Hofstaedtler Signed-off-by: Sami Kerola configure.ac | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit a7d5efbb9ae8591b8ebcd3756a59ce30a36d80fc Author: Karel Zak Date: Mon Jan 11 11:58:16 2021 +0100 libblkid: make gfs2 prober more extendible The current GFS2 prober hard codes superblock constants, but these constants are affected by GFS2 development. Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1913844 Signed-off-by: Karel Zak libblkid/src/superblocks/gfs.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) commit 3c9d13da636b16c46ec39ccf6417cd6d78481943 Author: Karel Zak Date: Mon Jan 11 10:46:16 2021 +0100 lsblk: use MOUNTTARGETS in default output Signed-off-by: Karel Zak misc-utils/lsblk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ecdfb2b767fc8ac6f27d67536d38997479172dc0 Author: Gaël PORTAY Date: Sat Jan 9 05:03:34 2021 -0500 libfdisk: (script) ignore empty values for start and size Signed-off-by: Gaël PORTAY libfdisk/src/script.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 62df5395543f7d7a3acbc47a3cf5617130b649b2 Author: Karel Zak Date: Fri Jan 8 13:45:14 2021 +0100 lsblk: use MOUNTPOINTS in --fs Signed-off-by: Karel Zak misc-utils/lsblk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 37da403d57b625178102e8f7a05921b0a827c692 Author: Karel Zak Date: Fri Jan 8 13:33:30 2021 +0100 lsblk: add FSROOTS column It displays filesystem root attached to system, for example btrfs with two mounted subvolumes: $ lsblk -oNAME,SIZE,MOUNTPOINTS,FSROOTS /dev/sdc1 NAME SIZE MOUNTPOINTS FSROOTS sdc1 50M /mnt/A /foo /mnt/B /bar Signed-off-by: Karel Zak misc-utils/lsblk.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit c6648d2db1716978c8344c046ea6c94a68d27238 Author: Karel Zak Date: Fri Jan 8 13:20:50 2021 +0100 lsblk: print all device mountpoints * add libmount FS to struct lsblk_device * add new column MOUNTPOINTS (pl.) with multi-line cells to display all mountpoints relevant for the device * the old MOUNTPOINT is backwardly compatible and it (usually) displays the last device mountpoint from /proc/self/mountinfo For example btrfs with more subvolumes: $ lsblk -o+MOUNTPOINTS /dev/sdc1 NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT MOUNTPOINTS sdc1 8:33 0 50M 0 part /mnt/test /mnt/A /mnt/test /mnt/B Note, in this case MOUNTPOINT displays mount point where is mounted root of the filesystem. Signed-off-by: Karel Zak misc-utils/lsblk-devtree.c | 2 +- misc-utils/lsblk-mnt.c | 135 +++++++++++++++++++++++++++++++-------------- misc-utils/lsblk.8 | 9 +++ misc-utils/lsblk.c | 51 +++++++++++++---- misc-utils/lsblk.h | 10 +++- 5 files changed, 152 insertions(+), 55 deletions(-) commit 3c7355dd63159427c959391c500fccecd0a18ba8 Author: Karel Zak Date: Fri Jan 8 13:12:57 2021 +0100 libsmartcols: support arrays for JSON output This patch add support to format multi-line cells (columns with SCOLS_FL_WRAP) to arrays in JSON output. For example mountpoints[] in lsblk output: Normal output: $ lsblk -oNAME,FSTYPE,TYPE,MOUNTPOINTS /dev/sdc1 NAME FSTYPE TYPE MOUNTPOINTS sdc1 btrfs part /mnt/A /mnt/test /mnt/B JSON output: $ lsblk -J -oNAME,FSTYPE,TYPE,MOUNTPOINTS /dev/sdc1 { "blockdevices": [ { "name": "sdc1", "fstype": "btrfs", "type": "part", "mountpoints": [ "/mnt/A", "/mnt/test", "/mnt/B" ] } ] } Signed-off-by: Karel Zak lib/jsonwrt.c | 2 +- libsmartcols/src/libsmartcols.h.in | 4 ++- libsmartcols/src/print.c | 61 ++++++++++++++++++++++++++++---------- 3 files changed, 50 insertions(+), 17 deletions(-) commit f19295ad125d03a6bcc31d610de1df79a5a4b04e Author: Karel Zak Date: Fri Jan 8 12:00:59 2021 +0100 libmount: mark entries from /proc/swaps by MNT_FS_SWAP The function mnt_fs_is_swaparea() does not return TRUE for entries from /proc/swaps. This is pretty strange. Signed-off-by: Karel Zak libmount/src/tab_parse.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit e7091237dbb4fa4e04255d664900b58d2d946cfc Merge: 79acb5bf1 27fd7278a Author: Karel Zak Date: Thu Jan 7 12:09:57 2021 +0100 Merge branch 'getopt-musl' of https://github.com/sgn/util-linux * 'getopt-musl' of https://github.com/sgn/util-linux: getopt: explicitly ask for POSIX mode on POSIXLY_CORRECT commit 79acb5bf1ea0715162a8e345591c344b011d58b4 Author: Karel Zak Date: Wed Jan 6 15:17:19 2021 +0100 docs: update TODO (add item about mnt_context_get_excode() ) - add item about https://github.com/karelzak/util-linux/issues/1208 - remove old CAP_SYS_ADMIN note (in last versions mount(8) drops suid if necessary). Addresses: https://github.com/karelzak/util-linux/issues/1208 Signed-off-by: Karel Zak Documentation/TODO | 16 +++++++--------- libmount/src/context.c | 3 +++ 2 files changed, 10 insertions(+), 9 deletions(-) commit 27fd7278a1fedd2a5ec71c0258de14a083904916 Author: Đoàn Trần Công Danh Date: Tue Jan 5 20:55:46 2021 +0700 getopt: explicitly ask for POSIX mode on POSIXLY_CORRECT GNU libc's getopt_long(3) have the tradition of not shuffling arguments to find options when either POSIXLY_CORRECT is defined in environment variables or '+' prepended in short options. Hence, the current code base is fine as is fine as is for util-linux built with GNU libc. However, musl libc only honour POSIX convention when short options prepended with '+'. musl libc doesn't care about POSIXLY_CORRECT. Thus, the behaviour of util-linux's getopt(1) that linked with musl-libc doesn't match with its own documentation. Let's make sure a '+' is always prepended to short options if POSIXLY_CORRECT is defined. Signed-off-by: Đoàn Trần Công Danh misc-utils/Makemodule.am | 1 + misc-utils/getopt.1.in | 6 +++++- misc-utils/getopt.c | 18 +++++++++++++++--- 3 files changed, 21 insertions(+), 4 deletions(-) commit 215ff3ba6f2fe366e90270fc987714845c8a04d2 Author: Karel Zak Date: Wed Jan 6 12:45:18 2021 +0100 docs: update TODO file (add item about libblkid ZFS) Addresses: https://github.com/karelzak/util-linux/issues/1228 Signed-off-by: Karel Zak Documentation/TODO | 4 ++++ 1 file changed, 4 insertions(+) commit 183ad4a7b12096a81bf35756a043c407f0f163a6 Author: Karel Zak Date: Wed Jan 6 12:05:50 2021 +0100 Revert "fallocate: (man) add hint about off/len limitations" This reverts commit b2db5a71b5c37dea3f1d5780664fdce317389d18. We already have this note in the man page. Don't duplicate it. sys-utils/fallocate.1 | 11 ----------- 1 file changed, 11 deletions(-) commit 1161323b5a870921b7bc20e995ae07f2399c148e Author: Karel Zak Date: Wed Jan 6 11:13:15 2021 +0100 tests: update swaplabel.err Signed-off-by: Karel Zak tests/expected/misc/swaplabel.err | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4b447adf50c61125c57922cc01ec3e6792cc48af Merge: c15899c1c c25b7d8a9 Author: Karel Zak Date: Tue Jan 5 15:20:50 2021 +0100 Merge branch '2020wk47' of https://github.com/kerolasa/util-linux * '2020wk47' of https://github.com/kerolasa/util-linux: build-sys: sort various lists in configure.ac mkswap: tell how to fix insecure permissions and owner in warning lsipc: make default output byte sizes to be in human units man: add missing backslash to caret printing macro lscpu: fix variable shadowing uuidgen: give hint in usage() what uuid namepaces can be used uuidgen: use errx() rather than fprintf() when priting errors libuuid: simplify uuid_is_null() check uuidparse: use uuid type definitions from libuuid header uuidparse: use libuuid function to test nil uuid commit c15899c1cbed183c64550bca00ecc6993c849c85 Author: Karel Zak Date: Tue Jan 5 14:43:01 2021 +0100 cfdisk: (man) add info when cfdisk writes to the device This is difference between (c)fdisk and GNU Parted, fdisks keep all changes in memory until user explicitly ask for write operation. Addresses: https://github.com/karelzak/util-linux/pull/1227 Signed-off-by: Karel Zak disk-utils/cfdisk.8 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 0257109c3397b7602feac7ad6f579c16faba63a3 Merge: 432dfa0a2 c186e148e Author: Karel Zak Date: Tue Jan 5 14:32:22 2021 +0100 Merge branch 'disk-utils-document-resize' of https://github.com/vdmz/util-linux commit 432dfa0a20bdfa2036786e5536188050a0ce6efc Author: Eric Biggers Date: Wed Dec 30 20:05:57 2020 -0800 sys-utils: mount.8: fix a typo It should be "inode", not "i-node". Signed-off-by: Eric Biggers sys-utils/mount.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7d1561177989a33b1120c7e20009e876f2c78982 Author: Heinrich Schuchardt Date: Thu Dec 31 01:32:54 2020 +0100 fstab.5: NTFS and FAT volume IDs use upper case The man-page indicates that mount expects UUIDs to be lower case. Mention that NTFS and FAT volume IDs are to be specified in upper case. Signed-off-by: Heinrich Schuchardt sys-utils/fstab.5 | 2 ++ 1 file changed, 2 insertions(+) commit 45be288c8f0e90e430e6e6ed42c868a36ead5dfb Author: Chris Hofstaedtler Date: Mon Dec 28 00:02:33 2020 +0000 cfdisk: show Q option when choosing label type The new message is quite terse, but fits into 78 characters. Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=894555 Signed-off-by: Chris Hofstaedtler disk-utils/cfdisk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 54624b8f49266b6b84d0fdfc76a81392a54d4759 Merge: 803b4c344 67c9744c1 Author: Karel Zak Date: Tue Jan 5 12:37:23 2021 +0100 Merge branch 'ia64-cramfs' of https://github.com/mator/util-linux * 'ia64-cramfs' of https://github.com/mator/util-linux: tests: add checksum for cramfs/mkfs for LE:16384 (ia64) commit 803b4c344f50721c0c4d48719027168c2c5f7632 Merge: 1b39cd7f6 bbb66067c Author: Karel Zak Date: Mon Jan 4 13:52:55 2021 +0100 Merge branch 'optimal-33553920' of https://github.com/rfinnie/util-linux * 'optimal-33553920' of https://github.com/rfinnie/util-linux: libfdisk: ignore 33553920 byte optimal I/O size commit 1b39cd7f63b0beb1519a76f5104843c93809cf94 Merge: 40618e66f 3c5606860 Author: Karel Zak Date: Mon Jan 4 13:42:08 2021 +0100 Merge branch 'spelling' of https://github.com/scop/util-linux * 'spelling' of https://github.com/scop/util-linux: *: spelling and grammar fixes commit 40618e66f6f64b50ca0635bda02efc650c633e6e Merge: 0d182490e 948182f4b Author: Karel Zak Date: Mon Jan 4 13:22:54 2021 +0100 Merge branch 'posix-test-command' of https://github.com/concatime/util-linux * 'posix-test-command' of https://github.com/concatime/util-linux: configure: test -a|o is not POSIX commit 0d182490e3e6d0f23a774b73eb3805d9e8668e07 Author: Dmitriy Chestnykh Date: Mon Jan 4 12:17:57 2021 +0100 cfdisk: Implemented cfdisk's opening in read-only mode [kzak@redhat.com: - clean up the patch - add note "Changes will remain in memory only."] Addresses: https://github.com/karelzak/util-linux/issues/1209 Addresses: https://github.com/karelzak/util-linux/pull/1213 Signed-off-by: Karel Zak bash-completion/cfdisk | 1 + disk-utils/cfdisk.8 | 3 +++ disk-utils/cfdisk.c | 14 ++++++++++---- 3 files changed, 14 insertions(+), 4 deletions(-) commit b2db5a71b5c37dea3f1d5780664fdce317389d18 Author: Karel Zak Date: Mon Jan 4 10:50:24 2021 +0100 fallocate: (man) add hint about off/len limitations Signed-off-by: Karel Zak sys-utils/fallocate.1 | 11 +++++++++++ 1 file changed, 11 insertions(+) commit c186e148ea1cd4dd850f108ae1e60134a351b0e4 Author: Vincent McIntyre Date: Sat Jan 2 11:02:35 2021 +1100 Show the 'r' option in the help menu disk-utils/cfdisk.c | 1 + 1 file changed, 1 insertion(+) commit 3e01d4a24d3163acc70f6b79c30d1093a9cb5cf5 Author: Vincent McIntyre Date: Fri Jan 1 13:37:52 2021 +1100 Manual pages: document the 'resize' command Reported in https://bugs.debian.org/906918, https://bugs.debian.org/915971. Signed-off-by: Vincent McIntyre disk-utils/cfdisk.8 | 9 +++++++++ 1 file changed, 9 insertions(+) commit c25b7d8a9be9f991a19806ea5ee373d0321a6ae5 Author: Sami Kerola Date: Tue Dec 1 21:13:00 2020 +0000 build-sys: sort various lists in configure.ac And convert spaces to tabs. Signed-off-by: Sami Kerola configure.ac | 108 ++++++++++++++++++++++++++++++++--------------------------- 1 file changed, 59 insertions(+), 49 deletions(-) commit 8d6877239c3e6d1dbe2b2aa1b3661a36c39ea220 Author: Sami Kerola Date: Sat Nov 28 23:02:58 2020 +0000 mkswap: tell how to fix insecure permissions and owner in warning Signed-off-by: Sami Kerola disk-utils/mkswap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit d0355b2e90b83bd437ef81abc00ca26b54b9071b Author: Sami Kerola Date: Sat Nov 28 16:29:09 2020 +0000 lsipc: make default output byte sizes to be in human units Recent request to make ipcs(1) list sizes in human format caused the observation lsipc(1) is not doing that either. This commit changes sizes to human format, assuming --bytes option is not used. Reference: https://github.com/karelzak/util-linux/issues/1199 Signed-off-by: Sami Kerola sys-utils/lsipc.c | 56 ++++++++++++++++++++++++++++++++----------------------- 1 file changed, 33 insertions(+), 23 deletions(-) commit 186946b23984842a3c60d03b7ff3e42a64940715 Author: Sami Kerola Date: Wed Nov 25 22:22:21 2020 +0000 man: add missing backslash to caret printing macro Fixes: 3ea54b843cb63738404a475f43cfc461aa9b57f3 Signed-off-by: Sami Kerola text-utils/more.1 | 2 +- text-utils/pg.1 | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) commit 01258182bbabc3b7eae3c62629198d05462af6b7 Author: Sami Kerola Date: Thu Nov 26 16:54:50 2020 +0000 lscpu: fix variable shadowing sys-utils/lscpu-virt.c: In function ‘lscpu_read_virtualization’: sys-utils/lscpu-virt.c:574:9: warning: declaration of ‘buf’ shadows a previous local [-Wshadow] 574 | char buf[256]; | ^~~ sys-utils/lscpu-virt.c:506:7: note: shadowed declaration is here 506 | char buf[BUFSIZ]; | ^~~ Signed-off-by: Sami Kerola sys-utils/lscpu-virt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e69cb8b91db9ca0576e2fddabf14e0e08b26ebe2 Author: Sami Kerola Date: Sun Nov 22 22:40:45 2020 +0000 uuidgen: give hint in usage() what uuid namepaces can be used Also fix --help and --version alignment. Signed-off-by: Sami Kerola misc-utils/uuidgen.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 451d0e9e7b0318b3627cd578dde3eb654ca6c68d Author: Sami Kerola Date: Sun Nov 22 22:27:24 2020 +0000 uuidgen: use errx() rather than fprintf() when priting errors Signed-off-by: Sami Kerola misc-utils/uuidgen.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit a6fae86865210256a3de71a8d1bf74c2aca2be9f Author: Sami Kerola Date: Sun Nov 22 21:07:23 2020 +0000 libuuid: simplify uuid_is_null() check There is no need to check uuid byte by byte. Also by using size of the uuid type magic constant can be avoided. Signed-off-by: Sami Kerola libuuid/src/isnull.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit ab85f756a07aec9e1c5e28c6300530f1937c20f0 Author: Sami Kerola Date: Sun Nov 22 20:48:38 2020 +0000 uuidparse: use uuid type definitions from libuuid header While on it add missing UUID_TYPE_DCE_NIL to the header. Signed-off-by: Sami Kerola libuuid/src/uuid.h | 1 + misc-utils/uuidparse.c | 14 +++++++------- 2 files changed, 8 insertions(+), 7 deletions(-) commit facafe2edb98db3914e1b1b0ee59906310d60f47 Author: Sami Kerola Date: Sun Nov 22 20:46:40 2020 +0000 uuidparse: use libuuid function to test nil uuid Signed-off-by: Sami Kerola misc-utils/uuidparse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bbb66067c523176c6bbe8e1c7164469be4c6ad60 Author: Ryan Finnie Date: Sun Dec 27 10:01:26 2020 -0800 libfdisk: ignore 33553920 byte optimal I/O size A 33553920 byte optimal I/O size arises from badly-implemented USB SATA adapters reporting 0xffff 512 byte sectors (32 MiB - 512). Commit acb7651f8897ae73d0f45dd75bc87630001c61b9 indirectly addresses this by ignoring the optimal I/O size if it's not a multiple of the physical sector size. That works if the physical sector size is 4096, but 33553920 optimal is allowed for 512 physical. This commit explicitly ignores 33553920, as there is no legitimate situation where this number would be the real optimal I/O size. Signed-off-by: Ryan Finnie Closes: https://github.com/karelzak/util-linux/issues/1221 libfdisk/src/alignment.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit 67c9744c10df517e62f3077ca44eb1a4bbf2c689 Author: Anatoly Pugachev Date: Sat Dec 19 21:36:00 2020 +0300 tests: add checksum for cramfs/mkfs for LE:16384 (ia64) Signed-off-by: Anatoly Pugachev tests/ts/cramfs/mkfs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3c560686099581d6b00291eef7426e9a86e331d8 Author: Ville Skyttä Date: Thu Dec 17 23:39:05 2020 +0200 *: spelling and grammar fixes Documentation/howto-pull-request.txt | 2 +- Documentation/release-schedule.txt | 2 +- configure.ac | 2 +- disk-utils/fdformat.c | 2 +- libblkid/samples/mkfs.c | 2 +- login-utils/sulogin.c | 2 +- misc-utils/uuidd.c | 2 +- sys-utils/flock.1 | 2 +- sys-utils/mount.c | 3 +-- 9 files changed, 9 insertions(+), 10 deletions(-) commit 7ed579523b556b1270f28dbdb7ee07dee310f157 Author: Karel Zak Date: Thu Dec 17 11:07:38 2020 +0100 lib: fix compiler warnings [-Wmaybe-uninitialized] Signed-off-by: Karel Zak lib/fileutils.c | 3 ++- lib/timeutils.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) commit 22a64b02b9b953af4f30506cd3c10de4630de632 Author: Karel Zak Date: Thu Dec 17 11:07:25 2020 +0100 libmount: fix compiler warnings [-Wmaybe-uninitialized] Signed-off-by: Karel Zak libmount/src/context_loopdev.c | 2 +- libmount/src/lock.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) commit 60bad224a830402333d246669d9fb6b4728bc87e Author: Karel Zak Date: Thu Dec 17 10:57:33 2020 +0100 tests: suggest "make check-programs" Signed-off-by: Karel Zak tests/run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 948182f4befbcb224fa2e43da1d3673485fcf4c2 Author: Issam E. Maghni Date: Wed Dec 16 19:16:11 2020 -0500 configure: test -a|o is not POSIX configure.ac | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit 5ebff0918d7959084ba05fd19c6ae0f48c0e07a9 Author: Karel Zak Date: Tue Dec 15 11:31:57 2020 +0100 lscpu: remove unnecessary prefix from static function Signed-off-by: Karel Zak sys-utils/lscpu-arm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cf918bd3ac9ba69e1a9149093ca335696d95d432 Author: Karel Zak Date: Mon Dec 14 15:56:55 2020 +0100 scriptlive: fix compiler warnings [-Wmaybe-uninitialized] term-utils/scriptlive.c: In function 'process_next_step': term-utils/scriptlive.c:125:4: warning: 'now.tv_usec' may be used uninitialized in this function [-Wmaybe-uninitialized] term-utils/scriptlive.c:122:19: note: 'now.tv_usec' was declared here term-utils/scriptlive.c:125:4: warning: 'now.tv_sec' may be used uninitialized in this function [-Wmaybe-uninitialized] term-utils/scriptlive.c:122:19: note: 'now.tv_sec' was declared here Signed-off-by: Karel Zak term-utils/scriptlive.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 117cbf91802ed0aa0bb3295fa4764c55d616f30c Author: Karel Zak Date: Mon Dec 14 15:56:55 2020 +0100 script: fix compiler warnings [-Wmaybe-uninitialized] term-utils/script.c: In function 'log_close.part.0.isra': term-utils/script.c:306:3: warning: 'now.tv_usec' may be used uninitialized in this function [-Wmaybe-uninitialized] term-utils/script.c:303:18: note: 'now.tv_usec' was declared here term-utils/script.c:306:3: warning: 'now.tv_sec' may be used uninitialized in this function [-Wmaybe-uninitialized] term-utils/script.c:303:18: note: 'now.tv_sec' was declared here Signed-off-by: Karel Zak term-utils/script.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cf8c19173845ca653f89dc7acb56d68c002788c1 Author: Karel Zak Date: Mon Dec 14 15:56:55 2020 +0100 hwclock: fix compiler warnings [-Wmaybe-uninitialized] sys-utils/hwclock-rtc.c: In function 'synchronize_to_clock_tick_rtc': sys-utils/hwclock.c:169:28: warning: 'now.tv_usec' may be used uninitialized in this function [-Wmaybe-uninitialized] sys-utils/hwclock-rtc.c:215:24: note: 'now.tv_usec' was declared here sys-utils/hwclock.c:168:28: warning: 'now.tv_sec' may be used uninitialized in this function [-Wmaybe-uninitialized] sys-utils/hwclock-rtc.c:215:24: note: 'now.tv_sec' was declared here sys-utils/hwclock.c:169:28: warning: 'begin.tv_usec' may be used uninitialized in this function [-Wmaybe-uninitialized] sys-utils/hwclock-rtc.c:215:17: note: 'begin.tv_usec' was declared here sys-utils/hwclock.c:168:28: warning: 'begin.tv_sec' may be used uninitialized in this function [-Wmaybe-uninitialized] sys-utils/hwclock-rtc.c:215:17: note: 'begin.tv_sec' was declared here Signed-off-by: Karel Zak sys-utils/hwclock-rtc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5d58258d6293f39b78c16b99f7403ce8aa982ab4 Author: Karel Zak Date: Mon Dec 14 15:56:55 2020 +0100 blkdiscard: fix compiler warnings [-Wmaybe-uninitialized] sys-utils/blkdiscard.c: In function 'main': sys-utils/blkdiscard.c:304:33: warning: 'now.tv_usec' may be used uninitialized in this function [-Wmaybe-uninitialized] sys-utils/blkdiscard.c:152:17: note: 'now.tv_usec' was declared here sys-utils/blkdiscard.c:305:37: warning: 'now.tv_sec' may be used uninitialized in this function [-Wmaybe-uninitialized] sys-utils/blkdiscard.c:152:17: note: 'now.tv_sec' was declared here sys-utils/blkdiscard.c:304:33: warning: 'last.tv_usec' may be used uninitialized in this function [-Wmaybe-uninitialized] sys-utils/blkdiscard.c:152:22: note: 'last.tv_usec' was declared here sys-utils/blkdiscard.c:305:65: warning: 'last.tv_sec' may be used uninitialized in this function [-Wmaybe-uninitialized] sys-utils/blkdiscard.c:152:22: note: 'last.tv_sec' was declared here Signed-off-by: Karel Zak sys-utils/blkdiscard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ca6fcc1a898662027ca671b5cf64f4cc21008ba1 Author: Karel Zak Date: Mon Dec 14 15:44:59 2020 +0100 mkswap: don't use deprecated security_context_t libselinux >= 3.1 makes security_context_t type deprecated. Let's ifdef it to avoid unwanted warnings. Signed-off-by: Karel Zak disk-utils/mkswap.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit e522815027a821634da26a79a78a44d310e961dd Author: Karel Zak Date: Mon Dec 14 15:44:59 2020 +0100 login-utils: don't use deprecated security_context_t libselinux >= 3.1 makes security_context_t type deprecated. Let's ifdef it to avoid unwanted warnings. Signed-off-by: Karel Zak login-utils/chfn.c | 7 ++++++- login-utils/chsh.c | 9 ++++++--- login-utils/lslogins.c | 12 ++++++------ login-utils/selinux_utils.c | 6 +++++- login-utils/sulogin.c | 7 ++++++- login-utils/vipw.c | 6 +++++- 6 files changed, 34 insertions(+), 13 deletions(-) commit eba9ef598fd9fb9687e322a31b3396461320e7ef Author: Karel Zak Date: Mon Dec 14 15:44:59 2020 +0100 libmount: don't use deprecated security_context_t libselinux >= 3.1 makes security_context_t type deprecated. Let's ifdef it to avoid unwanted warnings. Signed-off-by: Karel Zak libmount/src/optstr.c | 12 ++++++++++-- sys-utils/mount.c | 10 +++++++--- 2 files changed, 17 insertions(+), 5 deletions(-) commit 1468eda63f219dbe42e553e750ca84f048b5a7af Author: Karel Zak Date: Mon Dec 14 15:44:38 2020 +0100 build-sys: check for libselinux >= 3.1 Signed-off-by: Karel Zak configure.ac | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) commit 61c49a6ed5421a1cdccc2ca1c32e5baba235e469 Author: Karel Zak Date: Mon Dec 14 13:42:01 2020 +0100 tests: update blkid output for iso/udf Signed-off-by: Karel Zak tests/expected/blkid/low-probe-udf-cd-mkudfiso-20100208 | 4 ++-- tests/expected/blkid/low-probe-udf-cd-nero-6 | 4 ++-- tests/expected/blkid/low-probe-udf-hdd-macosx-2.60-4096 | 4 ++-- tests/expected/blkid/low-probe-udf-hdd-win7 | 4 ++-- tests/expected/blkid/low-probe-udf-multi-genisoimage-0 | 4 ++-- tests/expected/blkid/low-probe-udf-multi-genisoimage-417 | 4 ++-- tests/expected/blkid/low-probe-udf-multi-genisoimage-834 | 4 ++-- tests/expected/blkid/low-probe-udf-multi-mkudffs-0 | 4 ++-- tests/expected/blkid/low-probe-udf-multi-mkudffs-320 | 4 ++-- tests/expected/blkid/low-probe-udf-multi-mkudffs-640 | 4 ++-- 10 files changed, 20 insertions(+), 20 deletions(-) commit 1492fb4ef2c8574326bc9b097bf2fa41ad53945b Author: Karel Zak Date: Mon Dec 14 11:38:04 2020 +0100 lsblk: read SCSI_IDENT_SERIAL also from udev Addresses: https://github.com/karelzak/util-linux/issues/1143 Signed-off-by: Karel Zak misc-utils/lsblk-properties.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 72ab706502cfaef58fd99ca266b7ebe1a9fac542 Author: Karel Zak Date: Fri Dec 11 10:02:22 2020 +0100 blkid: add another UDF identifiers Reported-by: Pali Rohár Signed-off-by: Karel Zak misc-utils/blkid.c | 2 ++ 1 file changed, 2 insertions(+) commit 150394604db4ddd246865a1d5d52386e19883652 Author: Karel Zak Date: Thu Dec 10 12:10:06 2020 +0100 blkid: encode all udf and iso IDs in udev output We encode to "safe" strings almost all variables for 'blkid -o udev' and we need it also for SYSTEM_ID, PUBLISHER_ID, APPLICATION_ID, BOOT_SYSTEM_ID and recently added VOLUME_SET_ID and DATA_PREPARER_ID. This change makes blkid from util-linux more compatible with built-in udevd blkid. Addresses: https://github.com/karelzak/util-linux/pull/1215 (commit 5cbffdb74f6fec51b2cf260bea66375823fe65e7) Signed-off-by: Karel Zak misc-utils/blkid.c | 9 ++++++++- tests/expected/blkid/low-probe-iso | 2 +- tests/expected/blkid/low-probe-iso-different-iso-joliet-label | 10 +++++----- tests/expected/blkid/low-probe-iso-joliet | 2 +- tests/expected/blkid/low-probe-iso-multi-genisoimage-0 | 2 +- tests/expected/blkid/low-probe-iso-multi-genisoimage-174 | 2 +- tests/expected/blkid/low-probe-iso-multi-genisoimage-348 | 2 +- tests/expected/blkid/low-probe-iso-rr-joliet | 2 +- tests/expected/blkid/low-probe-iso-unicode-long-label | 10 +++++----- tests/expected/blkid/low-probe-udf-hdd-macosx-2.60-4096 | 6 +++--- tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.0.0-1 | 4 ++-- tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.0.0-2 | 6 +++--- tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-1 | 4 ++-- tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-2 | 4 ++-- tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-3 | 4 ++-- tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-4 | 4 ++-- tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-5 | 4 ++-- tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-6 | 4 ++-- tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-7 | 4 ++-- tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-8 | 4 ++-- tests/expected/blkid/low-probe-udf-hdd-mkudffs-2.2 | 4 ++-- tests/expected/blkid/low-probe-udf-hdd-win7 | 4 ++-- tests/expected/blkid/low-probe-udf-multi-mkudffs-0 | 4 ++-- tests/expected/blkid/low-probe-udf-multi-mkudffs-320 | 4 ++-- tests/expected/blkid/low-probe-udf-multi-mkudffs-640 | 4 ++-- 25 files changed, 58 insertions(+), 51 deletions(-) commit eb6a4cc2e1e28f5e297378fb384e297dd238f7e2 Author: Pali Rohár Date: Thu Dec 10 02:38:06 2020 +0100 libblkid: iso9660: add new test images Image iso-different-iso-joliet-label contains different identifiers in ISO and Joliet locations. Identifiers are prefixed with "ISO" or "Joliet" string to verify that UNICODE Joliet has preference over ASCII ISO. Image iso-unicode-long-label contains very long identifiers in ISO location which do not fit into the Joliet location. In ISO location is UNICODE character 'ï' replaced by '_' and unrepresentable spaces also by '_'. This test verifies that libblkid can use first half of identifiers from Joliet (which contains UNICODE) and second half from ISO which is just uppercase and only small subset of ASCII. This image was generated by Nero Linux software and basically this truncate and '_' replacement is done by default for any long or UNICODE label. Signed-off-by: Pali Rohár .../blkid/low-probe-iso-different-iso-joliet-label | 11 +++++++++++ tests/expected/blkid/low-probe-iso-unicode-long-label | 11 +++++++++++ .../blkid/images-fs/iso-different-iso-joliet-label.img.xz | Bin 0 -> 712 bytes tests/ts/blkid/images-fs/iso-unicode-long-label.img.xz | Bin 0 -> 616 bytes 4 files changed, 22 insertions(+) commit 5cbffdb74f6fec51b2cf260bea66375823fe65e7 Author: Pali Rohár Date: Thu Dec 10 01:52:18 2020 +0100 libblkid: iso9660: add support for VOLUME_SET_ID and DATA_PREPARER_ID udf superblock code already sets VOLUME_SET_ID to Volume Set Identifier from UDF Primary Volume Descriptor. In iso9660 similar meaning has Volume Set Identifier in ISO9660 Primary (or Supplementary Joliet) Volume Descriptor. Therefore exports it as VOLUME_SET_ID label. In ISO9660 Primary (and Supplementary Joliet) Volume Descriptor exists another member Data Preparer Identifier which is currently not parsed by iso9660 superblock code. To have iso9660 superblock code feature complete export also Data Preparer Identifier as DATA_PREPARER_ID label. UDF does not have equivalent of Data Preparer Identifier. Signed-off-by: Pali Rohár libblkid/src/superblocks/iso9660.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) commit 18565da827bb8d8f0e4d4c8c204b0fea233576af Author: Pali Rohár Date: Thu Dec 10 01:43:46 2020 +0100 libblkid: iso9660: parse SYSTEM_ID, PUBLISHER_ID and APPLICATION_ID from Joliet Joliet may contain UNICODE variant of these identifiers. So prefer UNICODE variant from Joliet over ASCII variant if Joliet one is available. Also use same technique as for Label for reconstructing original UNICODE variants of these identifiers. Signed-off-by: Pali Rohár libblkid/src/superblocks/iso9660.c | 47 ++++++++++++++++++++++++++++++-------- 1 file changed, 37 insertions(+), 10 deletions(-) commit dab6d75cfc344a9477889778fe3f84748c9742a8 Author: Pali Rohár Date: Thu Dec 10 00:21:55 2020 +0100 libblkid: iso9660: improve label parsing Label in Joliet is UNICODE (UTF16BE) but can contain only 16 characters. Label in PVD is subset of ASCII but can contain up to the 32 characters. Non-representable characters are stored as replacement character '_'. Label in Joliet is in most cases trimmed but UNICODE version of label in PVD. Based on these facts try to reconstruct original label if label in Joliet is prefix of the label in PVD (ignoring non-representable characters). It is possible that label in Joliet and PVD are totally different. In this case label from Joliet as prior this change. Signed-off-by: Pali Rohár libblkid/src/superblocks/iso9660.c | 67 +++++++++++++++++++++++++++----------- 1 file changed, 48 insertions(+), 19 deletions(-) commit 4bfcb1fc4af2345f055876dabc7be778bcbf4b70 Author: Pali Rohár Date: Wed Dec 9 01:22:28 2020 +0100 libblkid: iso9660: fix parsing images which do not have Primary Volume Descriptor as the first ECMA 119 (ISO 9660) does not mandate that Primary Volume Descriptor needs to be the first in Volume Descriptor Set sequence. Move assignment of labels outside of the for-loop and correctly detects Primary Volume Descriptor via its type (0x01) at any position in sequence. Signed-off-by: Pali Rohár libblkid/src/superblocks/iso9660.c | 118 ++++++++++++++++--------------------- 1 file changed, 51 insertions(+), 67 deletions(-) commit db66eddf7ff24a840d02f00c8499cbea1f68e3bd Author: Pali Rohár Date: Wed Dec 9 01:22:10 2020 +0100 libblkid: iso9660: set block size also for High Sierra format High Sierra format has also block size 2048. Signed-off-by: Pali Rohár libblkid/src/superblocks/iso9660.c | 1 + 1 file changed, 1 insertion(+) commit 5ff184b5b561494152e6e4a4217e4351948a6b31 Author: Pali Rohár Date: Wed Dec 9 00:36:13 2020 +0100 libblkid: iso9660: check that iso->publisher_id and iso->application_id are not file paths ECMA 119 (ISO 9660) says that if the first byte is set to (5F), the remaining bytes of this field shall specify an identifier for a file containing the data. As libblkid does not support reading files from the filesystem itself it cannot parse fields which starts with 0x5F '_' char. So for now ignore iso->publisher_id and iso->application_id values which starts with '_' character. Signed-off-by: Pali Rohár libblkid/src/superblocks/iso9660.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8d027a2135af110bf9f4b4a165e34a2f8c0f6203 Author: Pali Rohár Date: Wed Dec 9 00:34:23 2020 +0100 libblkid: iso9660: do not check is_str_empty() for iso->system_id and boot->boot_system_id ECMA 119 (ISO 9660) does not say anything if all bytes are of these fields are FILLER then fields are not set. It says it for iso->publisher_id and iso->application_id. Signed-off-by: Pali Rohár libblkid/src/superblocks/iso9660.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 2a2b7da1311cfb12ceb020ac62305ce1a3448e6b Author: Karel Zak Date: Tue Dec 8 13:09:10 2020 +0100 tests: (fileutils) remove unused code Signed-off-by: Karel Zak lib/fileutils.c | 4 ---- 1 file changed, 4 deletions(-) commit 5bc0378bfaa9f4a816d4839fc89ce8c050cd38ed Author: Karel Zak Date: Tue Dec 8 10:52:20 2020 +0100 tests: (blkid) add erofs image Signed-off-by: Karel Zak tests/expected/blkid/low-probe-erofs | 5 +++++ tests/ts/blkid/images-fs/erofs.img.xz | Bin 0 -> 200 bytes 2 files changed, 5 insertions(+) commit 7b2a874e2ee306e9503210f8aa5eed7f53c06755 Author: Gao Xiang Date: Sat Dec 5 15:44:10 2020 +0800 libblkid: add erofs filesystem support Enhanced Read-Only File System (EROFS) has been included in Linux kernel, many Linux distributions, buildroot and Android AOSP for a while. Plus, nowadays, it's known that EROFS has been commercially used by several Android vendors for their system partitions. util-linux in busybox can also detect it recently. This patch adds support for detecting EROFS filesystem to libblkid. Signed-off-by: Gao Xiang libblkid/src/Makemodule.am | 1 + libblkid/src/superblocks/erofs.c | 73 ++++++++++++++++++++++++++++++++++ libblkid/src/superblocks/superblocks.c | 3 +- libblkid/src/superblocks/superblocks.h | 1 + 4 files changed, 77 insertions(+), 1 deletion(-) commit 5594c690e5806d306e0afbdb9b9bef185dc755c2 Merge: cc72e0d2c b6168ae9c Author: Karel Zak Date: Mon Dec 7 13:44:25 2020 +0100 Merge branch 'master' of https://github.com/pali/util-linux into master * 'master' of https://github.com/pali/util-linux: libblkid: udf: update test output for APPLICATION_ID and PUBLISHER_ID libblkid: udf: add support for PUBLISHER_ID libblkid: udf: add support for APPLICATION_ID libblkid: udf: check that dstrings are encoded in OSTA Compressed Unicode commit cc72e0d2cfa7ccf389717b50a2995884d2c1960b Merge: 96c828258 cd3f22e6e Author: Karel Zak Date: Mon Dec 7 13:37:41 2020 +0100 Merge branch 'fix/losetup-printf' of https://github.com/bahnwaerter/util-linux into master * 'fix/losetup-printf' of https://github.com/bahnwaerter/util-linux: losetup: fix wrong printf() format specifier for ino_t data type commit 96c828258401e7e3c889878d245ea76eefbbf000 Author: Karel Zak Date: Mon Dec 7 13:26:33 2020 +0100 login: fix compiler warning [-Werror=strict-prototypes] Signed-off-by: Karel Zak login-utils/login.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cd3f22e6e0f00fb0877641f1ad4aa508853440db Author: Manuel Bentele Date: Sat Dec 5 23:51:27 2020 +0100 losetup: fix wrong printf() format specifier for ino_t data type Since the range of the ino_t data type is platform-specific (depending on the wordsize), a usage of the fixed format specifier %PRIu64 is not correct for ino_t on some 32-bit architectures, eg. ARM (Raspberry Pi 1). This issue may lead to undefinied output and is not reported by gcc (in version 10.2.0 and 8.3.0-6+rpi1) even though -Wformat is enabled by -Wall. Therefore it is most likely that it seems to be a false negative error in gcc's format specifier check, so that this issue was never detected before. This change fixes the issue by the use of a cast, since there is no platform-independent format specifier for ino_t available. The wrong format specifier %PRIu64 is replaced by %ju, where its corresponding variable of type ino_t is casted to uintmax_t. The type uintmax_t represents the largest platform-specific unsigned integer, so that all integer values are preserved for a platform-independent printing. Fixes: https://github.com/karelzak/util-linux/issues/1211 Signed-off-by: Manuel Bentele sys-utils/losetup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b6168ae9cf90edaead8370e58674ed772546a28b Author: Pali Rohár Date: Sat Dec 5 21:10:23 2020 +0100 libblkid: udf: update test output for APPLICATION_ID and PUBLISHER_ID Signed-off-by: Pali Rohár tests/expected/blkid/low-probe-udf | 1 + tests/expected/blkid/low-probe-udf-bdr-2.60-nero | 1 + tests/expected/blkid/low-probe-udf-cd-mkudfiso-20100208 | 1 + tests/expected/blkid/low-probe-udf-cd-nero-6 | 1 + tests/expected/blkid/low-probe-udf-hdd-macosx-2.60-4096 | 2 ++ tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.0.0-1 | 2 ++ tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.0.0-2 | 2 ++ tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-1 | 2 ++ tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-2 | 2 ++ tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-3 | 2 ++ tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-4 | 2 ++ tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-5 | 2 ++ tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-6 | 2 ++ tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-7 | 2 ++ tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-8 | 2 ++ tests/expected/blkid/low-probe-udf-hdd-mkudffs-2.2 | 2 ++ tests/expected/blkid/low-probe-udf-hdd-udfclient-0.7.5 | 1 + tests/expected/blkid/low-probe-udf-hdd-udfclient-0.7.7 | 1 + tests/expected/blkid/low-probe-udf-hdd-win7 | 1 + tests/expected/blkid/low-probe-udf-multi-genisoimage-0 | 1 + tests/expected/blkid/low-probe-udf-multi-genisoimage-417 | 1 + tests/expected/blkid/low-probe-udf-multi-genisoimage-834 | 1 + tests/expected/blkid/low-probe-udf-multi-mkudffs-0 | 2 ++ tests/expected/blkid/low-probe-udf-multi-mkudffs-320 | 2 ++ tests/expected/blkid/low-probe-udf-multi-mkudffs-640 | 2 ++ 25 files changed, 40 insertions(+) commit 67c4bf1f24226865d4d611702d9842966c4fd0b1 Author: Pali Rohár Date: Sat Dec 5 20:45:25 2020 +0100 libblkid: udf: add support for PUBLISHER_ID iso9660 superblock code already sets PUBLISHER_ID to Publisher Identifier from ISO9660 Supplementary Volume Descriptor. In udf field LVInfo1 from Implementation Use Volume Descriptor could contain information such as Owner Name. More UDF generating tools (e.g. Solaris's labelit or Linux udftools 2.3+) set this field to person who creating the filesystem therefore its meaning is similar to ISO9660 Publisher Identifier. So for compatibility with iso9660 superblock code export this field via PUBLISHER_ID label. Signed-off-by: Pali Rohár libblkid/src/superblocks/udf.c | 42 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) commit f09ceed2b63c396b37ca256faba1cc1d1c44507f Author: Pali Rohár Date: Sat Dec 5 20:43:22 2020 +0100 libblkid: udf: add support for APPLICATION_ID iso9660 superblock code already sets APPLICATION_ID to Application Identifier from ISO9660 Supplementary Volume Descriptor. In udf similar meaning has Application Identifier from UDF Primary Volume Descriptor. Therefore exports it as APPLICATION_ID label. More tools for generating hybrid ISO+UDF images (e.g. genisoimage, mkisofs or nero) set Application Identifier in UDF Primary Volume Descriptor to just empty string. But they set Implementation Identifier in UDF Primary Volume Descriptor to their tool name. So if Application Identifier is empty then exports Implementation Identifier as APPLICATION_ID label. Please note that Application Identifier and Implementation Identifier are stored in UDF only in ASCII, not UNICODE. Signed-off-by: Pali Rohár libblkid/src/superblocks/udf.c | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) commit d8056b5489a365b96c19a4b7fbf0f6b1cbbd566c Author: Pali Rohár Date: Sat Dec 5 20:39:35 2020 +0100 libblkid: udf: check that dstrings are encoded in OSTA Compressed Unicode dstring structures are in UL_ENCODE_LATIN1/UL_ENCODE_UTF16BE encodings only when corresponding desc_charset structures are set to the OSTA Compressed Unicode. So add missing checks. Signed-off-by: Pali Rohár libblkid/src/superblocks/udf.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) commit 07b12154dcab0bf6b54dfee36995782e3891a3d7 Author: Sami Kerola Date: Mon Nov 16 21:37:29 2020 +0000 login: tidy up manual page Add defaults to couple logindefs, and generally clean up manual page a little bit. Signed-off-by: Sami Kerola login-utils/login.1 | 148 ++++++++++++++++++++++++---------------------------- 1 file changed, 68 insertions(+), 80 deletions(-) commit a75700d86e2a0245d28fdf2762638d07efc549a0 Author: Sami Kerola Date: Wed Dec 2 22:56:16 2020 +0000 lib/fileutils: make close_all_fds() to be similar with close_range() The util-linux close_all_fds() serves the same purpose as close_range() that will over time obsolete local implementation completely. For upcoming few years it is best to have a fallback that uses same input arguments as the new system call. That allows surrounding code and variables not to be affected by version of mass file descriptor closing function. Proposed-by: Karel Zak Reference: https://github.com/karelzak/util-linux/pull/1205#discussion_r534080128 Signed-off-by: Sami Kerola include/fileutils.h | 6 ++++-- lib/fileutils.c | 39 +++++++++++++++++++-------------------- login-utils/login.c | 7 +------ 3 files changed, 24 insertions(+), 28 deletions(-) commit f0649c0d83f30c7e2318ba0f578a55d875cca4d7 Author: Sami Kerola Date: Sat Nov 14 12:55:10 2020 +0000 login: use close_range() system call when possible This system call was added while back, but does not have glibc support yet. Lets try to use the new facility early on. The promise in reference link is that the new call is faster, and works when /proc is not mounted. Reference: https://lwn.net/Articles/789000/ Reference: https://lwn.net/Articles/789023/ Reference: https://kernelnewbies.org/LinuxChanges#Linux_5.9.New_close_range.28.29_system_call_for_easier_closing_of_file_descriptors Signed-off-by: Sami Kerola configure.ac | 2 ++ include/fileutils.h | 14 ++++++++++++++ login-utils/login.c | 7 ++++++- 3 files changed, 22 insertions(+), 1 deletion(-) commit 931e60982ef016481f51dfbcbc103a527ef2ab17 Author: Sami Kerola Date: Sat Nov 14 11:32:54 2020 +0000 login: move message printing out from main() Signed-off-by: Sami Kerola login-utils/login.c | 55 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 31 insertions(+), 24 deletions(-) commit b04f1835782ea8418c09333e9b95e45d167ef4ff Author: Sami Kerola Date: Fri Nov 13 23:04:43 2020 +0000 login: use xalloc memory allocation helpers everywhere Apart two function calls login(1) already used xalloc functions. If there was a time when login tried to gracefully handle allocation errors that has not been true for long time. Signed-off-by: Sami Kerola login-utils/login.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 7679a2c5ca2dc640ea452ae0af730b44e1e822c7 Author: Sami Kerola Date: Fri Nov 13 22:11:01 2020 +0000 login: fix coding style issues Couple function had spaces instead of tabs in indent. This change uses tabs everywhere, and does handful of other spacing additions and removals. Signed-off-by: Sami Kerola login-utils/login.c | 114 ++++++++++++++++++++++++++-------------------------- 1 file changed, 57 insertions(+), 57 deletions(-) commit d51538190134e490fa1a26b7ea6ac4956bf64076 Author: Sami Kerola Date: Fri Nov 13 21:25:02 2020 +0000 login: use system definitions to determine maxium login name length Allocating stack for about 10x more than longest possible user name is wasteful, even if it happens for reletively short period of time. Signed-off-by: Sami Kerola login-utils/login.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit 5941a0db06c354d46147d39e16ff122b5bacb4cf Author: Sami Kerola Date: Fri Nov 13 22:58:17 2020 +0000 login: use calloc() when memory needs to be cleared Signed-off-by: Sami Kerola login-utils/login.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 0da0a5ed3bc17381b67ca1719367ce4ae4fa26b8 Author: Sami Kerola Date: Fri Nov 13 20:55:19 2020 +0000 login: use explicit_bzero() to get rid of confidental memory Earlier code was most probably correct, but it is best to be safe than sorry when dealing with confidental data removals. Signed-off-by: Sami Kerola login-utils/login.c | 4 ++++ 1 file changed, 4 insertions(+) commit 5dd0896aa8c7900a40dd6fbe48b2c3fe5463147c Author: Sami Kerola Date: Fri Nov 13 00:17:18 2020 +0000 login: add initialize() function to have less stack allocated in main() And move couple variables to the narrow scope they are used. Signed-off-by: Sami Kerola login-utils/login.c | 86 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 48 insertions(+), 38 deletions(-) commit 79a8afeb8f7f48cdecebc59a5807b8f2ee07654f Author: Sami Kerola Date: Thu Nov 12 23:53:44 2020 +0000 login: replace function like definitions with inline functions Signed-off-by: Sami Kerola login-utils/login.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) commit fb038d27a1a0e2faf7fc9c5bbf62ec6379c93f10 Author: Sami Kerola Date: Thu Nov 12 23:44:55 2020 +0000 login: move getlogindefs_num() after localization init There are translations in getlogindefs_num() and they will not take effect unless the function call is after the setlocale(), bindtextdomain(), and textdomain(). Signed-off-by: Sami Kerola login-utils/login.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0b4d75fae55b4a5ff8f65df8551c56cf1eeb9b08 Author: Sami Kerola Date: Thu Nov 12 23:58:59 2020 +0000 login: move timeout from global to local scope Signed-off-by: Sami Kerola login-utils/login.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bfcba3f586a0bf060ec650ab0eabc0f6bec05c19 Author: Sami Kerola Date: Thu Nov 12 23:40:30 2020 +0000 login: stop keeping timeout message in memory forever When the timeout is cancelled the message can be removed from memory. Signed-off-by: Sami Kerola login-utils/login.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 42ccc9cfb497bf18726eef57865cc72fc688e2ec Author: Sami Kerola Date: Thu Nov 12 23:34:16 2020 +0000 login: use sig_atomic_t type for variable accessed from signal handler Signed-off-by: Sami Kerola login-utils/login.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9efa805cd7734ae0db9f9313e995ae9a99536e14 Merge: 58b510e58 14a36f96e Author: Karel Zak Date: Thu Dec 3 15:09:19 2020 +0100 Merge branch 'col-bug1198' of https://github.com/kerolasa/util-linux * 'col-bug1198' of https://github.com/kerolasa/util-linux: col: make input to tolerate invalid wide characters commit 58b510e5805d8350c31bfb81a47bcd38ea9fdd7e Author: Karel Zak Date: Thu Dec 3 12:14:10 2020 +0100 libsmartcols: sanitize variable names on export output The shells are very restrictive about variable names, only [:alnum:] chars are allowed (and alphabetic chars as the first char). The library will replace "bad" chars with "_". The char '%' at the end is replaced by _PCT. Addresses: https://github.com/karelzak/util-linux/issues/1201 Signed-off-by: Karel Zak include/carefulputc.h | 16 ++++++++++++++++ libsmartcols/src/print.c | 5 ++++- libsmartcols/src/table.c | 4 ++++ misc-utils/findmnt.8 | 4 +++- misc-utils/lsblk.8 | 4 +++- sys-utils/lsipc.1 | 5 ++++- sys-utils/lsmem.1 | 4 ++-- 7 files changed, 36 insertions(+), 6 deletions(-) commit 14a36f96ee671c2d3a20fa15437844a711e0b29c Author: Sami Kerola Date: Thu Nov 26 22:01:39 2020 +0000 col: make input to tolerate invalid wide characters The getwchar(3) will choke and exit if invalid character is encountered. This change will make col(1) to print broken multibyte characters as \x{hex} string. Reported-by: Vitaly Lipatov Addresses: https://github.com/karelzak/util-linux/issues/1198 Signed-off-by: Sami Kerola tests/expected/col/multibyte | 1 - tests/expected/col/multibyte-invalid | 1 + tests/expected/col/multibyte-valid | 1 + tests/ts/col/multibyte | 11 +++- text-utils/col.c | 109 +++++++++++++++++++++-------------- 5 files changed, 77 insertions(+), 46 deletions(-) commit 77d44c1e51d4a0eec29af292864067d36231534e Merge: 8f25830c9 4d8fb3c06 Author: Karel Zak Date: Wed Dec 2 12:06:25 2020 +0100 Merge branch 'dankamongmen/libblkid-manual-fix' of https://github.com/dankamongmen/util-linux commit 8f25830c9b55a82ac549291bd75d6572b4773734 Author: Karel Zak Date: Tue Dec 1 11:44:09 2020 +0100 travis: disable OSX for now For weeks we have a problem with timeout on OSX on travis, not sure how to fix it ... volunteer wanted :-) ==> ./bootstrap --prefix=/usr/local/Cellar/cmake/3.19.1 --no-system-libs --paral ==> make No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself. Check the details on how to adjust your build configuration on: https://docs.travis-ci.com/user/common-build-problems/#Build-times-out-because-no-output-was-received The build has been terminated Signed-off-by: Karel Zak .travis.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit cd588d665308dd52d3911e1ee2768ec57ab2efc9 Author: Karel Zak Date: Tue Dec 1 11:35:02 2020 +0100 fuzzers: make tests setup more robust - use robust functions like write_all() - don't use assert() to check write/open/etc return values, because oss-fuzz.com report foreign (system, libc, ...) issues as our fails Addresses: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=28009 Signed-off-by: Karel Zak libfdisk/src/script.c | 15 ++++++++------- libmount/src/fuzz.c | 8 ++++++-- login-utils/last.c | 11 ++++++----- 3 files changed, 20 insertions(+), 14 deletions(-) commit abd78155016b476b01a62b5dac6a9660cd26a874 Author: Karel Zak Date: Mon Nov 30 10:33:20 2020 +0100 tests: (blkid) add support for multisession images This commit adds support for multisession filesystem images to standard low-probe blkid tests. The expected image name is -multi-[- ...][-].img For example: iso-multi-0-174-348-genisoimage.img.xz triggers three sub-tests: : iso-multi-genisoimage-0 ... OK : iso-multi-genisoimage-174 ... OK : iso-multi-genisoimage-348 ... OK Addresses: https://github.com/karelzak/util-linux/issues/1161 Signed-off-by: Karel Zak .../blkid/low-probe-iso-multi-genisoimage-0 | 9 +++++++ .../blkid/low-probe-iso-multi-genisoimage-174 | 9 +++++++ .../blkid/low-probe-iso-multi-genisoimage-348 | 9 +++++++ .../blkid/low-probe-udf-multi-genisoimage-0 | 11 ++++++++ .../blkid/low-probe-udf-multi-genisoimage-417 | 11 ++++++++ .../blkid/low-probe-udf-multi-genisoimage-834 | 11 ++++++++ tests/expected/blkid/low-probe-udf-multi-mkudffs-0 | 11 ++++++++ .../expected/blkid/low-probe-udf-multi-mkudffs-320 | 11 ++++++++ .../expected/blkid/low-probe-udf-multi-mkudffs-640 | 11 ++++++++ .../iso-multi-0-174-348-genisoimage.img.xz | Bin 0 -> 656 bytes .../images-fs/udf-multi-0-320-640-mkudffs.img.xz | Bin 0 -> 1720 bytes .../udf-multi-0-417-834-genisoimage.img.xz | Bin 0 -> 3176 bytes tests/ts/blkid/low-probe | 30 ++++++++++++++++++--- 13 files changed, 119 insertions(+), 4 deletions(-) commit 4d8fb3c063485fdcb005de6d3d865a4aabc62bf9 Author: nick black Date: Thu Nov 26 22:52:20 2020 -0500 libblkid: fix some typos in function comments libblkid/src/partitions/partitions.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 0e0a3b59da9a7fd313c4ddf20f24c7a708d42fc3 Author: Karel Zak Date: Wed Nov 25 15:45:23 2020 +0100 libblkid: initialize magic strings in robust way It is the worst habit to depend on the order of the members of the structure ... Signed-off-by: Karel Zak libblkid/src/superblocks/cramfs.c | 4 +-- libblkid/src/superblocks/swap.c | 72 +++++++++++++++++++-------------------- 2 files changed, 37 insertions(+), 39 deletions(-) commit c175692050fc2542d911feb19d7c14e8eec2f4ec Merge: 30e8df968 8e3c0176b Author: Karel Zak Date: Wed Nov 25 14:48:30 2020 +0100 Merge remote-tracking branch 'pali/multisesssion' * pali/multisesssion: libblkid: udf: add support for unclosed sequential Write-Once media libblkid: udf: add support for multisession via session_offset hint libblkid: iso9660: add support for multisession via session_offset hint libblkid: fix blkid_probe_get_sb() to use hint offset calculation libblkid: allow to specify offset defined by hint for blkid_probe_get_idmag() libblkid: detect session_offset hint for optical discs libblkid: do size correction of optical discs also by last written sector libblkid: detect CD/DVD discs in packet writing mode libblkid: overwrite existing hint libblkid: export blkid_probe_reset_hints() blkid: add --hint =value libblkid: add blkid_probe_{set,get}_hint() commit 30e8df968f42ccf81638b9f81568a8d5298738a8 Author: Karel Zak Date: Wed Nov 25 14:02:11 2020 +0100 lslogins: call close() for usable FD [coverity scan] Signed-off-by: Karel Zak login-utils/lslogins.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 665d79e793265558bfcc3587498b603bfdb92cdb Merge: 7ffd3b0ef ef6ac5968 Author: Karel Zak Date: Tue Nov 24 13:12:22 2020 +0100 Merge remote-tracking branch 'sami/uuidd-work' * sami/uuidd-work: uuidd: fix misleading indentation uuidd: make timeout to take effect when debug is not defined uuidd: remove unnecessary bulk request size limit uuidd: add uuidd specific data types that are used in protocol uuidd: reorder bulk time and random generation code uuidd: document uuidd protocol uuidd: override operation type when performing bulk request uuidd: move option parsing to separate function uuidd: add command-line option values struct uuidd: use pid_t type when referring to process id commit 7ffd3b0ef668c72648c3f1e811371ee413dd9f82 Author: Karel Zak Date: Tue Nov 24 12:46:03 2020 +0100 build-sys: do not use extra subdir for getopt examples This is unnecessary, we have ${docsdir}/util-linux which is good enough for these two getopt examples. I guess the "getopt" subdirectory is legacy from time getopt has been merged into util-linux. Signed-off-by: Karel Zak misc-utils/Makemodule.am | 2 +- misc-utils/getopt.1.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 7fa2d7fc6c121be75749d218eceb7468a0029fc4 Author: Karel Zak Date: Tue Nov 24 11:31:45 2020 +0100 travis: try update to xcode10.1 Signed-off-by: Karel Zak .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 94ebe1d3e46e454d99fd157286b0a78dc1523c6a Author: Karel Zak Date: Mon Nov 23 15:16:39 2020 +0100 lsblk: add dependence between CD/DVD block and packet devices This dependence is defined by   $ cat /sys/class/pktcdvd/device_map pktcdvd0 252:0 11:0 Unfortunately, there is not any direct sysfs way how to refer this relationship in /sys/{block,dev/block}. So, we have to read the device_map file and then compare device numbers with the list. $ lsblk /dev/sr0 NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sr0 11:0 1 1024M 0 rom └─pktcdvd0 252:0 1 0B 0 disk Addresses: https://github.com/karelzak/util-linux/issues/1185 Signed-off-by: Karel Zak misc-utils/lsblk-devtree.c | 75 ++++++++++++++++++++++++++++++++++++++++++++++ misc-utils/lsblk.c | 34 ++++++++++++++++++--- misc-utils/lsblk.h | 20 ++++++++++++- 3 files changed, 124 insertions(+), 5 deletions(-) commit ef6ac596897dc603bf8f3f232f1d3c92276cf25f Author: Sami Kerola Date: Sat Nov 21 22:16:48 2020 +0000 uuidd: fix misleading indentation Signed-off-by: Sami Kerola misc-utils/uuidd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f187035d73aba923fd587b3cc7abf3b033f0ccb8 Author: Sami Kerola Date: Sat Nov 21 22:12:36 2020 +0000 uuidd: make timeout to take effect when debug is not defined The trailing comma made code to compile without issues, but meant all_done() was called only when --debug was in defined in command-line. Fixes: 3d6250e96b0041a3cbe2f8dd3e746cca5d6ac121 Signed-off-by: Sami Kerola misc-utils/uuidd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0453925535bae517fdba09e98da578c1c67dcf58 Author: Sami Kerola Date: Sat Nov 21 21:24:10 2020 +0000 uuidd: remove unnecessary bulk request size limit Limiting random query to 1000 uuid's was pointless when the next line will further restrict upper limit to 63 entries. The 63 entries is what fits to the uuidd communication buffer with the header. Signed-off-by: Sami Kerola misc-utils/uuidd.c | 2 -- 1 file changed, 2 deletions(-) commit b4911618195b981db74d76f8254ab0df1b3ae850 Author: Sami Kerola Date: Sat Nov 21 16:57:43 2020 +0000 uuidd: add uuidd specific data types that are used in protocol Use a typedef for types that are sensitive what comes to uuidd protocol field widths, read write sizes, and related checks. Proposed-by: Karel Zak Reference: https://github.com/karelzak/util-linux/pull/1196#discussion_r528595794 Signed-off-by: Sami Kerola misc-utils/uuidd.c | 84 +++++++++++++++++++++++++++++------------------------- 1 file changed, 45 insertions(+), 39 deletions(-) commit ea9416925c00cd3f364e05eb539aaba5bf7330c1 Author: Sami Kerola Date: Sat Nov 21 18:13:45 2020 +0000 uuidd: reorder bulk time and random generation code Write the data and response length values in same close to order they appear in protocol. This should make code a little easier to read. Signed-off-by: Sami Kerola misc-utils/uuidd.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 2049075a791d8c2760957c805da9bb005101e437 Author: Sami Kerola Date: Sat Nov 21 16:38:58 2020 +0000 uuidd: document uuidd protocol Seeing what can be expected should make it easier to understand what the code does. Notice that simply writing down the resposes one can start wondering deeper questions, such as, why does the time bulk response reply only one uuid followed by number how many were requested? Was that a some type of TODO note? Signed-off-by: Sami Kerola misc-utils/uuidd.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 77a54655bb84eecf2fd260cc6126fe08b7203539 Author: Sami Kerola Date: Sat Nov 21 10:14:17 2020 +0000 uuidd: override operation type when performing bulk request Relying to single vs bulk requests to be exactly two steps away from each other was an unnecessary dirty trick. Signed-off-by: Sami Kerola misc-utils/uuidd.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit 084efcee43fa440ef8fbf9d8e273a7f7098fb810 Author: Sami Kerola Date: Fri Nov 20 22:27:34 2020 +0000 uuidd: move option parsing to separate function Moving the option parsing to a separate function will allow moving some variables from main() heap to be in scope that free them later. That should make the uuidd to have a little bit smaller runtime memory allocation. The static long options is changed to be local variable. That should make it to be part of heap for a bit, until removed. Earlier the variable was in data segment and permanently in runtime memory. Whether this makes any impact either way is not entirely clear, but hope is the runtime memory allocation is tiny bit smaller. Signed-off-by: Sami Kerola misc-utils/uuidd.c | 71 +++++++++++++++++++++++++++++------------------------- 1 file changed, 38 insertions(+), 33 deletions(-) commit b03ffec18c6b866bf1d0c06b34115dc12d2c6997 Author: Sami Kerola Date: Fri Nov 20 22:17:22 2020 +0000 uuidd: add command-line option values struct The struct will help seeing where the variable values are coming from. This will also help upcoming refactoring. Signed-off-by: Sami Kerola misc-utils/uuidd.c | 91 ++++++++++++++++++++++++++++++++---------------------- 1 file changed, 54 insertions(+), 37 deletions(-) commit c14e0f62396aeba33c3f176ab92dfb362c7199ea Author: Sami Kerola Date: Fri Nov 20 22:05:46 2020 +0000 uuidd: use pid_t type when referring to process id Earlier use of a variable that holds switch enabling boolean to hold process id was a little bit strange, and not exactly correct. An int should be good enough to hold any pid, but it is better to be precise and use the type that is meant for the job. Signed-off-by: Sami Kerola misc-utils/uuidd.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 1e416dc0b9933961e75ac67fa3aed7598273443f Merge: 9b9954a9c 3a9a6036a Author: Karel Zak Date: Mon Nov 23 10:21:17 2020 +0100 Merge branch 'master' of https://github.com/pali/util-linux * 'master' of https://github.com/pali/util-linux: libblkid: drbdmanage: use blkid_probe_strncpy_uuid instead of blkid_probe_set_id_label commit 9b9954a9c4dcf26990c3b0672193b2698d345abc Merge: 93de9f687 0eba195d9 Author: Karel Zak Date: Mon Nov 23 10:19:01 2020 +0100 Merge branch 'privfix' of https://github.com/ericonr/util-linux commit 3a9a6036a4bf09b608cfbc6fabd7e6fe50f396fb Author: Pali Rohár Date: Sun Nov 22 19:44:09 2020 +0100 libblkid: drbdmanage: use blkid_probe_strncpy_uuid instead of blkid_probe_set_id_label Function blkid_probe_strncpy_uuid() is better suitable for setting UUID than function blkid_probe_set_id_label(). Signed-off-by: Pali Rohár libblkid/src/superblocks/drbdmanage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 93de9f687d1640fff963f26b7db474eef3746532 Author: Érico Rolim Date: Wed Nov 18 11:35:26 2020 -0300 setpriv: allow using [-+]all for capabilities. The initial change to lib/caputils that allowed this was commit 5d95818757941bc609e5aeec5e2218f7d35a6e19, which made it possible to trust the value returned by cap_last_cap(). The error message was also somewhat misleading, since cap_last_cap() being smaller than CAP_LAST_CAP happens when setpriv itself is built with kernel headers older than the currently running kernel, not due to libcap-ng. sys-utils/setpriv.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 0eba195d9ebc8f6f69f30c6c579cfb53f194d6b2 Author: Érico Rolim Date: Fri Nov 20 12:33:23 2020 -0300 setpriv: small clean-up. - Add _() calls for some strings which were missing it. - In print_caps(), use the same error checking done in list_known_caps(); it is expected that libcap-ng will always return a string, even if it's only "cap_%d". sys-utils/setpriv.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 57b74b0dcbaf492aa854aa323cf91122739696b2 Merge: 966420219 13b26e3c3 Author: Karel Zak Date: Fri Nov 20 12:01:22 2020 +0100 Merge branch 'w45' * w45: fdformat: remove command from default build more: improve error messaging when input file is directory ul: make set_column() zero check more obvious colrm: fix argument parsing rfkill: stop execution when rfkill device cannot be opened cifuzz: reindent yaml file man: make tilde and caret characters to render correctly commit 966420219cde98e72dd518e4f0005cb0c090a00d Author: Karel Zak Date: Fri Nov 20 11:21:41 2020 +0100 lib/caputils: split to multiple functions, add test Let's split the code to make it possible to test separately bsearch as well as procfs based cap_last_cap(). $ ./test_caputils --last-by-bsearch last cap: 39  $ ./test_caputils --last-by-procfs last cap: 39  $ ./test_caputils --last last cap: 39 Signed-off-by: Karel Zak lib/Makemodule.am | 7 +++- lib/caputils.c | 102 +++++++++++++++++++++++++++++++++++++++--------------- 2 files changed, 80 insertions(+), 29 deletions(-) commit 1b54a74e8622d18b3be53ca440928d96e73bac3d Author: Karel Zak Date: Fri Nov 20 10:38:01 2020 +0100 lib/procutils: improve proc_is_procfs(), add test * add delay between attempts * zeroize errno and check for EAGAIN (like in other code) * add small test program ./test_procutils --is-procfs [] Signed-off-by: Karel Zak lib/procutils.c | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) commit 61dc5ae39a3c72c01212e7d58b16a1321fc55e04 Merge: f42f105b0 5d9581875 Author: Karel Zak Date: Fri Nov 20 10:21:19 2020 +0100 Merge branch 'caps' of https://github.com/ericonr/util-linux * 'caps' of https://github.com/ericonr/util-linux: lib/caputils: add fall back for last cap using prctl. lib/procutils: add proc_is_procfs helper. commit f42f105b07b25097f6c2eae3d6a3ccbc452cda5e Author: Masayoshi Mizuma Date: Fri Nov 20 00:06:09 2020 -0500 lscpu: show the number of physical socket on aarch64 machine without ACPI PPTT Show the number of the number of physical socket even if the sysfs doesn't have the physical socket information. Note, lscpu shows the number of physical socket as 'Socket(s):' only if root user runs it because accessing the DMI table requires root privilege. Signed-off-by: Masayoshi Mizuma sys-utils/lscpu-arm.c | 2 ++ sys-utils/lscpu.c | 9 +++++++-- sys-utils/lscpu.h | 2 ++ 3 files changed, 11 insertions(+), 2 deletions(-) commit 788f90d69a43198e648442399967542e98e44d11 Author: Masayoshi Mizuma Date: Fri Nov 20 00:06:08 2020 -0500 lscpu: add helper to get physical sockets Add a helper function, get_number_of_physical_sockets_from_dmi(), to get physical sockets from DMI table in case of the sysfs for cpu topology doesn't have the physical socket information. get_number_of_physical_sockets_from_dmi() parse the DMI table and counts the number of SMBIOS Processor Information (Type04) structure. Signed-off-by: Masayoshi Mizuma sys-utils/lscpu-dmi.c | 29 +++++++++++++++++++++++++++++ sys-utils/lscpu.h | 2 ++ 2 files changed, 31 insertions(+) commit 3cd676f5ec9800e4eabafc578f31c292992d6396 Author: Masayoshi Mizuma Date: Fri Nov 20 00:06:07 2020 -0500 lscpu-dmi: Move some functions related to DMI to lscpu-dmi Move some functions related to DMI to lscpu-dmi. Signed-off-by: Masayoshi Mizuma sys-utils/Makemodule.am | 1 + sys-utils/lscpu-dmi.c | 79 +++++++++++++++++++++++++++++++++++++++++++++++++ sys-utils/lscpu-virt.c | 50 +------------------------------ sys-utils/lscpu.h | 28 ++++-------------- 4 files changed, 86 insertions(+), 72 deletions(-) commit b04ab8dd8a79bb0ce563e5957199fcafe5077e3f Author: Masayoshi Mizuma Date: Fri Nov 20 00:06:06 2020 -0500 lscpu-virt: split hypervisor_from_dmi_table() Split hypervisor_from_dmi_table() to parsing dmi table and checking the hypervisor vendor. Signed-off-by: Masayoshi Mizuma sys-utils/lscpu-virt.c | 54 +++++++++++++++++++++++++++++++------------------- sys-utils/lscpu.h | 6 ++++++ 2 files changed, 40 insertions(+), 20 deletions(-) commit 73c0a766ffbe60e013b55cfd716d531b5a6ae22a Author: Masayoshi Mizuma Date: Fri Nov 20 00:06:05 2020 -0500 lscpu: use cluster on aarch64 machine which doesn't have ACPI PPTT lscpu may show the wrong number of sockets if the machine is aarch64 and doesn't have ACPI PPTT. That's because lscpu shows the number of sockets by using a sysfs entry (cpu/cpuX/topology/core_siblings). The sysfs entry is set by MPIDR_EL1 register if the machine doesn't have ACPI PPTT. MPIDR_EL1 doesn't show the physical socket information directly. It shows the affinity level. According to linux/arch/arm64/kernel/topology.c:store_cpu_topology(), the top level of affinity is called as 'Cluster'. Use Cluster instead of Socket on the machine which doesn't have ACPI PPTT. This patch is useful for aarch64 machine which is based on ARM SBBR v1.0 and v1.1, the specs don't require ACPI PPTT. ARM SBBR v1.2 requires ACPI PPTT. Signed-off-by: Masayoshi Mizuma sys-utils/lscpu-arm.c | 13 +++++++++++++ sys-utils/lscpu.1 | 3 +++ sys-utils/lscpu.c | 34 ++++++++++++++++++++++++++++------ sys-utils/lscpu.h | 2 ++ 4 files changed, 46 insertions(+), 6 deletions(-) commit ffe8cabd1f13862a67ac4519832d2b45569d961d Author: Karel Zak Date: Thu Nov 19 12:04:08 2020 +0100 lib/signames: change license to public domain The file is simple list of signal names and trivial function to search in the list. We do not need any extra license here and as public domain it will be more portable to other tools (GPL and BSD) in the util-linux. All previous contributors (Sami, Niklas and me) agree with this change. Signed-off-by: Karel Zak lib/signames.c | 45 +++++++-------------------------------------- 1 file changed, 7 insertions(+), 38 deletions(-) commit 1c675ebee0300553bae2faa04c4796dec61b1ce1 Author: Karel Zak Date: Thu Nov 19 12:00:58 2020 +0100 lscpu: fix resource leak [coverity scan] Signed-off-by: Karel Zak sys-utils/lscpu-cputype.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit b9b28b641e4a0891fb0949d53ffe5b2f9a34e6a7 Author: Karel Zak Date: Thu Nov 19 11:57:19 2020 +0100 lscpu: fix possible null dereferences [coverity scan] Signed-off-by: Karel Zak sys-utils/lscpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 77a37084898d6df73783a53135a26b4c8b99bf15 Author: Karel Zak Date: Thu Nov 19 11:12:06 2020 +0100 umount: ignore --no-canonicalize,-c for non-root users It seems better to ignore this option than drop-permissions and later exit with EPERMs. This change makes umount(8) more compatible with fuser user umounts by systemd where -c is used to reduce overhead etc. Addresses: https://github.com/karelzak/util-linux/issues/1192 Signed-off-by: Karel Zak sys-utils/umount.8 | 4 ++++ sys-utils/umount.c | 11 ++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) commit 52f730e47869ce630fafb24fd46f755dc7ffc691 Author: Karel Zak Date: Thu Nov 19 09:49:16 2020 +0100 libmount: don't use "symfollow" for helpers on user mounts Addresses: https://github.com/karelzak/util-linux/issues/1193 Signed-off-by: Karel Zak libmount/src/context_mount.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5d95818757941bc609e5aeec5e2218f7d35a6e19 Author: Érico Rolim Date: Sun Nov 15 01:34:41 2020 -0300 lib/caputils: add fall back for last cap using prctl. This allows the rest of the programs using cap_last_cap to trust the value returned by it, since it will either be obtained from procfs (straight from kernel) or with prctl. Also checked if the file under /proc is actually mounted in a procfs. lib/caputils.c | 53 ++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 40 insertions(+), 13 deletions(-) commit e411b8a63d4a44ac191b5ca032c4639b12d4b838 Author: Érico Rolim Date: Wed Nov 18 14:07:10 2020 -0300 lib/procutils: add proc_is_procfs helper. Also add missing include in procutils.h for the definition of pid_t. include/procutils.h | 3 +++ lib/procutils.c | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+) commit 95b1f7c7767659741b0ef1474bb8895f007b356f Merge: 5547316c8 367972fae Author: Karel Zak Date: Wed Nov 18 10:32:39 2020 +0100 Merge branch 'hwclock-syscall-nr' of https://github.com/pinotree/util-linux * 'hwclock-syscall-nr' of https://github.com/pinotree/util-linux: hwclock: do not assume __NR_settimeofday_time32 commit 367972fae13d170675768d63678577cae1890143 Author: Pino Toscano Date: Tue Nov 17 11:32:45 2020 +0100 hwclock: do not assume __NR_settimeofday_time32 Check that __NR_settimeofday_time32 exists before trying to use it as syscall number. Signed-off-by: Pino Toscano sys-utils/hwclock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5547316c85cd45c0ea29c4c7c48eecd616783cd5 Author: Pino Toscano Date: Tue Nov 17 11:27:48 2020 +0100 build-sys: do not build plymouth-ctrl.c w/ disabled plymouth Do not build plymouth-ctrl.c in agetty and sulogin in case the plymouth support is disabled. Signed-off-by: Pino Toscano login-utils/Makemodule.am | 6 ++++-- term-utils/Makemodule.am | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) commit b3ea5aaa6477ff6a60781044d87541eea41abd12 Author: Érico Rolim Date: Sun Nov 15 11:53:39 2020 -0300 lscpu-virt: fix return type of read_hypervisor_cpuid for non x86. sys-utils/lscpu-virt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 13b26e3c36d110b4e372f93762e25fc40c94d9e0 Author: Sami Kerola Date: Wed Nov 11 21:10:32 2020 +0000 fdformat: remove command from default build It should be safe assumption a command related to floppy disks does not need to be part of default build. Notice that the reference commit removed floppy driver from linux about year ago. Virtual floppies might exist they should not need low-level formatting. But if someone really needs this enabling the build in that case is better than pushing the binary by default to many many systems that install util-linux. Reference: https://github.com/torvalds/linux/commit/47d6a7607443ea43dbc4d0f371bf773540a8f8f4 Signed-off-by: Sami Kerola configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 32a4efc5675ca238d382a0027f7f4723b8b3af28 Author: Sami Kerola Date: Wed Nov 11 20:41:17 2020 +0000 more: improve error messaging when input file is directory Before this change the error message about directory was not informative, and a little bit out of place. $ touch empty ; ./more ./empty / :::::::::::::: ./empty :::::::::::::: magic failed: cannot read fd 4 (Is a directory) :::::::::::::: / :::::::::::::: After the change messaging is reverted back to what it used to be. $ ./more ./empty / :::::::::::::: ./empty :::::::::::::: *** /: directory *** And while on it lets remove repeated fstat() call. Fixes: 09070e1a658e70ec203150e4fa5f486b32771858 Signed-off-by: Sami Kerola text-utils/more.c | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) commit 792ff9fcee1bad2b8a43e83f921aa01d96cd3188 Author: Sami Kerola Date: Wed Oct 21 21:17:51 2020 +0100 ul: make set_column() zero check more obvious Signed-off-by: Sami Kerola text-utils/ul.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c7ad82209a3f8d1f2b14c17a95655f83b5a9e885 Author: Sami Kerola Date: Mon Oct 19 21:57:04 2020 +0100 colrm: fix argument parsing Short options had all sortss of characters listed, that were clearly copied from col(1) command getopt_long() invocation. Luckily both -V and -h were part of the short options, but lets get rid of the unnecessary ones. Fixes: 1647d032a7bfcba36d3dabe627b858b372210d05 Signed-off-by: Sami Kerola text-utils/colrm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 06229abccf69cfc01d2ba05331832850130ee75b Author: Sami Kerola Date: Fri Oct 23 20:39:24 2020 +0100 rfkill: stop execution when rfkill device cannot be opened Without this two error messages are printed when rfkill device cannot be opened. $ rfkill rfkill: cannot open /dev/rfkill: No such file or directory rfkill: cannot read /dev/rfkill: Bad file descriptor Signed-off-by: Sami Kerola sys-utils/rfkill.c | 4 ++++ 1 file changed, 4 insertions(+) commit a371c3f71e5ab4fcaab52bd7a02f00539cf56e40 Author: Sami Kerola Date: Tue Sep 1 20:23:36 2020 +0100 cifuzz: reindent yaml file Fixex two yamllint indentation warning, the truthy is false positive. util-linux $ yamllint ./.github/workflows/cifuzz.yml 6:1 warning truthy value should be one of [false, true] (truthy) 14:2 error wrong indentation: expected 2 but found 1 (indentation) 22:4 error wrong indentation: expected 5 but found 3 (indentation) Reference: https://github.com/adrienverge/yamllint Signed-off-by: Sami Kerola .github/workflows/cifuzz.yml | 58 ++++++++++++++++++++++---------------------- 1 file changed, 29 insertions(+), 29 deletions(-) commit 3ea54b843cb63738404a475f43cfc461aa9b57f3 Author: Sami Kerola Date: Sun Aug 30 20:02:50 2020 +0100 man: make tilde and caret characters to render correctly As mentioned in 'Generating optimal glyphs' title in the manual page mentioned in reference: Where a proper caret (^) that renders well in both a terminal and PDF is required, use "\(ha". Using a naked "~" character results in a poor rendering in PDF. Instead use "\(ti". Reference: https://man7.org/linux/man-pages/man7/man-pages.7.html#STYLE_GUIDE Signed-off-by: Sami Kerola disk-utils/fdisk.8 | 2 +- disk-utils/sfdisk.8 | 8 ++++---- lib/terminal-colors.d.5 | 2 +- login-utils/login.1 | 2 +- misc-utils/blkid.8 | 4 ++-- misc-utils/hardlink.1 | 2 +- misc-utils/wipefs.8 | 6 +++--- sys-utils/losetup.8 | 4 ++-- sys-utils/mount.8 | 6 +++--- sys-utils/readprofile.8 | 2 +- text-utils/more.1 | 10 +++++----- text-utils/pg.1 | 6 +++--- 12 files changed, 27 insertions(+), 27 deletions(-) commit d4cb6a0335d328b7653f2456b90e8101eb00e69b Author: Karel Zak Date: Fri Nov 13 10:20:33 2020 +0100 lscpu: fix memory leaks Signed-off-by: Karel Zak sys-utils/lscpu-cpu.c | 1 + sys-utils/lscpu-cputype.c | 2 ++ sys-utils/lscpu.c | 1 + 3 files changed, 4 insertions(+) commit 8014104bea78f6f82cb82e16329b562e60ecdc87 Author: Masayoshi Mizuma Date: Fri Nov 13 10:06:26 2020 +0100 lscpu-arm: Add "BIOS Vendor ID" and "BIOS Model name" to show the SMBIOS information. After commit: 367c85c47 ("lscpu: use SMBIOS tables on ARM for lscpu"), Model name for A64FX shows like as: Model name: 461F0010 That's because 367c85c47 changes to get the modelname from Processor Version of SMBIOS. To fix that, use the hard corded table to show the "Model name" and add two new lines; "BIOS Vendor ID" and "BIOS Model name" to show the SMBIOS information. lscpu shows the SMBIOS information when root user runs it because accessing the SMBIOS information requires root privilege. [kzak@redhat.com: - port the patch to new lscpu code] Signed-off-by: Masayoshi Mizuma Signed-off-by: Karel Zak sys-utils/lscpu-arm.c | 19 +++++++------------ sys-utils/lscpu.c | 20 +++++++++----------- sys-utils/lscpu.h | 2 ++ 3 files changed, 18 insertions(+), 23 deletions(-) commit dbc27723057544f56e70a9c84202dc7053518556 Author: Jeremy Linton Date: Tue Nov 10 10:05:04 2020 -0600 lscpu: Even more Arm part numbers Over the past two years Arm has published further MIDR/part numbers on https://developer.arm.com/ip-products/processors/cortex-a. Lets sync the arm_part structure for A65, A76AE, A77 and A78*. Signed-off-by: Jeremy Linton sys-utils/lscpu-arm.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 76b6666c0ea2f37a22d1705f01a6bfab197b897d Author: Karel Zak Date: Tue Nov 10 13:22:53 2020 +0100 lscpu: (arm) reuse parsed vendor ID Signed-off-by: Karel Zak sys-utils/lscpu-arm.c | 9 ++++++++- sys-utils/lscpu.h | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) commit 10b71aede2fc59f8d73a21b62986f467eeb96aa4 Author: Karel Zak Date: Tue Nov 10 13:09:21 2020 +0100 lscpu: remove unused code lscpu-dmi.c is no more used by new lscpu code. Signed-off-by: Karel Zak sys-utils/lscpu-dmi.c | 273 -------------------------------------------------- 1 file changed, 273 deletions(-) commit 60e7ccb8e8ae6c843939d4bdcf90d715ea18886e Author: Karel Zak Date: Tue Nov 3 12:22:20 2020 +0100 lscpu: Adapt MIPS cpuinfo Port commit commit 6cb8af7be2d76cfd9201f141fa2d69fa2ed32deb Author: Jiaxun Yang Date: Sat Mar 28 12:19:42 2020 +0800 to new lscpu code. References: 6cb8af7be2d76cfd9201f141fa2d69fa2ed32deb Signed-off-by: Karel Zak sys-utils/lscpu-cputype.c | 2 ++ 1 file changed, 2 insertions(+) commit ddc92e39930598e6db8d7556ed458564b16a51a5 Author: Karel Zak Date: Tue Nov 3 12:10:35 2020 +0100 lscpu: add shared cached info for s390 lscpu -C Port commit commit 318542e060ff68e012bea7ee498f12a6ce7e5593 Author: Sumanth Korikkar Date: Fri Jun 5 18:15:10 2020 +0200 to new lscpu code. References: 318542e060ff68e012bea7ee498f12a6ce7e5593 Signed-off-by: Karel Zak sys-utils/lscpu-cputype.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit 80fcd2c802b5ae572bc844c996891c9d00bef080 Author: Thomas Abraham Date: Thu Sep 24 14:52:33 2020 -0400 lscpu: avoid segfault on PowerPC systems with valid hardware configurations ntypes greater than 1 is valid in some hardware configurations, and an assert() on the value isn't necessary or very future proof [kzak@redhat.com: - port this patch to new code] Signed-off-by: Karel Zak sys-utils/lscpu-cputype.c | 1 - 1 file changed, 1 deletion(-) commit 3e35c9017053bc76442e856740e1383f7328ebfe Author: Karel Zak Date: Tue Nov 3 11:49:28 2020 +0100 lscpu: update tests * cpu MHz is per-CPU value and not printed in summary anymore * topology is reordered * number of NUMA nodes is moved to NUMA section * parsable output uses cache ID from kernel if avalable Signed-off-by: Karel Zak tests/expected/lscpu/lscpu-armv7 | 10 +- tests/expected/lscpu/lscpu-ppc-qemu | 8 +- tests/expected/lscpu/lscpu-ppc64-POWER7 | 10 +- tests/expected/lscpu/lscpu-ppc64-POWER7-64cpu | 10 +- tests/expected/lscpu/lscpu-s390-kvm | 12 +- tests/expected/lscpu/lscpu-s390-lpar | 12 +- tests/expected/lscpu/lscpu-s390-lpar-drawer | 14 +- tests/expected/lscpu/lscpu-s390-nested-virt | 14 +- tests/expected/lscpu/lscpu-s390-zvm | 12 +- tests/expected/lscpu/lscpu-sparc64 | 6 +- tests/expected/lscpu/lscpu-vbox-win | 30 +- tests/expected/lscpu/lscpu-vmware_fpe | 83 +++--- tests/expected/lscpu/lscpu-x86_64-64cpu | 17 +- tests/expected/lscpu/lscpu-x86_64-dell_e4310 | 17 +- tests/expected/lscpu/lscpu-x86_64-epyc_7451 | 377 +++++++++++++------------- 15 files changed, 313 insertions(+), 319 deletions(-) commit 05b9c556f688eb7f2dc982e9088e778c6eea5f49 Author: Karel Zak Date: Tue Nov 3 11:39:58 2020 +0100 lscpu: fix MHZ parsing Signed-off-by: Karel Zak sys-utils/lscpu-cputype.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit cc94324ebd5edf197342144a42fbf5308b250fbc Author: Karel Zak Date: Tue Nov 3 11:13:26 2020 +0100 lscpu: improve bogomips use * keep global (cputype) bogomips * add per-CPU bogomips * use bogomips from the first CPU as global (for cputype) if /proc/cpuinfo does not provide global bogomips * add BOGOMIPS column for to -e/-p output Signed-off-by: Karel Zak sys-utils/lscpu-cputype.c | 17 ++++++++++------- sys-utils/lscpu.c | 8 ++++++++ sys-utils/lscpu.h | 1 + 3 files changed, 19 insertions(+), 7 deletions(-) commit 6321d34f0f929d640a8fff26a911c7db077dfe24 Author: Karel Zak Date: Tue Nov 3 10:39:04 2020 +0100 lscpu: add note about cache IDs We read the ID from /sys/devices/system/cpu/cpu*/cache/index*/id. Signed-off-by: Karel Zak sys-utils/lscpu.1 | 3 ++- sys-utils/lscpu.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) commit 6d880d3d460152b24b471d4bc5fe708c6219bb89 Author: Karel Zak Date: Tue Nov 3 10:27:46 2020 +0100 lscpu: add MHZ column Signed-off-by: Karel Zak sys-utils/lscpu.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 7155a57d34f5ec53e2eb80e6b0c0f82def99e799 Author: Karel Zak Date: Tue Nov 3 10:13:27 2020 +0100 lscpu: don't use section for extra caches Signed-off-by: Karel Zak sys-utils/lscpu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d4228e9de266b6fb9e5aa969626187f01d57384c Author: Karel Zak Date: Tue Nov 3 09:48:21 2020 +0100 lscpu: fix for sparc64 We do not read CPUs from cpuinfo on sparc. Signed-off-by: Karel Zak sys-utils/lscpu-cputype.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 19ddc05e110b547c2406e58045e6fc0b8fe626c7 Author: Karel Zak Date: Tue Nov 3 09:46:45 2020 +0100 lscpu: improve topology calculation Let's make it more robust and readable. The sysinfo file on s390 may contain zeros, so we need to check the values and fallback to data from shared maps if necessary. Signed-off-by: Karel Zak sys-utils/lscpu-topology.c | 23 ++++++----------------- sys-utils/lscpu.c | 9 +++++---- 2 files changed, 11 insertions(+), 21 deletions(-) commit 6648a70eb2af821c768594be68c75ec01562af40 Author: Karel Zak Date: Tue Nov 3 09:44:22 2020 +0100 lscpu: assume gaps in list of CPUs Signed-off-by: Karel Zak sys-utils/lscpu-cpu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e07cca6b8595224578376d3f0be25df663a47274 Author: Karel Zak Date: Mon Nov 2 10:34:53 2020 +0100 lscpu: fix last caches separator in -e and -p output Note that cxt->ncaches is number of all instances, but we split output according to split output according to caches names. Signed-off-by: Karel Zak sys-utils/lscpu.c | 28 ++++++++++++++-------------- sys-utils/lscpu.h | 1 - 2 files changed, 14 insertions(+), 15 deletions(-) commit ada1a387b110cc6744dcc5f32cbd9fca3304ed79 Author: Karel Zak Date: Mon Nov 2 10:11:46 2020 +0100 lscpu: generate cache ID if not available The file /sys/devices/system/cpu/cpu*/cache/index*/id is not available in old kernels. This patch add code to generate IDs according to cache type and level. Signed-off-by: Karel Zak sys-utils/lscpu-topology.c | 40 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 36 insertions(+), 4 deletions(-) commit 0710bb133f6a6bd393d5aea3971dac070784cad2 Author: Karel Zak Date: Fri Oct 30 10:43:17 2020 +0100 lscpu: cleanup --parse Signed-off-by: Karel Zak sys-utils/lscpu.c | 47 ++++++++++++++++++----------------------------- 1 file changed, 18 insertions(+), 29 deletions(-) commit 63c5e7f8018843e997efd552df5f235dd730f64e Author: Karel Zak Date: Fri Oct 30 10:12:14 2020 +0100 lscpu: cleanup -e * keep one sharedmap per cache instance * initialize topology IDs to -1 * rewrite -e code to use a new data structs Signed-off-by: Karel Zak sys-utils/lscpu-cpu.c | 6 + sys-utils/lscpu-cputype.c | 3 + sys-utils/lscpu-topology.c | 38 ++++-- sys-utils/lscpu.c | 315 ++++++++++++++++++++++----------------------- sys-utils/lscpu.h | 14 +- 5 files changed, 202 insertions(+), 174 deletions(-) commit 9d480e578aa49b0cf25c79837fbe00ad51ddd207 Author: Karel Zak Date: Thu Oct 29 09:54:44 2020 +0100 lscpu: add extra caches to --cache output Signed-off-by: Karel Zak sys-utils/lscpu.c | 159 +++++++++++++++++++++++++++++++----------------------- 1 file changed, 91 insertions(+), 68 deletions(-) commit 1766641a1b2693fff5aa65c953dc169f1db11f7b Author: Karel Zak Date: Tue Oct 27 12:43:37 2020 +0100 lscpu: cleanup --cache Signed-off-by: Karel Zak sys-utils/lscpu.c | 181 +++++++++++++++++++++++++----------------------------- 1 file changed, 84 insertions(+), 97 deletions(-) commit 91eef60ca33e1fb0a7be36a5c2a67f1a650feba7 Author: Karel Zak Date: Tue Oct 27 11:18:49 2020 +0100 lscpu: split output to sections Let's make it more readable for humans. Signed-off-by: Karel Zak sys-utils/lscpu-cputype.c | 2 + sys-utils/lscpu-virt.c | 5 ++ sys-utils/lscpu.1 | 10 +-- sys-utils/lscpu.c | 172 ++++++++++++++++++++++++++++------------------ 4 files changed, 117 insertions(+), 72 deletions(-) commit e3f213184a75e88182bac22156928b7539e64d68 Author: Karel Zak Date: Mon Sep 14 10:49:07 2020 +0200 lscpu: add sections Signed-off-by: Karel Zak sys-utils/lscpu.c | 74 +++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 47 insertions(+), 27 deletions(-) commit 01bea871ddac4bde9a0cebecc0b0308ce5ddfc26 Author: Karel Zak Date: Fri Sep 4 11:37:21 2020 +0200 lscpu: add rest of summary Signed-off-by: Karel Zak sys-utils/lscpu.c | 109 +++++++++++++++++++++++++++++++----------------------- 1 file changed, 62 insertions(+), 47 deletions(-) commit 778254d9a22a7303820baaa3b10cd144fd907a6f Author: Karel Zak Date: Fri Sep 4 11:27:33 2020 +0200 lscpu: keep static/dynamic MHz in cputype struct The Dynamic and Static MHz are /proc/cpuinfo s390 per-CPU fields, but we display it as a single value according the first parsed CPU. For this purpose we store the values from the first CPU in lscpu_cputype. For -p and -e outputs we will print per CPU values. Signed-off-by: Karel Zak sys-utils/lscpu-cputype.c | 7 +++++++ sys-utils/lscpu.h | 5 ++++- 2 files changed, 11 insertions(+), 1 deletion(-) commit 93a1bb1009fda38b7ea998d80275d22ff595dfd0 Author: Karel Zak Date: Thu Sep 3 16:32:37 2020 +0200 lscpu: add another part of summary output Signed-off-by: Karel Zak sys-utils/lscpu.c | 191 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 100 insertions(+), 91 deletions(-) commit 6d5699e6b567ad83a0fd16c9b44864ec24f24c28 Author: Karel Zak Date: Thu Sep 3 16:31:59 2020 +0200 lscpu: add functions to get CPU freq Signed-off-by: Karel Zak sys-utils/lscpu-topology.c | 35 +++++++++++++++++++++++++++++++++++ sys-utils/lscpu.h | 5 +++++ 2 files changed, 40 insertions(+) commit 406b088cb422e36f920a1a976ddccd7a9d5a900c Author: Karel Zak Date: Thu Sep 3 13:00:11 2020 +0200 lscpu: fix NUMAs reading code Signed-off-by: Karel Zak sys-utils/lscpu-cputype.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 2f5e2730fe282776d0f7a9ecfceea77501e15fc5 Author: Karel Zak Date: Mon Aug 31 16:05:39 2020 +0200 lscpu: add per type summary function Signed-off-by: Karel Zak sys-utils/lscpu.c | 257 ++++++++++++++++++++++++------------------------------ 1 file changed, 114 insertions(+), 143 deletions(-) commit db919abc1373eeca858e9177a4dab37219d98cfb Author: Karel Zak Date: Mon Aug 31 16:05:18 2020 +0200 lscpu: use size_t for counters Signed-off-by: Karel Zak sys-utils/lscpu-topology.c | 16 ++++++++-------- sys-utils/lscpu.h | 26 +++++++++++++------------- 2 files changed, 21 insertions(+), 21 deletions(-) commit d8813bb37895c04d4203068cc31b5554f77c3dba Author: Karel Zak Date: Fri Aug 28 12:55:01 2020 +0200 lscpu: print generic part of the summary Signed-off-by: Karel Zak sys-utils/lscpu.c | 91 ++++++++++++++++++++++++++++++------------------------- 1 file changed, 49 insertions(+), 42 deletions(-) commit eaf32c65bed3dcff0e59cc7386856f94e417aaa9 Author: Karel Zak Date: Fri Aug 21 12:21:43 2020 +0200 lscpu: add setsize to lscpu context Don't recalculate again and again setsize from maxcpus. Signed-off-by: Karel Zak sys-utils/lscpu-cputype.c | 17 +++++++---------- sys-utils/lscpu-topology.c | 19 ++++++++----------- sys-utils/lscpu.h | 9 +++++++++ 3 files changed, 24 insertions(+), 21 deletions(-) commit 05abf5944e8b21dc7cab5a261d23a84cb0af4972 Author: Karel Zak Date: Fri Aug 21 10:34:28 2020 +0200 lscpu: add function to count caches size Signed-off-by: Karel Zak sys-utils/lscpu-topology.c | 18 +++++++++++++++++- sys-utils/lscpu.c | 26 -------------------------- sys-utils/lscpu.h | 4 +++- 3 files changed, 20 insertions(+), 28 deletions(-) commit 6fbb53286d8d29d38185d65e5bc429c092142a48 Author: Karel Zak Date: Thu Aug 20 12:28:52 2020 +0200 lscpu: use cache ID, keep caches independent on CPU type The cache is identified by Type, Level and ID, the ID is unique cache instance identifier (of the type). This changes forces lscpu allocate more lscpu_cache instances (than old version), but now we're ready for arbitrary scenario where different CPU types share caches and the same cache type uses different size in different instances, etc. Signed-off-by: Karel Zak sys-utils/lscpu-topology.c | 127 +++++++++++++++++++++++++-------------------- sys-utils/lscpu.c | 2 + sys-utils/lscpu.h | 6 +-- 3 files changed, 77 insertions(+), 58 deletions(-) commit 4b9cbc38a4e0b393ea73b7756bd2d4043edd5638 Author: Karel Zak Date: Wed Aug 19 15:43:55 2020 +0200 lscpu: use new code to read CPUs info and remove test program from lscpu-cputype.c. Signed-off-by: Karel Zak sys-utils/lscpu-cputype.c | 35 ----------------------------- sys-utils/lscpu.c | 56 ++++++++++------------------------------------- 2 files changed, 12 insertions(+), 79 deletions(-) commit b73d38b1d1f78fafa536eaad8ae0def3666e8cab Author: Karel Zak Date: Wed Aug 19 15:20:02 2020 +0200 lscpu: convert getopt block to new API Signed-off-by: Karel Zak sys-utils/lscpu.c | 55 +++++++++++++++++++++++++------------------------------ 1 file changed, 25 insertions(+), 30 deletions(-) commit 30b912d335d7cef005a5d37d6097f8af7b9233c4 Author: Karel Zak Date: Wed Aug 19 15:10:38 2020 +0200 lscpu: add LSCPU_OUTPUT_ enum Signed-off-by: Karel Zak sys-utils/lscpu.c | 26 +++++++++++++------------- sys-utils/lscpu.h | 18 +++++++++++++++++- 2 files changed, 30 insertions(+), 14 deletions(-) commit 27c349f9d11c1e9e5274760c0b4bb39ef5e54c65 Author: Karel Zak Date: Wed Aug 19 13:08:44 2020 +0200 lscpu: move to main function to init context Signed-off-by: Karel Zak sys-utils/lscpu-cputype.c | 74 ------------------------------------------- sys-utils/lscpu.c | 80 ++++++++++++++++++++++++++++++++++++++++++++++- sys-utils/lscpu.h | 3 -- 3 files changed, 79 insertions(+), 78 deletions(-) commit 43715b4ea8599daaf4ad91b5792b5c0b16c09330 Author: Karel Zak Date: Wed Aug 19 13:01:37 2020 +0200 lscpu: move debug initialization to main Signed-off-by: Karel Zak sys-utils/lscpu-cputype.c | 8 -------- sys-utils/lscpu.c | 12 ++++++++++++ 2 files changed, 12 insertions(+), 8 deletions(-) commit 095be2c20ed3d1ee3048e4051e1ba92835f2cc98 Author: Karel Zak Date: Wed Aug 19 12:56:22 2020 +0200 lscpu: merge new API to lscpu.h Signed-off-by: Karel Zak sys-utils/Makemodule.am | 2 +- sys-utils/lscpu-api.h | 294 --------------------------------------------- sys-utils/lscpu-arm.c | 2 +- sys-utils/lscpu-cpu.c | 2 +- sys-utils/lscpu-cputype.c | 2 +- sys-utils/lscpu-topology.c | 2 +- sys-utils/lscpu-virt.c | 2 +- sys-utils/lscpu.c | 1 - sys-utils/lscpu.h | 290 ++++++++++++++++++++++++++++++++++++++++---- 9 files changed, 271 insertions(+), 326 deletions(-) commit 7454b598e404a35ea4cb6adf901e5b783df09391 Author: Karel Zak Date: Wed Aug 19 12:53:01 2020 +0200 lscpu: use constants from new API Signed-off-by: Karel Zak sys-utils/lscpu.c | 59 +++++++++++++++++++------------------------------------ 1 file changed, 20 insertions(+), 39 deletions(-) commit f9ac02103265ad831fabb4f15b71168396d7a959 Author: Karel Zak Date: Wed Aug 19 12:43:48 2020 +0200 lscpu: remove obsolete code This is the first step in conversion from old lscpu to the new code. The patch removes obsolete code from lscpu.c and lscpu.h. The old output code in lscpu.c is temporary disabled by #ifdef due to incompatibility between old and new internal APIs -- this will be changed later by small steps to make all all the changes review-able. Signed-off-by: Karel Zak sys-utils/Makemodule.am | 22 +- sys-utils/lscpu.c | 1279 +---------------------------------------------- sys-utils/lscpu.h | 200 -------- 3 files changed, 18 insertions(+), 1483 deletions(-) commit 3d590f8ea1f97c1e5f3005c7e249e0ca57c4da56 Author: Karel Zak Date: Wed Aug 19 11:40:59 2020 +0200 lscpu: (virt) add macros for VMWARE Signed-off-by: Karel Zak sys-utils/lscpu-virt.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit eadaf6d75854e32ebe4a46cdd318c7477a7d1ba4 Author: Karel Zak Date: Tue Aug 18 12:48:41 2020 +0200 lscpu: (topology) read caches from /sys Signed-off-by: Karel Zak sys-utils/lscpu-api.h | 46 +++++++------- sys-utils/lscpu-cputype.c | 35 +---------- sys-utils/lscpu-topology.c | 149 ++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 174 insertions(+), 56 deletions(-) commit e36e01f980f1a9c6944a138e974848fac9cb3206 Author: Karel Zak Date: Mon Aug 17 15:01:54 2020 +0200 lscpu: sort extra caches Signed-off-by: Karel Zak sys-utils/lscpu-cputype.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit ff7449d2ea68ec79f94230a4e092ea274ce14a3f Author: Karel Zak Date: Mon Aug 17 14:57:22 2020 +0200 lscpu: improve debug message Signed-off-by: Karel Zak sys-utils/lscpu-cputype.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ffb7fcfbba45bd079be698bb9271c85966a1b461 Author: Karel Zak Date: Mon Aug 17 14:54:40 2020 +0200 lscpu: remove unused function Signed-off-by: Karel Zak sys-utils/lscpu-cputype.c | 26 -------------------------- 1 file changed, 26 deletions(-) commit 25c2a72cd62c17bf05baeb104424ac68179d8179 Author: Karel Zak Date: Mon Aug 17 14:52:49 2020 +0200 lscpu; (cpuinfo) parse caches Signed-off-by: Karel Zak sys-utils/lscpu-api.h | 25 +++++++++ sys-utils/lscpu-cputype.c | 126 +++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 145 insertions(+), 6 deletions(-) commit 9d08a19d5452c51e175a0e7403d0900fa8bc55a2 Author: Karel Zak Date: Fri Aug 14 12:30:18 2020 +0200 lscpu: (topology) add read_mhz() Signed-off-by: Karel Zak sys-utils/lscpu-api.h | 8 +++++--- sys-utils/lscpu-topology.c | 15 +++++++++++++++ 2 files changed, 20 insertions(+), 3 deletions(-) commit 8c587fad9f9d19758b7ade69ef25e63d99cdba16 Author: Karel Zak Date: Fri Aug 14 12:13:38 2020 +0200 lscpu: (topology) add read_configure() Signed-off-by: Karel Zak sys-utils/lscpu-api.h | 2 +- sys-utils/lscpu-topology.c | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) commit 6d1a2705f7eec178a2826188b47031c42800059f Author: Karel Zak Date: Fri Aug 14 12:10:26 2020 +0200 lscpu: (topology) add read_address() Signed-off-by: Karel Zak sys-utils/lscpu-api.h | 3 +-- sys-utils/lscpu-topology.c | 18 ++++++++++++++++-- 2 files changed, 17 insertions(+), 4 deletions(-) commit 2075eb60b5895688bb51452b08a67a64a6eeb5fa Author: Karel Zak Date: Fri Aug 14 12:07:18 2020 +0200 lscpu: hide all to lscpu_read_topology() Signed-off-by: Karel Zak sys-utils/lscpu-api.h | 2 - sys-utils/lscpu-cputype.c | 2 - sys-utils/lscpu-topology.c | 98 ++++++++++++++++++++++------------------------ 3 files changed, 47 insertions(+), 55 deletions(-) commit 9aa82cd7e62f0da65f371fc88e342689ebf203ae Author: Karel Zak Date: Tue Jul 21 12:17:32 2020 +0200 lscpu: (virt) simplify hypervisor parsing Signed-off-by: Karel Zak sys-utils/lscpu-virt.c | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) commit 5d68f974b42f0f4e414cbd491d7726820b13e3af Author: Karel Zak Date: Tue Jul 21 12:16:40 2020 +0200 lib/strutils: add normalize_whitespace() This function removes extra whitespace. Signed-off-by: Karel Zak include/strutils.h | 27 +++++++++++++++++++++++++++ lib/strutils.c | 32 ++++++++++++++++++++++++++++---- 2 files changed, 55 insertions(+), 4 deletions(-) commit ee0fabda3039b934b14c9154e856fb79bc9f42e5 Author: Karel Zak Date: Mon Jul 20 22:05:43 2020 +0200 lscpu: (cpuinfo) rewrite parser Signed-off-by: Karel Zak sys-utils/lscpu-cpu.c | 6 ++ sys-utils/lscpu-cputype.c | 137 ++++++++++++++------------------------------- sys-utils/lscpu-topology.c | 5 +- 3 files changed, 53 insertions(+), 95 deletions(-) commit f495abb799c4405afbcd24a2907bd118fd38f50d Author: Karel Zak Date: Mon Jul 20 15:43:33 2020 +0200 lscpu: (cpuinfo) fill empty cputype Don't introduce a new CPU-type if the current is empty. Signed-off-by: Karel Zak sys-utils/lscpu-cputype.c | 57 +++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 50 insertions(+), 7 deletions(-) commit f5d13532460d0cb2be632057b76d32cd2594d3e0 Author: Karel Zak Date: Fri Jul 17 16:21:04 2020 +0200 lscpu: new cpuinfo parser * extendable by new patterns * simple semantic * the same code for all pattern types Signed-off-by: Karel Zak sys-utils/lscpu-api.h | 3 - sys-utils/lscpu-cpu.c | 29 +---- sys-utils/lscpu-cputype.c | 301 ++++++++++++++++++++++++---------------------- 3 files changed, 163 insertions(+), 170 deletions(-) commit 021d0b3d1dc5871eaa265f13e06e8b8ee2f0b088 Author: Karel Zak Date: Fri Jul 17 16:15:02 2020 +0200 lscpu: keep hypervisor name in allocated memory Signed-off-by: Karel Zak sys-utils/lscpu-virt.c | 2 ++ 1 file changed, 2 insertions(+) commit 801b125f8f9c29bef4715ba3def84b63d6ca4ddd Author: Karel Zak Date: Fri Jul 17 10:39:05 2020 +0200 lscpu: temporary commit Signed-off-by: Karel Zak sys-utils/lscpu-api.h | 26 ++++----------- sys-utils/lscpu-cpu.c | 68 ++++++++++++++++++++++++-------------- sys-utils/lscpu-cputype.c | 82 ++++++++++++++++++++-------------------------- sys-utils/lscpu-topology.c | 26 +++++++++------ 4 files changed, 101 insertions(+), 101 deletions(-) commit 6baa4df7ec2ddb8c07402b55202500f98432128f Author: Karel Zak Date: Thu Jul 16 14:58:37 2020 +0200 lscpu: improve topology calculation, use /proc/sysinfo Signed-off-by: Karel Zak sys-utils/lscpu-api.h | 8 +++++- sys-utils/lscpu-topology.c | 64 ++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 61 insertions(+), 11 deletions(-) commit fd5999d9ac50ff56264fc0d593ead5a214032f53 Author: Karel Zak Date: Thu Jul 16 13:27:13 2020 +0200 lscpu: support s390 cpuinfo processor-pre-line format Signed-off-by: Karel Zak sys-utils/lscpu-cputype.c | 72 ++++++++++++++++++++++++++++++++++++++++------ sys-utils/lscpu-topology.c | 2 +- 2 files changed, 64 insertions(+), 10 deletions(-) commit fd35a1dae62f5232cab5fba5bbe1fbef5a92d777 Author: Karel Zak Date: Thu Jul 16 12:41:35 2020 +0200 lsblk: add lscpu_read_topology_polarization() Signed-off-by: Karel Zak sys-utils/lscpu-api.h | 22 ++++++++++++++++++++-- sys-utils/lscpu-cputype.c | 14 +++++++++++--- sys-utils/lscpu-topology.c | 34 +++++++++++++++++++++++++++++++++- 3 files changed, 64 insertions(+), 6 deletions(-) commit f669523ba023343b7e50342782cf17a3b638d504 Author: Karel Zak Date: Thu Jul 16 11:32:18 2020 +0200 lscpu: move topology stuff to separate file Signed-off-by: Karel Zak sys-utils/Makemodule.am | 1 + sys-utils/lscpu-api.h | 4 +- sys-utils/lscpu-cpu.c | 28 ------- sys-utils/lscpu-cputype.c | 139 +---------------------------------- sys-utils/lscpu-topology.c | 177 +++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 183 insertions(+), 166 deletions(-) commit 0266f5cbab96104b92a0ead571c1b45ec5b44c3e Author: Karel Zak Date: Thu Jul 16 11:13:09 2020 +0200 lscpu: improve topology debug message Signed-off-by: Karel Zak sys-utils/lscpu-cputype.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit fa6a21bf63c4d3e09111c472063eb1da6d6a3725 Author: Karel Zak Date: Thu Jul 16 10:51:14 2020 +0200 lscpu: calculate threads number from type specific values Don't use global CPU masks (like "online" or "present") to calculate type specific number of threads due systems with mixed CPU types. It's also necessary to check all thread_siblings maps to get the highest number, because some threads (CPUs) may be disables, for example old lscpu calculates number of threads from the cpu0 and if you disable cpu0's sibling (cpu4): CPU(s): 8 On-line CPU(s) list: 0-7 Thread(s) per core: 2 <--- Core(s) per socket: 4 Socket(s): 1 # chcpu --disable 4 CPU 4 disabled CPU(s): 8 On-line CPU(s) list: 0-3,5-7 Off-line CPU(s) list: 4 Thread(s) per core: 1 <--- ! Core(s) per socket: 4 Socket(s): 1 because 'thread_siblings' contains only one thread for cpu0: # cat /sys/devices/system/cpu/cpu{0,1,2,3,4,5,6,7}/topology/thread_siblings_list 0 1,5 2,6 3,7 cat: /sys/devices/system/cpu/cpu4/topology/thread_siblings_list: No such file or directory 1,5 2,6 3,7 Signed-off-by: Karel Zak sys-utils/lscpu-cputype.c | 47 ++++++++++++----------------------------------- 1 file changed, 12 insertions(+), 35 deletions(-) commit b8a319460dba9c62c7f92044915498da8d7827e3 Author: Karel Zak Date: Wed Jul 15 18:05:15 2020 +0200 lscpu: deallocate maps Signed-off-by: Karel Zak sys-utils/lscpu-cpu.c | 3 +++ sys-utils/lscpu-cputype.c | 34 +++++++++++++++++++++++++++------- 2 files changed, 30 insertions(+), 7 deletions(-) commit 314aa95fd51ffb2bc72ad64fe41f85d4b8f82386 Author: Karel Zak Date: Wed Jul 15 16:25:15 2020 +0200 lscpu: add lscpu_read_topolgy_ids() Signed-off-by: Karel Zak sys-utils/lscpu-api.h | 1 + sys-utils/lscpu-cpu.c | 25 +++++++++++++++++++------ sys-utils/lscpu-cputype.c | 11 ++++++----- 3 files changed, 26 insertions(+), 11 deletions(-) commit 9d5f3b4873e0da8eb69ffe8fd02747a7ff9b9fc5 Author: Karel Zak Date: Wed Jul 15 16:21:26 2020 +0200 lscpu: add lscpu_read_topology() Signed-off-by: Karel Zak sys-utils/lscpu-api.h | 25 +++++++-- sys-utils/lscpu-cputype.c | 137 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 157 insertions(+), 5 deletions(-) commit 9c5b106b01da6ec5f5d6de77a9497ad9842c8833 Author: Karel Zak Date: Wed Jul 15 13:07:15 2020 +0200 lscpu: add lscpu_cpus_loopup_by_type(), improve readability Signed-off-by: Karel Zak sys-utils/lscpu-api.h | 3 ++- sys-utils/lscpu-cpu.c | 13 +++++++++++++ sys-utils/lscpu-cputype.c | 6 +++--- 3 files changed, 18 insertions(+), 4 deletions(-) commit 504de58512129831398bcf4aba51f19a97b609d9 Author: Karel Zak Date: Thu May 14 15:20:52 2020 +0200 lscpu: convert ARM decoding to new API Signed-off-by: Karel Zak sys-utils/Makemodule.am | 1 + sys-utils/lscpu-api.h | 41 ++++++++++++ sys-utils/lscpu-arm.c | 160 +++++++++++++++++++++++++++------------------- sys-utils/lscpu-cputype.c | 2 + sys-utils/lscpu-virt.c | 41 +----------- sys-utils/lscpu.h | 1 - 6 files changed, 141 insertions(+), 105 deletions(-) commit a94bb4357eb45666089dd792b9dda936a3e81c02 Author: Karel Zak Date: Thu May 14 12:02:44 2020 +0200 lscpu: cleaup arch freeing Signed-off-by: Karel Zak sys-utils/lscpu-api.h | 6 ++++-- sys-utils/lscpu-cputype.c | 30 ++++++++++++++++++++---------- sys-utils/lscpu-virt.c | 2 +- 3 files changed, 25 insertions(+), 13 deletions(-) commit 909d35758e1b12030afaf25220f850ffe06ecd75 Author: Karel Zak Date: Thu May 14 11:52:49 2020 +0200 lscpu: add lscpu_read_virtualization() Signed-off-by: Karel Zak sys-utils/Makemodule.am | 1 + sys-utils/lscpu-api.h | 47 ++- sys-utils/lscpu-cputype.c | 12 +- sys-utils/lscpu-virt.c | 744 ++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 793 insertions(+), 11 deletions(-) commit 154ee5a992b1a3b1dda25c1bd7ed296197e65bfd Author: Karel Zak Date: Wed May 13 13:33:36 2020 +0200 lscpu: add lscpu_read_numas() Signed-off-by: Karel Zak sys-utils/lscpu-api.h | 7 ++++- sys-utils/lscpu-cputype.c | 75 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 81 insertions(+), 1 deletion(-) commit 617d8fbec5a7075f3027108f368813a1eb231a1c Author: Karel Zak Date: Wed May 13 13:33:13 2020 +0200 lscpu: fix mem-leak in cpu Signed-off-by: Karel Zak sys-utils/lscpu-cpu.c | 3 +++ 1 file changed, 3 insertions(+) commit 0796923aa8ec67877326a663880f09554ac02b1c Author: Karel Zak Date: Thu May 7 15:23:03 2020 +0200 lscpu: add lscpu_read_vulnerabilities() Signed-off-by: Karel Zak sys-utils/lscpu-api.h | 10 +++++- sys-utils/lscpu-cputype.c | 78 +++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 84 insertions(+), 4 deletions(-) commit b152ec5436705cc5b65239e2a4bcf783fcfc70f2 Author: Karel Zak Date: Thu May 7 15:08:13 2020 +0200 lscpu: cleanup lscpu_unref_cputype() Signed-off-by: Karel Zak sys-utils/lscpu-cputype.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit 5a6da72c421db14b312b63d91046238485f4bdfe Author: Karel Zak Date: Thu May 7 15:03:40 2020 +0200 lscpu: add lscpu_read_extra() Signed-off-by: Karel Zak sys-utils/lscpu-api.h | 1 + sys-utils/lscpu-cputype.c | 103 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 104 insertions(+) commit 551f2b4dc9f33375a4fb95ec04654123d183a86c Author: Karel Zak Date: Thu May 7 14:47:24 2020 +0200 lscpu: add lscpu_read_cpulists() Signed-off-by: Karel Zak sys-utils/lscpu-api.h | 21 ++++++++++++++++- sys-utils/lscpu-cputype.c | 60 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+), 1 deletion(-) commit d34b7f1b8224066e380f978dbe3ab97d283fb108 Author: Karel Zak Date: Thu May 7 14:19:39 2020 +0200 lscpu: add lscpu_read_architecture() Signed-off-by: Karel Zak sys-utils/lscpu-api.h | 14 +++++++-- sys-utils/lscpu-cputype.c | 77 ++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 88 insertions(+), 3 deletions(-) commit d234a381018f3e16bb654978965be30f9bd38925 Author: Karel Zak Date: Thu Apr 9 12:10:43 2020 +0200 lscpu: (cputype) simplify cpuinfo parsing Signed-off-by: Karel Zak sys-utils/lscpu-api.h | 3 +- sys-utils/lscpu-cpu.c | 29 ++++++++- sys-utils/lscpu-cputype.c | 161 ++++++++++++++++++++++++++++------------------ 3 files changed, 127 insertions(+), 66 deletions(-) commit 855bab2a2ecd9c2be7c483501857580311d300de Author: Karel Zak Date: Thu Apr 9 10:32:11 2020 +0200 lscpu: add lscpu_cpu to internal API Signed-off-by: Karel Zak sys-utils/Makemodule.am | 1 + sys-utils/lscpu-api.h | 25 ++++++++--- sys-utils/lscpu-cpu.c | 51 +++++++++++++++++++++ sys-utils/lscpu-cputype.c | 112 +++++++++++++++++++++++++++++++--------------- 4 files changed, 149 insertions(+), 40 deletions(-) commit 7079f4662ceac676866c2accf302c0533f4d59c4 Author: Karel Zak Date: Wed Mar 18 15:58:53 2020 +0100 lscpu: (cputype) move temporary stuff Signed-off-by: Karel Zak sys-utils/lscpu-cputype.c | 53 ++++++++++++++++++++++++----------------------- 1 file changed, 27 insertions(+), 26 deletions(-) commit cbf8f1297bebc33b9155e5a5826e8c2b783a9e80 Author: Karel Zak Date: Wed Mar 18 15:56:20 2020 +0100 lscpu: (cputype) add header file, cleanup patterns code * move structs definitions to header file * define set of /proc/cpuinfo parsing patterns for cpu-type and for CPUs Signed-off-by: Karel Zak sys-utils/Makemodule.am | 3 +- sys-utils/lscpu-api.h | 99 ++++++++++++++++ sys-utils/lscpu-cputype.c | 288 +++++++++++++++++++++++----------------------- 3 files changed, 242 insertions(+), 148 deletions(-) commit 329ec35ff03b073d13ec6bb52283cb6711537569 Author: Karel Zak Date: Tue Mar 17 17:27:51 2020 +0100 lscpu: (cputype) add cpuinfo parser Signed-off-by: Karel Zak sys-utils/lscpu-cputype.c | 144 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 144 insertions(+) commit ad2659383c1b3e7b0f1174515730bafebbeadf84 Author: Karel Zak Date: Tue Mar 17 17:24:28 2020 +0100 include/strutils: make xstrncpy() compatible with over-smart gcc 9 Signed-off-by: Karel Zak include/strutils.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 71464ded30fb1132967949cd209ff93804bd8256 Author: Karel Zak Date: Tue Mar 17 13:41:28 2020 +0100 lscpu: (cputype) add ref-counting, allocate context Signed-off-by: Karel Zak sys-utils/lscpu-cputype.c | 73 +++++++++++++++++++++++++++++++++++++---------- 1 file changed, 58 insertions(+), 15 deletions(-) commit 450cb0b7240839074874c27a3c7b20861ebfcdd3 Author: Karel Zak Date: Tue Mar 17 13:30:05 2020 +0100 lscpu: (cputype) add debug stuff Signed-off-by: Karel Zak sys-utils/lscpu-cputype.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit 405d51edf4374d17130d0f2f109adda263bcd8a4 Author: Karel Zak Date: Tue Mar 17 13:12:12 2020 +0100 lscpu: add very basic cputype code The current lscpu assumes that all CPUs in the system are the same. Unfortunately this is not true. We need to split all internal CPUs descriptions to CPU-type and CPU. This patch add lscpu-cputype.c where will be CPU-type description -- mostly based on /proc/cpuinfo. Signed-off-by: Karel Zak sys-utils/Makemodule.am | 5 ++ sys-utils/lscpu-cputype.c | 125 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 130 insertions(+) commit ff3c6fd66fa6be33e4f0a5900be9caf95bfc9aa8 Author: Karel Zak Date: Thu Nov 12 11:40:22 2020 +0100 tests: update JSON outputs Signed-off-by: Karel Zak tests/expected/libsmartcols/fromfile-tree-json | 67 +++++-- tests/expected/lsmem/lsmem-s390-zvm-6g | 81 ++++++++- tests/expected/lsmem/lsmem-x86_64-16g | 241 ++++++++++++++++++++++--- 3 files changed, 336 insertions(+), 53 deletions(-) commit e434cf2cdb2b9b776726be66b1315e54d94682cd Author: Karel Zak Date: Thu Nov 12 11:38:55 2020 +0100 lib/jsonwrt: use proper output function Signed-off-by: Karel Zak lib/jsonwrt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 618a6ccbfd41d4ad3864eecab3d7d5091314d53e Author: Karel Zak Date: Thu Nov 12 11:21:50 2020 +0100 libsmartcols: use lib/jsonwrt.c for JSON Signed-off-by: Karel Zak libsmartcols/src/Makemodule.am | 1 - libsmartcols/src/fput.c | 97 ----------------------------------------- libsmartcols/src/print-api.c | 19 +++++--- libsmartcols/src/print.c | 98 ++++++++++++++++++++++++------------------ libsmartcols/src/smartcolsP.h | 16 ++----- 5 files changed, 73 insertions(+), 158 deletions(-) commit 37bcd05602760c0bd0d063c43e346f4343834c6b Author: Karel Zak Date: Thu Nov 12 11:19:13 2020 +0100 lib/jsonwrt: add new functions to write in JSON We need JSON formatting stuff also outside libsmartcols. Signed-off-by: Karel Zak include/Makemodule.am | 1 + include/jsonwrt.h | 44 +++++++++++++++++ lib/Makemodule.am | 1 + lib/jsonwrt.c | 128 ++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 174 insertions(+) commit 8e3c0176bd4f3de626dfc8cd6946378b634f21d4 Author: Pali Rohár Date: Sun Nov 8 14:24:06 2020 +0100 libblkid: udf: add support for unclosed sequential Write-Once media libblkid/src/superblocks/udf.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) commit 6408acd9e004034cbc193ffd0ca4566be118de0a Author: Pali Rohár Date: Thu Nov 5 19:23:23 2020 +0100 libblkid: udf: add support for multisession via session_offset hint To read multisession UDF disc it is required to probe VSD and AVDP from the selected session (specified by session_offset) and then read other volume descriptors from absolute location specified in AVDP, which is in most cases in previous session. So it is required for udf detector to be able to read data from any location of disc and therefore blkid's --offset argument cannot be used to access multisession optical disc. Only blkid's --hint session_offset argument can be used to instruct blkid to read multisession optical disc or disc images correctly. Signed-off-by: Pali Rohár libblkid/src/superblocks/udf.c | 38 ++++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-) commit cf2f10bb5929e6b28195017de99f1ec1843e0671 Author: Pali Rohár Date: Thu Nov 5 19:22:58 2020 +0100 libblkid: iso9660: add support for multisession via session_offset hint The only required change is to read disc from offset specified by session_offset instead of beginning of disc (offset 0). So either blkid's --offset or --hint session_offset argument would work for correct detection of multisession ISO9660 optical disc or disc image. Although the ISO9660 specification allows also non-2kB sector sizes, current blkid implementation has hardcoded ISO9660 sector size to 2kB. Therefore there is check that session_offset is multiple of 2048. Signed-off-by: Pali Rohár libblkid/src/superblocks/iso9660.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit b5c5b42014619358371addfd7864dc9401647745 Author: Pali Rohár Date: Sun Nov 8 01:51:28 2020 +0100 libblkid: fix blkid_probe_get_sb() to use hint offset calculation libblkid/src/blkidP.h | 4 ++-- libblkid/src/probe.c | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) commit 3e31657db5353f7b94ecb066ee9787e26b3a4a1d Author: Pali Rohár Date: Thu Nov 5 19:22:22 2020 +0100 libblkid: allow to specify offset defined by hint for blkid_probe_get_idmag() Extends struct blkid_idmag with a new member hoff which specify name of the hint used for blkid_probe_get_hint() function to retrieve offset to kboff. blkid_probe_get_idmag() will use supplied hint offset in bytes as a start position from which the final offsets for magic strings are calculated. Signed-off-by: Pali Rohár libblkid/src/blkidP.h | 1 + libblkid/src/probe.c | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) commit 427ea35512b0edc012cf1e5bac5ff6295f912a1d Author: Pali Rohár Date: Thu Nov 5 19:21:15 2020 +0100 libblkid: detect session_offset hint for optical discs When offset and session_offset hint are not specified then sets session_offset hint from CDROMMULTISESSION ioctl which returns start position of the last session of multisession optical disc. It is expected that session_offset hint contains position offset in bytes where starts session of multisession optical disc which should be read. Filesystems designed for optical discs are expected to use this value when dealing with multisession optical disc to know where they should start reading optical disc or image of optical disc. Signed-off-by: Pali Rohár libblkid/src/probe.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit bfd4da56283daed2af2d969530628045f57bbf57 Author: Pali Rohár Date: Thu Nov 5 19:18:26 2020 +0100 libblkid: do size correction of optical discs also by last written sector Everything after last written sector is undefined. Signed-off-by: Pali Rohár libblkid/src/probe.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 6b88a410ae0473d622454680fdf8166c8e174f8d Author: Pali Rohár Date: Thu Nov 5 19:16:27 2020 +0100 libblkid: detect CD/DVD discs in packet writing mode Packet writing mode for CD and DVD discs is provided by kernel module pktcdvd.ko which exports block devices /dev/pktcdvd/pktcdvd*. These block devices do not accept CDROM_DRIVE_STATUS ioctl, therefore current blkid code does not detect them as BLKID_FL_CDROM_DEV and also does not do necessary size correction. Extend detection of CD/DVD discs by additional CDROM_LAST_WRITTEN ioctl which is accepted also by pktcdvd.ko. Signed-off-by: Pali Rohár libblkid/src/probe.c | 40 +++++++++++++++++++++++++++++++--------- 1 file changed, 31 insertions(+), 9 deletions(-) commit 32d81aff5beb53354d0235d4e378698f6770465a Merge: ab5d18e97 c70b4f2a5 Author: Karel Zak Date: Tue Nov 10 13:37:30 2020 +0100 Merge branch 'libblkid' of https://github.com/ferivoz/util-linux commit ab5d18e973fdfaa802a5486b72b55c139c69bd42 Author: Karel Zak Date: Tue Nov 10 13:36:32 2020 +0100 tests: (ul) remove another 'dim' input Signed-off-by: Karel Zak tests/expected/ul/basic | 1 - tests/ts/ul/filter.input | 1 - 2 files changed, 2 deletions(-) commit c70b4f2a5b99876d230b8f4f413c3bb3ee6647f1 Author: Samanta Navarro Date: Tue Nov 10 11:48:04 2020 +0100 libblkid: limit amount of parsed partitions The linux kernel does not support more than 256 partitions (DISK_MAX_PARTS). The atari and mac block devices have no such limits. Use dos logical partition limit for atari as well (100). Use the kernel limit for mac (256). Signed-off-by: Samanta Navarro libblkid/src/partitions/atari.c | 6 +++++- libblkid/src/partitions/mac.c | 15 +++++++++++---- 2 files changed, 16 insertions(+), 5 deletions(-) commit 3fbeb9eeb86a04283e38ee9272a7726e7fbb8de9 Author: Samanta Navarro Date: Sun Nov 8 11:46:56 2020 +0000 libblkid: fix time_t handling The time_t data type is a signed integer. A signed integer overflow is not defined in C programming language. A signed overflow occurs on 32 bit systems with 32 time_t for loop back devices, e.g. when calling "blkid /dev/loop0". This happens because bid_time is set to INT_MIN and the diff calculation cannot store the result in time_t (positive int - INT_MIN > INT_MAX). This fix changes the code to use an unsigned integer calculation. It pretty much means that the code works as before, but well defined in C. Checking diff to be positive protects the code against system setups with dates before 1970 as well. The time_t data type on modern Linux systems is 64 bit even for 32 bit systems. Since long is 32 bit on these systems, long long is a better data type for 64 bit output. Signed-off-by: Samanta Navarro libblkid/src/dev.c | 4 ++-- libblkid/src/devname.c | 2 +- libblkid/src/save.c | 6 +++--- libblkid/src/verify.c | 22 +++++++++++----------- 4 files changed, 17 insertions(+), 17 deletions(-) commit b7bca24476ba694b6e4401d1606c67c09118c162 Author: Karel Zak Date: Mon Nov 9 17:10:45 2020 +0100 libblkid: overwrite existing hint Addresses: https://github.com/karelzak/util-linux/issues/1161 Suggested-by: Pali Rohár Signed-off-by: Karel Zak libblkid/src/probe.c | 73 +++++++++++++++++++++++++++++++++------------------- 1 file changed, 46 insertions(+), 27 deletions(-) commit e34abedb6e8229d043d1f3a5109adb5b9e349411 Author: Karel Zak Date: Mon Nov 9 16:41:46 2020 +0100 tests: remove ul(1) 'dim' input It's not supported by all terminals. Signed-off-by: Karel Zak tests/expected/ul/basic | 3 +-- tests/ts/ul/filter.input | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) commit bd66eb2e43cd3e08d708c4704c7d226b9beb7549 Author: Sami Kerola Date: Sun Oct 25 07:54:37 2020 +0000 tests: move misc/ul to ul/ directory Reference: https://github.com/karelzak/util-linux/pull/1165#issuecomment-715173662 Signed-off-by: Sami Kerola tests/expected/{misc => ul}/ul | 0 tests/ts/{misc => ul}/ul | 0 2 files changed, 0 insertions(+), 0 deletions(-) commit 782cc33a02b0b9440017997e9321fcf7d54eaf64 Author: Karel Zak Date: Mon Nov 9 15:30:06 2020 +0100 build-sys: fix sendfile use * OSX uses different prototype * include file is not covered by HAVE_SYS_SENDIFLE_H Signed-off-by: Karel Zak configure.ac | 1 + include/all-io.h | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) commit e577bea10e7f7090baa5c5a54d4da7db29cbe5c9 Author: Karel Zak Date: Mon Nov 9 12:54:18 2020 +0100 wipefs: (man) add hint to erase on partitions and disk Addresses: https://github.com/karelzak/util-linux/issues/1177 Signed-off-by: Karel Zak misc-utils/wipefs.8 | 2 ++ 1 file changed, 2 insertions(+) commit df8a8d137388959dec03a26e4ecb9ec20702e1a1 Merge: bb123ad50 e4be3ee01 Author: Karel Zak Date: Mon Nov 9 12:31:17 2020 +0100 Merge branch 'libuuid' of https://github.com/ferivoz/util-linux * 'libuuid' of https://github.com/ferivoz/util-linux: libuuid: check quality of random bytes commit 248c239b272a6bcd0deffb62ed51a83bb71a1593 Author: Karel Zak Date: Mon Nov 9 11:42:58 2020 +0100 libblkid: export blkid_probe_reset_hints() * make hints persistent and do not call blkid_probe_reset_hints() in blkid_probe_set_device() * export blkid_probe_reset_hints() by API to keep it completely in user's hands Reported-by: Pali Rohár Signed-off-by: Karel Zak libblkid/docs/libblkid-sections.txt | 1 + libblkid/src/blkid.h.in | 2 ++ libblkid/src/libblkid.sym | 1 + libblkid/src/probe.c | 12 ++++++++---- 4 files changed, 12 insertions(+), 4 deletions(-) commit bb123ad50379e3e3000ade04f2939b1e7702adae Merge: e5781b3d3 cabbf61fa Author: Karel Zak Date: Mon Nov 9 11:06:27 2020 +0100 Merge branch 'vipw-shortwrite' of https://github.com/DankRank/util-linux * 'vipw-shortwrite' of https://github.com/DankRank/util-linux: ul_copy_file: make defines for return values read_all: return 0 when EOF occurs after 0 bytes ul_copy_file: add test program ul_copy_file: handle EAGAIN and EINTR ul_copy_file: use all_read/all_write ul_copy_file: use BUFSSIZ for buffer size nologin: use ul_copy_file login: use ul_copy_file configure.ac: check for sendfile ul_copy_file: use sendfile vipw: move copyfile to the lib vipw: fix short write handling in copyfile commit e5781b3d3b094513540049117259c3bbb5eedfe8 Author: Karel Zak Date: Mon Nov 9 10:53:23 2020 +0100 flock: keep -E exit status more restrictive Addresses: https://github.com/karelzak/util-linux/issues/1180 Signed-off-by: Karel Zak sys-utils/flock.1 | 4 +++- sys-utils/flock.c | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) commit cabbf61fab7e69860b076f1d55b26e1fb07b0b4c Author: Egor Chelak Date: Sat Nov 7 02:19:56 2020 +0200 ul_copy_file: make defines for return values Suggested-by: Sami Kerola Signed-off-by: Egor Chelak include/fileutils.h | 2 ++ lib/fileutils.c | 10 +++++----- login-utils/vipw.c | 4 ++-- 3 files changed, 9 insertions(+), 7 deletions(-) commit 418eb09482ddef66352e6677211ca3341267223d Author: Egor Chelak Date: Fri Nov 6 21:09:14 2020 +0200 read_all: return 0 when EOF occurs after 0 bytes Originally it would return -1 (without setting errno) if the fd was already at EOF when you called read_all. This is already fixed in sendfile_all. Reviewed-by: Sami Kerola Signed-off-by: Egor Chelak include/all-io.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 7951164c1ff71c86d93458c8b571d1a4b2ad3e59 Author: Egor Chelak Date: Fri Nov 6 21:08:12 2020 +0200 ul_copy_file: add test program Suggested-by: Karel Zak Reviewed-by: Sami Kerola Signed-off-by: Egor Chelak lib/fileutils.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 212bde6cf7160422844daba5276c8a0d1412a937 Author: Egor Chelak Date: Fri Nov 6 20:33:46 2020 +0200 ul_copy_file: handle EAGAIN and EINTR I did this by implementing a function called sendfile_all() similar to read_all()/write_all(). The manpage for sendfile doesn't mention EINTR, but I decided to check it anyway, just in case. Suggested-by: Karel Zak Reviewed-by: Sami Kerola Signed-off-by: Egor Chelak include/all-io.h | 32 ++++++++++++++++++++++++++++++++ lib/fileutils.c | 17 ++++------------- 2 files changed, 36 insertions(+), 13 deletions(-) commit f19a16550af6fb87f02eacf9af9149e95fa2b965 Author: Egor Chelak Date: Fri Nov 6 19:39:02 2020 +0200 ul_copy_file: use all_read/all_write Suggested-by: Karel Zak Reviewed-by: Sami Kerola Signed-off-by: Egor Chelak lib/fileutils.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit e4530996403c0ee15da6bd4dcdfae70188f9094f Author: Egor Chelak Date: Fri Nov 6 18:35:26 2020 +0200 ul_copy_file: use BUFSSIZ for buffer size Suggested-by: Karel Zak Reviewed-by: Sami Kerola Signed-off-by: Egor Chelak lib/fileutils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9203b41a4fb9ead5bb162026153c65fd73880a04 Author: Egor Chelak Date: Fri Nov 6 12:43:18 2020 +0200 nologin: use ul_copy_file Suggested-by: Sami Kerola Reviewed-by: Sami Kerola Signed-off-by: Egor Chelak login-utils/Makemodule.am | 1 + login-utils/nologin.c | 8 ++------ 2 files changed, 3 insertions(+), 6 deletions(-) commit 8fcdbefb7b418e17ef2b2de1171f9b13330aa8c4 Author: Egor Chelak Date: Fri Nov 6 12:37:24 2020 +0200 login: use ul_copy_file Suggested-by: Karel Zak Reviewed-by: Sami Kerola Signed-off-by: Egor Chelak login-utils/login.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 360cdaa6c70094ba72bbf12b95f1bb5cb8fa7e29 Author: Egor Chelak Date: Fri Nov 6 12:15:36 2020 +0200 configure.ac: check for sendfile Do note that according to man sendfile, "Other UNIX systems implement sendfile() with different semantics and prototypes." If this is something we care about, a better check is needed. Suggested-by: Karel Zak Reviewed-by: Sami Kerola Signed-off-by: Egor Chelak configure.ac | 1 + lib/fileutils.c | 6 ++++++ 2 files changed, 7 insertions(+) commit a8b4e7cad1237ba021c02febb84aa8697e0944c0 Author: Egor Chelak Date: Fri Nov 6 11:15:11 2020 +0200 ul_copy_file: use sendfile Suggested-by: Karel Zak Reviewed-by: Sami Kerola Signed-off-by: Egor Chelak lib/fileutils.c | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) commit b9dcd38462d04a7ec2840f2c05eba840b226bc71 Author: Egor Chelak Date: Fri Nov 6 09:45:18 2020 +0200 vipw: move copyfile to the lib Also, a bug in pw_tmpfile was fixed: copyfile used tmp_file to report errors, but pw_tmpfile only assigned that variable _after_ calling copyfile. Suggested-by: Sami Kerola Reviewed-by: Sami Kerola Signed-off-by: Egor Chelak include/fileutils.h | 2 ++ lib/fileutils.c | 19 +++++++++++++++++++ login-utils/vipw.c | 24 ++++++------------------ 3 files changed, 27 insertions(+), 18 deletions(-) commit e4be3ee01d1cc1b342adda5eb51f7981b2b0ccd2 Author: Samanta Navarro Date: Sun Nov 8 11:47:18 2020 +0000 libuuid: check quality of random bytes If a libuuid application is unable to access /dev/random or /dev/urandom then uuid generation by uuid_generate falls back to uuid_generate_time. This could happen in chroot or container environments. The function ul_random_get_bytes from lib/randutils.c uses getrandom if it is available. This could either mean that the libuuid application skips good random bytes because the character special files do not exist or the application trusts in good random bytes just because these files are accessible but not necessarily usable, e.g. limit of open file descriptors reached, lack of data, kernel without getrandom, etc. This commit modifies ul_random_get_bytes to return an integer which indicates if random bytes are of good quality (0) or not (1). Callers can decide based on this information if they want to discard the random bytes. Only libuuid checks the return value. I decided to return 1 instead of -1 because -1 feels more like an error, but weak random bytes can be totally fine. Another issue is that getrandom sets errno to specific values only in case of an error, i.e. with return value -1. Set errno to 0 explicitly if getrandom succeeds so we do not enter the fallback routine for ENOSYS by mistake. I do not think that this is likely to happen, but it really depends on possible wrapper function supplied by a C library. Signed-off-by: Samanta Navarro include/randutils.h | 2 +- lib/randutils.c | 11 +++++++++-- libuuid/man/uuid_generate.3 | 6 ++++-- libuuid/src/gen_uuid.c | 33 ++++++++++++--------------------- libuuid/src/uuidd.h | 2 +- 5 files changed, 27 insertions(+), 27 deletions(-) commit 8f22adaaf30e9fd3bf83da0213b4a6525c9305cd Author: Samanta Navarro Date: Sun Nov 8 11:45:18 2020 +0000 libblkid: allow a lot of mac partitions If the map count is set to INT_MAX then the for loop does not stop because its check is never false. I have not found a correct upper limit. The other partition logics have a maximum amount (exception is atari.c). The loop itself wouldn't be endless. If the iteration reaches block 0 then the signature will be wrong. This means that map count = INT_MAX case would fail even if such a setup would be correct on disk. Signed-off-by: Samanta Navarro libblkid/src/partitions/mac.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 02162731c1899613bce2aafc825acc7baa3cc99a Author: Samanta Navarro Date: Sun Nov 8 11:44:55 2020 +0000 libblkid: fix memory leak in config parser Multiple occurrences of CACHE_FILE lead to memory leaks. Also if last occurrence of CACHE_FILE is empty then cache file is not set to NULL again. An example /etc/blkid.conf could be: CACHE_FILE=/tmp/cache1 CACHE_FILE=/tmp/cache2 CACHE_FILE= I would expect that CACHE_FILE is empty but actually it is still /tmp/cache2. Signed-off-by: Samanta Navarro libblkid/src/config.c | 3 +++ 1 file changed, 3 insertions(+) commit ee7f4bee9b503176bed57882ca5e8ba4d6a15c3e Author: Karel Zak Date: Fri Nov 6 11:38:51 2020 +0100 sfdisk: fix backward --move-data * fix final message where number of moved sectors overflow number of all moved sectors * align last step size before we use it for backward mode source and destination offsets calculation Addresses: https://github.com/karelzak/util-linux/issues/1176 Signed-off-by: Karel Zak disk-utils/sfdisk.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) commit de9cbcdcef83ee238b53006ac2e3d4efa57c8877 Merge: 028043c2d 062e6a394 Author: Karel Zak Date: Fri Nov 6 09:44:52 2020 +0100 Merge branch 'whereis' of https://github.com/ferivoz/util-linux * 'whereis' of https://github.com/ferivoz/util-linux: whereis: extend test case whereis: filter bin, man and src differently whereis: do not strip suffixes whereis: do not ignore trailing numbers whereis: add --disable-whereis to configure whereis: add lib32 directories whereis: support zst compressed man pages whereis: fix out of boundary read commit 028043c2d5e13ec79e828c8d306ad0866fbb495c Merge: bd0f347f8 d7101e591 Author: Karel Zak Date: Thu Nov 5 11:37:51 2020 +0100 Merge branch 'sfdisk-json-dump' of https://github.com/xnox/util-linux commit d7101e5911fe251eed1a0913504cac884f195847 Author: Dimitri John Ledkov Date: Wed Nov 4 12:35:38 2020 +0000 sfdisk: correct --json --dump false exclusive `--json` implies `--dump`, thus `--json --dump` must be allowed. `--list-free` is incompatible with `--dump`, and thus also with `--json`. Currently `--json --dump` is prohibited, even though `--list-free` is not specified at all. Regression introduced in 03154d2cf25c1d5ce908da9e72d324004b8d5722. Signed-off-by: Dimitri John Ledkov disk-utils/sfdisk.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 062e6a39451622cce9fa89f26ee848b0dddb10d3 Author: Samanta Navarro Date: Wed Nov 4 11:39:00 2020 +0000 whereis: extend test case Previous commits are covered with these test cases. Removed dependency on system layout. Signed-off-by: Samanta Navarro tests/expected/misc/whereis | 6 +++++- tests/ts/misc/whereis | 32 ++++++++++++++++++++++++++------ 2 files changed, 31 insertions(+), 7 deletions(-) commit 653f672ab61346fea2ec10d3706f0e3e9e8f51de Author: Samanta Navarro Date: Wed Nov 4 11:38:00 2020 +0000 whereis: filter bin, man and src differently Consider "s." prefixes for source code files only (even though I do not know which VCS does that), compression suffixes for manual pages and strict matching for executables. Calling "whereis python3" is kind of okay to return python3.8 next to python3, but python3.8-config is not the same tool as python3. Signed-off-by: Samanta Navarro misc-utils/whereis.c | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) commit 117ddbeedc02bfc93f6776ca27c3a5501bd718e5 Author: Samanta Navarro Date: Wed Nov 4 11:37:00 2020 +0000 whereis: do not strip suffixes The whereis implementations of FreeBSD, macOS, NetBSD, and OpenBSD do not strip suffixes. Although whereis is not a POSIX tool and has no shared standard, even its manual page indicates that the supplied names are command names. Commands do not have a suffix on Linux systems. Stripping suffixes actually leads to issues with tools like fsck.ext4, since fsck.ext4 is not the same tool as fsck and definitely not the same tool as fsck.minix. Signed-off-by: Samanta Navarro misc-utils/whereis.1 | 6 +----- misc-utils/whereis.c | 3 --- 2 files changed, 1 insertion(+), 8 deletions(-) commit d95ee9fd759762ce11b292d5d4484dd62888645e Author: Samanta Navarro Date: Wed Nov 4 11:36:00 2020 +0000 whereis: do not ignore trailing numbers The commands diff and diff3 are so distinct that their manual pages should not be mixed in whereis output. Theoretically this works for commands and binaries with links to each other, e.g. gpg and gpg2, but if gpg is version 1 and gpg2 is version 2 then manual pages do not match either. Also the while loop does not decrement "i" while incrementing "dp". The effect of this is that the output of whereis depends on manual pages being compressed or not. The easiest solution is to not ignore trailing numbers. Signed-off-by: Samanta Navarro misc-utils/whereis.c | 2 -- 1 file changed, 2 deletions(-) commit b7fc158a2eb5433f178337773b4f9fd7805555d8 Author: Samanta Navarro Date: Wed Nov 4 11:35:00 2020 +0000 whereis: add --disable-whereis to configure Allow a build of util-linux without whereis. Signed-off-by: Samanta Navarro configure.ac | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 74b7c01fa6c009d00c3ef894d6c6a2a9dd37c41c Author: Samanta Navarro Date: Wed Nov 4 11:34:00 2020 +0000 whereis: add lib32 directories These directories are sometimes used by Linux distributions. Signed-off-by: Samanta Navarro misc-utils/whereis.c | 2 ++ 1 file changed, 2 insertions(+) commit 6065250a4d0e20aac3dcb19ec6aa4f1ba0811fef Author: Samanta Navarro Date: Wed Nov 4 11:33:00 2020 +0000 whereis: support zst compressed man pages Add zst as extension for manual pages. Current version of man-db supports zst extension out of the box. Signed-off-by: Samanta Navarro misc-utils/whereis.c | 2 ++ 1 file changed, 2 insertions(+) commit cd4142f7c3757f3337c20a971b98c673e68a66a1 Author: Samanta Navarro Date: Wed Nov 4 11:32:00 2020 +0000 whereis: fix out of boundary read If whereis encounters a short file name then an out of boundary read can occur. Signed-off-by: Samanta Navarro misc-utils/whereis.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit bd0f347f86896965696932b2943ef15c4aab3f65 Author: Samanta Navarro Date: Wed Nov 4 11:31:00 2020 +0000 misc: fix typos Signed-off-by: Samanta Navarro lib/randutils.c | 2 +- libblkid/src/cache.c | 4 ++-- libblkid/src/probe.c | 2 +- libmount/src/fs.c | 4 ++-- misc-utils/uuidgen.1 | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) commit cb77628876254181d6727cc0f6ef16979031cbb0 Author: Samanta Navarro Date: Wed Nov 4 11:30:00 2020 +0000 misc: fix typos [codespell] Signed-off-by: Samanta Navarro configure.ac | 2 +- disk-utils/fdisk-list.c | 8 ++++---- disk-utils/fdisk-list.h | 4 ++-- lib/env.c | 4 ++-- libblkid/src/devname.c | 4 ++-- tests/expected/fdisk/bsd_0_64.BE | 2 +- tests/expected/fdisk/bsd_0_64.LE | 2 +- tests/expected/fdisk/bsd_0_64_alpha.LE | 2 +- tests/expected/fdisk/bsd_1_0.BE | 2 +- tests/expected/fdisk/bsd_1_0.LE | 2 +- tests/expected/ul/basic | 2 +- tests/ts/fdisk/bsd | 2 +- tests/ts/ul/filter.input | 2 +- text-utils/column.c | 2 +- 14 files changed, 20 insertions(+), 20 deletions(-) commit ebb5ca72f4f0a18c61bc3935a1c7b769d7f3408a Author: Karel Zak Date: Wed Nov 4 10:29:30 2020 +0100 sfdisk: (docs) add more information about GPT attribute bits Addresses: https://github.com/karelzak/util-linux/issues/1171 Signed-off-by: Karel Zak disk-utils/sfdisk.8 | 35 +++++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) commit ac3a0fd92e571ccc46919bc0a651d0647e7b5d36 Author: Karel Zak Date: Tue Nov 3 17:15:34 2020 +0100 blkid: add --hint =value Signed-off-by: Karel Zak misc-utils/blkid.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 67719fbbda6de60c63496e62dae8617336f9ac7b Author: Karel Zak Date: Tue Nov 3 17:06:09 2020 +0100 libblkid: add blkid_probe_{set,get}_hint() Add new API for additional probing hints (offsets). The idea is that probing function can optionally use the hint to detect superblock or partition table if on unusual place where the library does not expects (etc.) The hints use strings as identifiers (e.g. "last-medium-session") to make it extendable and prober specific (if necessary). The function blkid_probe_set_hint() always add a new hint, so you can specify more offsets with the same (hint) name. The function blkid_probe_get_hint() is not public. For now it returns the first hint only. Addresses: https://github.com/karelzak/util-linux/issues/1161 Signed-off-by: Karel Zak libblkid/docs/libblkid-sections.txt | 1 + libblkid/src/blkid.h.in | 3 ++ libblkid/src/blkidP.h | 14 +++++ libblkid/src/libblkid.sym | 4 ++ libblkid/src/probe.c | 100 ++++++++++++++++++++++++++++++++++++ 5 files changed, 122 insertions(+) commit 1ab5f9b70555b113891cd0e283eae62631692b68 Author: Karel Zak Date: Tue Nov 3 15:23:03 2020 +0100 docs: rename to getopt-example Addresses: https://github.com/karelzak/util-linux/commit/27114b297424ecf1b745b1a71f6d40be0e56e67e#commitcomment-43591002 Signed-off-by: Karel Zak misc-utils/getopt-example.bash | 4 ++-- misc-utils/getopt-example.tcsh | 4 ++-- tests/ts/getopt/basic | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) commit 1d6e1b62e5b8e6ffd9665076e412c22976650395 Merge: 364de8f4f 1b10fa0ef Author: Karel Zak Date: Tue Nov 3 12:40:35 2020 +0100 Merge branch 'execl-null' of https://github.com/DankRank/util-linux * 'execl-null' of https://github.com/DankRank/util-linux: cast NULL to char * when using execl commit 364de8f4f5625d17094a4d6e9b5fb49cb19c20a4 Author: Sami Kerola Date: Mon Nov 2 22:26:18 2020 +0000 lib/randutils: rename random_get_bytes() Rename random_get_bytes() to avoid colliding a Solaris library function that has the same name. Reported-by: Sad Clouds Reference: https://lore.kernel.org/util-linux/20201101141608.ba365cf67d92ee3973226de9@gmail.com/ Reference: https://blogs.oracle.com/solaris/solaris-random-number-generation-v2 Signed-off-by: Sami Kerola include/randutils.h | 2 +- lib/randutils.c | 6 +++--- libfdisk/src/dos.c | 2 +- libuuid/src/gen_uuid.c | 6 +++--- misc-utils/mcookie.c | 2 +- sys-utils/ipcmk.c | 6 +++--- 6 files changed, 12 insertions(+), 12 deletions(-) commit 1b10fa0ef778cb1cae84e635d72e038f06efbd06 Author: Egor Chelak Date: Thu Oct 29 19:49:07 2020 +0200 cast NULL to char * when using execl When calling variadic functions, NULL must be explicitly cast to a desired type. This is noted in the exec(3) manpage. The call in newgrp.c was changed for consistency. Signed-off-by: Egor Chelak lib/exec_shell.c | 2 +- lib/pty-session.c | 4 ++-- login-utils/newgrp.c | 2 +- login-utils/sulogin.c | 4 ++-- login-utils/vipw.c | 2 +- sys-utils/eject.c | 4 ++-- sys-utils/setarch.c | 2 +- term-utils/script.c | 8 ++++---- term-utils/scriptlive.c | 8 ++++---- text-utils/pg.c | 2 +- 10 files changed, 19 insertions(+), 19 deletions(-) commit 12235ef107ed94d06758b6fc718e18fe421e2b17 Author: Egor Chelak Date: Thu Oct 29 19:06:13 2020 +0200 vipw: fix short write handling in copyfile Since `off` and `nr` approach each other, the for-loop ends prematurely when at least half of the buffer was written. I think under certain conditions this could cause the copy to be incomplete. Signed-off-by: Egor Chelak login-utils/vipw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9210db64a6e44ba5c6c76446835dd16606b5e79f Author: Karel Zak Date: Wed Oct 21 12:45:02 2020 +0200 ul: fix use of unsigned number Signed-off-by: Karel Zak text-utils/ul.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 732d75945ef5a299f08d60c6f8b28152b8b38bbc Author: Karel Zak Date: Wed Oct 21 12:03:45 2020 +0200 dmesg: add --since and --until $ date Wed 21 Oct 2020 12:05:07 PM CEST $ dmesg --ctime --since '1 hour ago' [Wed Oct 21 11:47:13 2020] AAA [Wed Oct 21 11:55:48 2020] BBB $ dmesg --ctime --since '1 hour ago' --until '10 minutes ago' [Wed Oct 21 11:47:13 2020] AAA Addresses: https://github.com/karelzak/util-linux/issues/1166 Signed-off-by: Karel Zak bash-completion/dmesg | 2 ++ sys-utils/dmesg.1 | 8 ++++++++ sys-utils/dmesg.c | 42 +++++++++++++++++++++++++++++++++++++++--- 3 files changed, 49 insertions(+), 3 deletions(-) commit 5064635395c37340caeca5879984732db403b756 Author: Karel Zak Date: Wed Oct 21 11:16:34 2020 +0200 ul: small coding changes Signed-off-by: Karel Zak text-utils/ul.c | 41 +++++++++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 16 deletions(-) commit 9c4762cb6b3c05430512e7d68b39575071b5ecfa Merge: 07c8462fb 1a3f71b29 Author: Karel Zak Date: Wed Oct 21 11:08:11 2020 +0200 Merge branch 'ul-refactor' of https://github.com/kerolasa/util-linux * 'ul-refactor' of https://github.com/kerolasa/util-linux: ul: flip comparisons to lesser to greater order ul: use size_t to measure memory allocation size ul: improve function and variable names ul: rename enumerated mode symbols ul: remove function like putwp preprocessor define ul: free most allocations ncurses did during setupterm() ul: replace global runtime variables with a control structure ul: add a term capabilities tracking structure ul: remove function prototypes ul: tidy up coding style ul: add basic tests commit 07c8462fb7f38b5872fc83fb98b8e9d81c6e41ef Author: Karel Zak Date: Wed Oct 21 10:19:26 2020 +0200 cal: do not use putp(), directly use stdio functions It seems our putp() based output is not portable as some ncurses implementations strictly follow POSIX where putp() accepts only terminfo capability strings and nothing else. We already use standard stdio.h functions to output terminfo strings (e.g. for colors). It seems we can do the same for cal(1) to highlight the current day. Note that mix putp() and fputs() is bad idea due to different buffering ways in some cases (see cal.c git log for more details). This patch also reduces complexity of the code as we can directly output to stdout without snprintf to string. Addresses: https://github.com/karelzak/util-linux/pull/1167 Signed-off-by: Karel Zak misc-utils/cal.c | 157 +++++++++++++++++++++---------------------------------- 1 file changed, 60 insertions(+), 97 deletions(-) commit 1a3f71b292668857589a93675e04292316b35dcb Author: Sami Kerola Date: Fri Oct 16 22:35:06 2020 +0100 ul: flip comparisons to lesser to greater order 1 < 2 < x < 4 is the order is the natural of values. Signed-off-by: Sami Kerola text-utils/ul.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 0186ff364d55bc3e5a5a9aaeae6c71bf5cf2f9fd Author: Sami Kerola Date: Fri Oct 16 22:26:15 2020 +0100 ul: use size_t to measure memory allocation size The size_t is the type libc memory allocation functions use. The size_t also provides allocation range that is enough not to a simple tool like this to perform paranoia size checks. Just let the realloc(3) fail if there is not enough memory available to handle the requested line size. That is a lot more straightforward. Signed-off-by: Sami Kerola text-utils/ul.c | 37 ++++++++++++------------------------- 1 file changed, 12 insertions(+), 25 deletions(-) commit 9a59ee652593e7a0c7aeba75ef637e0023ac0542 Author: Sami Kerola Date: Fri Oct 16 21:42:18 2020 +0100 ul: improve function and variable names Signed-off-by: Sami Kerola text-utils/ul.c | 394 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 198 insertions(+), 196 deletions(-) commit 580c63259bb1b59ec6730a1c4246269d76cb13e2 Author: Sami Kerola Date: Wed Oct 14 22:51:37 2020 +0100 ul: rename enumerated mode symbols First two are are ISO/IEC 2022 graphic character sets G0 (normal) and G1 (alternative), that one has to Switch In (SI) and Switch Out (SO). The rest are about how ul(1) is interacting with various text emphasis. Reference: https://tldp.org/HOWTO/Keyboard-and-Console-HOWTO-6.html Signed-off-by: Sami Kerola text-utils/ul.c | 78 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 39 insertions(+), 39 deletions(-) commit 52e3ce00973e37cbdc5d25217fab4ffa7b642fe9 Author: Sami Kerola Date: Wed Oct 14 22:15:03 2020 +0100 ul: remove function like putwp preprocessor define The #ifdef HAVE_WIDECHAR can be removed, because the command already is using wide character functions elsewhere without fallbacks. Signed-off-by: Sami Kerola text-utils/ul.c | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) commit 1962d5cfca5f9097e45c2b77fcb70272a72658fe Author: Sami Kerola Date: Sun Aug 2 00:58:35 2020 +0100 ul: free most allocations ncurses did during setupterm() Signed-off-by: Sami Kerola text-utils/ul.c | 1 + 1 file changed, 1 insertion(+) commit eaf68e30832bd2a7e75e4521c80a7fe6ebd19903 Author: Sami Kerola Date: Tue Jun 30 22:17:01 2020 +0100 ul: replace global runtime variables with a control structure Signed-off-by: Sami Kerola text-utils/ul.c | 309 +++++++++++++++++++++++++++++--------------------------- 1 file changed, 158 insertions(+), 151 deletions(-) commit 49421939268dc639fc951e3df9aaed71e98f690e Author: Sami Kerola Date: Mon Jun 29 22:00:14 2020 +0100 ul: add a term capabilities tracking structure Signed-off-by: Sami Kerola text-utils/ul.c | 179 +++++++++++++++++++++++++++++--------------------------- 1 file changed, 94 insertions(+), 85 deletions(-) commit a2811907e94c50c7f9638f3f3c2d70a60c2a0573 Author: Sami Kerola Date: Mon Jun 29 21:41:38 2020 +0100 ul: remove function prototypes Signed-off-by: Sami Kerola text-utils/ul.c | 760 +++++++++++++++++++++++++++----------------------------- 1 file changed, 372 insertions(+), 388 deletions(-) commit 5b627d8496ffc212d507596c44301f5bfff8d2de Author: Sami Kerola Date: Mon Jun 29 21:21:50 2020 +0100 ul: tidy up coding style Signed-off-by: Sami Kerola text-utils/ul.c | 85 +++++++++++++++++++++++++++++---------------------------- 1 file changed, 44 insertions(+), 41 deletions(-) commit aa439c603595735c7f57c3518f0943c6078b4792 Author: Sami Kerola Date: Sat Aug 1 13:20:30 2020 +0100 ul: add basic tests Signed-off-by: Sami Kerola tests/expected/ul/basic | 113 +++++++++++++++++++++++++++++++++++++++++++++++ tests/ts/ul/basic | 35 +++++++++++++++ tests/ts/ul/basic.input | 95 +++++++++++++++++++++++++++++++++++++++ tests/ts/ul/filter.input | 11 +++++ 4 files changed, 254 insertions(+) commit 97c9ec9ce3db2fe0266218b287484bc9d848e1a4 Author: Dr. David Alan Gilbert Date: Sat Oct 17 13:05:34 2020 +0100 libmount: Fix 0x%u usage There's a couple of places which use varients on "0x%u" in format strings; that's almost always wrong - you either want 0x%x or just %u. In libmount's case it's flags, so I'm assuming the intention really is hex. In the ja.po case it's %u in the original msgid. Signed-off-by: Dr. David Alan Gilbert libmount/src/optstr.c | 2 +- po/ja.po | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 43ce3e73114d5c5b4fd766ee0804866cdd2a83ef Author: Sami Kerola Date: Sun Aug 9 13:58:10 2020 +0100 sfdisk: do not free device name too soon [coverity scan] Fixes use after free error. CID: 360798 Signed-off-by: Sami Kerola disk-utils/sfdisk.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c60c65c37eb789410d8b1db1d55fc6c954f48e87 Author: Sami Kerola Date: Sun Aug 9 13:34:00 2020 +0100 login: close() only a file descriptor that is open [coverity scan] CID: 360819 Signed-off-by: Sami Kerola login-utils/login.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit d3e58a8ec974a7aa4cac9ca869d9b02582f8098f Author: Karel Zak Date: Fri Oct 16 11:56:35 2020 +0200 switch_root: fix double close [coverity scan] Up on successful fdopendir(3) file descriptior that will be closed, that happens in recursiveRemove() switch_root(8) function. CID: 360697 Reference: https://pubs.opengroup.org/onlinepubs/9699919799/functions/fdopendir.html Co-Author: Sami Kerola Signed-off-by: Karel Zak Signed-off-by: Sami Kerola sys-utils/switch_root.c | 49 +++++++++++++++++++++++++++---------------------- 1 file changed, 27 insertions(+), 22 deletions(-) commit 7f9e76b4df7a68f09c8fcf4be9b2ac5a1c35956c Author: Sami Kerola Date: Sun Aug 9 12:59:38 2020 +0100 fsck, libblkid: fix printf format string issue [coverity scan] According to coverirty a printf format string contains an unrecognized format specifier (CWE-628). Lets avoid glibc extension "%m" that is same as "%s", strerror(errno). CID: 360699 CID: 360718 Signed-off-by: Sami Kerola disk-utils/fsck.c | 4 ++-- libblkid/src/verify.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) commit 12558a4c47d31938075713c5586cff80eea03569 Author: Sami Kerola Date: Sun Aug 9 12:51:11 2020 +0100 nsenter / switch_root: fix insecure chroot [coverity scan] If a call to chroot is not followed by a call to chdir("/") the chroot jail confinement can be violated. See also CWE-243. CID: 360718 CID: 360800 Reference: http://cwe.mitre.org/data/definitions/243.html Signed-off-by: Sami Kerola sys-utils/nsenter.c | 2 ++ sys-utils/switch_root.c | 6 ++++++ 2 files changed, 8 insertions(+) commit d2ab69ff6154566a378d584fd61c15cde9e576d0 Author: Sami Kerola Date: Sat Aug 8 20:06:42 2020 +0100 login: ensure getutxid() does not use uninitialized variable [coverity scan] Field ut.ut_pid is uninitialized when calling getutxline(). The safest option is to ensure all struct data is initialized in the function. CID: 360793 Signed-off-by: Sami Kerola login-utils/login.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 8df3f8ef8488894975a6d02b9c7e8e67ed4fad69 Author: Sami Kerola Date: Sat Aug 8 20:02:01 2020 +0100 lib/pager: fix improper use of negative value [coverity scan] The close(2) cannot accept a negative number. CID: 360777 Signed-off-by: Sami Kerola lib/pager.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 232fcae81c8fe9128485cd3b070e3e231993b51b Author: Sami Kerola Date: Sat Aug 8 19:45:30 2020 +0100 unshare: fix bad bit shift operation [coverity scan] Variable cap was 32 bits and shifting it by 64 bits resulted to the shift going over a variable boundary. CID: 360799 Signed-off-by: Sami Kerola Signed-off-by: Karel Zak sys-utils/unshare.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit dab057ebd2070acbebc1e9bb730541459a677d57 Author: Sami Kerola Date: Sat Aug 8 19:05:29 2020 +0100 hardlink: fix hardlink pcre leak Signed-off-by: Sami Kerola misc-utils/hardlink.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit afbf8fe2230feb14151d23dfa1eea057da079fa3 Author: Sami Kerola Date: Wed Oct 14 21:22:45 2020 +0100 col: fix --help short option in usage() output The col(1) is using unusual -H as --help short option. The -h is used for --tabs (horizontal tab?) in this implementation. Fixes: 62dee0176a0c8e687d9ff0cb87342a0f8b893aaa Signed-off-by: Sami Kerola text-utils/col.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2ceccca9012a65e9d9e166e130c763bf1b334428 Author: Karel Zak Date: Fri Oct 16 10:59:17 2020 +0200 tests: update sfdisk wipe tests Signed-off-by: Karel Zak tests/expected/sfdisk/wipe-fs-to-dos.err | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 29decc7b374ab522bbcf814c3e0536b090a3aac5 Author: Karel Zak Date: Thu Oct 15 12:04:15 2020 +0200 sfdisk: disable bootbits protection on '--wipe always' Addresses: https://github.com/karelzak/util-linux/issues/1156 Signed-off-by: Karel Zak disk-utils/sfdisk.8 | 14 ++++++++++++-- disk-utils/sfdisk.c | 6 ++++-- 2 files changed, 16 insertions(+), 4 deletions(-) commit e57cbfe0aada02ad8556a3c6dcd6a5018bde9c01 Author: Karel Zak Date: Wed Oct 14 11:33:13 2020 +0200 mkfs.minix: add --lock and LOCK_BLOCK_DEVICE Addresses: https://github.com/karelzak/util-linux/issues/921 Signed-off-by: Karel Zak disk-utils/mkfs.minix.8 | 11 +++++++++++ disk-utils/mkfs.minix.c | 17 +++++++++++++++++ 2 files changed, 28 insertions(+) commit 91f80d9a2a2982bf32509545d170b3489b9592ca Merge: f51c63af4 811351ac9 Author: Karel Zak Date: Wed Oct 14 10:24:25 2020 +0200 Merge branch 'master' of https://github.com/eric-simpson/util-linux * 'master' of https://github.com/eric-simpson/util-linux: do not require sys/syscall.h on non-linux platforms commit f51c63af47ba295f7266289a0e61653cd36838f8 Merge: 017c0308c 9651b677f Author: Karel Zak Date: Wed Oct 14 10:23:20 2020 +0200 Merge branch 'dusty-remove-fstab-condition' of https://github.com/dustymabe/util-linux * 'dusty-remove-fstab-condition' of https://github.com/dustymabe/util-linux: fstrim: remove fstab condition from fstrim.timer commit 811351ac986bd5fe518dc0aa08db91a0b648c4f1 Author: Eric Simpson Date: Tue Oct 13 12:55:05 2020 -0400 do not require sys/syscall.h on non-linux platforms In order to build util-linux on other platforms (such as IBM i), do not require the linux-specific sys/syscall.h. lib/randutils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 017c0308c7d3b0d84bfc11e5863220bc32d640ba Author: Karel Zak Date: Tue Oct 13 18:34:39 2020 +0200 tests: update atari partx tests Signed-off-by: Karel Zak tests/expected/partx/partx-image-atari-icd | 7 ------- tests/expected/partx/partx-image-atari-primary | 2 ++ tests/expected/partx/partx-image-atari-xgm | 10 +++------- 3 files changed, 5 insertions(+), 14 deletions(-) commit 9651b677f1d45fba31997b777ed75ef2eaeebf09 Author: Dusty Mabe Date: Tue Oct 13 11:26:16 2020 -0400 fstrim: remove fstab condition from fstrim.timer In 9995da0 we added support to fstrim to be able to fall back to `/proc/self/mountinfo` if `/etc/fstab` didn't exist, but we forgot to remove the `/etc/fstab` condition from the timer. Let's remove that condition from the timer so we can go back to periodically running `fstrim.service`. sys-utils/fstrim.timer | 1 - 1 file changed, 1 deletion(-) commit 0d061b6e68bc74ce7d61524097b5d0f3becee437 Author: Karel Zak Date: Tue Oct 13 16:29:19 2020 +0200 tests: update atari blkid tests The old images of the atari label are truncated and in-table stored sizes do not match with real images sizes -- libblkid checks it now. I have no idea how to generate ICD format, let's ignore it in tests for now. Signed-off-by: Karel Zak tests/expected/blkid/lowprobe-pt-atari-icd | 8 -------- tests/expected/blkid/lowprobe-pt-atari-primary | 3 +++ tests/expected/blkid/lowprobe-pt-atari-xgm | 10 +++------- tests/ts/blkid/images-pt/atari-icd.img.xz | Bin 1920 -> 0 bytes tests/ts/blkid/images-pt/atari-primary.img.xz | Bin 0 -> 932 bytes tests/ts/blkid/images-pt/atari-xgm.img.xz | Bin 1920 -> 956 bytes 6 files changed, 6 insertions(+), 15 deletions(-) commit 282ceadc3a72fc07dd0388b8880fd751490bb87f Author: Karel Zak Date: Tue Oct 13 16:19:20 2020 +0200 libblkid: make Atari more robust * ignore large disks * check in-table stored device size * check bad sectors list * check partition dimensions against in-table device size Addresses: https://github.com/karelzak/util-linux/issues/1159 Signed-off-by: Karel Zak libblkid/src/partitions/atari.c | 57 +++++++++++++++++++++++++++++++---------- 1 file changed, 43 insertions(+), 14 deletions(-) commit 75cd5e2f281cec16c7da49b65c0f3cadd51749b8 Author: Karel Zak Date: Tue Oct 13 12:55:44 2020 +0200 losetup: increase limit of setup attempts Signed-off-by: Karel Zak libfdisk/src/gpt.c | 3 ++- sys-utils/losetup.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) commit 3ff6fb802de1efafbd90af228f91461691ac190c Author: Karel Zak Date: Tue Oct 13 10:31:42 2020 +0200 losetup: avoid infinite busy loop issue report: if i run the heavy duty test from #16859 a couple of times I can get the loopback layer in the kernel into a state where there's a loopback block device allocated, that you can open, but where both LOOP_CLR_FD and _SET_FD fail with EBUSY. and /dev/loop-control still returns it as the next free one... weird state util-linux losetup when called to allocate a new device then freezes This commit: * restrict number of attempts to 16 * use 200000ms sleep between attempts * add note about non-atomic loop device setup to the man page Reported-by: Lennart Poettering Signed-off-by: Karel Zak sys-utils/losetup.8 | 12 ++++++++++++ sys-utils/losetup.c | 8 ++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) commit a83bea2d3d8ca53a078ab23049b00ec93f6887bc Author: Karel Zak Date: Mon Oct 12 13:19:35 2020 +0200 bash-completion: (lsblk) update columns and fix lsblk --help output Signed-off-by: Karel Zak bash-completion/lsblk | 10 +++++----- misc-utils/lsblk.c | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) commit 7636d906efc4edcccccfeff61ae42d93148d99b7 Author: Karel Zak Date: Mon Oct 12 12:10:33 2020 +0200 lsblk: add --width option Addresses: https://github.com/karelzak/util-linux/issues/1160 Signed-off-by: Karel Zak bash-completion/lsblk | 1 + misc-utils/lsblk.8 | 9 +++++++++ misc-utils/lsblk.c | 14 ++++++++++++-- 3 files changed, 22 insertions(+), 2 deletions(-) commit 0f3c394423d7f7aec8907c48dbdbfd02ec386b0f Author: Karel Zak Date: Fri Oct 9 13:46:35 2020 +0200 lib/sysfs: fix doble free [coverity scan] Signed-off-by: Karel Zak lib/sysfs.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 2cc76d50d7a14bef8e7b07fab11b26c9e49d36a2 Author: Karel Zak Date: Fri Oct 9 13:06:08 2020 +0200 libblkid: fix Atari prober logic Addresses: https://github.com/karelzak/util-linux/issues/1159 Addresses: https://github.com/karelzak/util-linux/issues/1116 Signed-off-by: Karel Zak libblkid/src/partitions/atari.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 8d3f9430c59416e4c1eddc899578158a7a1ed414 Author: Karel Zak Date: Wed Oct 7 13:49:45 2020 +0200 libblkid: use /sys to read all block devices The old implementation uses /proc/partitions where devices are filtered by kernel (missing devices with ext_range=1 and removable devices). The problem with the old implementation is whole-disk heuristic based on device name, order of devices, etc. The new implementation use the same code to read also removable devices. Addresses: https://github.com/karelzak/util-linux/issues/1151 Signed-off-by: Karel Zak lib/sysfs.c | 36 +++++--- libblkid/src/blkidP.h | 2 +- libblkid/src/devname.c | 235 +++++++++++++++++++++---------------------------- 3 files changed, 128 insertions(+), 145 deletions(-) commit 27114b297424ecf1b745b1a71f6d40be0e56e67e Author: Karel Zak Date: Tue Oct 6 15:47:02 2020 +0200 build-sys: use _DATA to install getopt examples * rename the files to getopt-example.* * use automake _DATA rather than _SCRIPT Addresses: https://github.com/karelzak/util-linux/issues/1149 Signed-off-by: Karel Zak misc-utils/Makemodule.am | 6 +++--- misc-utils/{getopt-parse.bash => getopt-example.bash} | 0 misc-utils/{getopt-parse.tcsh => getopt-example.tcsh} | 0 3 files changed, 3 insertions(+), 3 deletions(-) commit f0a7e15e6d5ccd3cb1e6ed9e784e4ca926ac3a46 Author: Karel Zak Date: Tue Oct 6 15:35:09 2020 +0200 docs: add hint about make install-strip and link to Documentation/ Signed-off-by: Karel Zak Documentation/howto-compilation.txt | 11 +++++++++-- README | 9 +++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) commit b21d741c2143644714afc1c2e138c2259d354d7c Author: Karel Zak Date: Tue Oct 6 15:13:29 2020 +0200 login: move proctitle code to login.c The functions are used only by login(1), let's keep the code in login.c only. Signed-off-by: Karel Zak include/Makemodule.am | 1 - include/setproctitle.h | 7 ----- lib/Makemodule.am | 1 - lib/setproctitle.c | 75 -------------------------------------------------- login-utils/login.c | 68 ++++++++++++++++++++++++++++++++++++++++++--- 5 files changed, 64 insertions(+), 88 deletions(-) commit 3836cd2d2116881e494c47a5c47f97826198f2be Author: Karel Zak Date: Tue Oct 6 15:03:45 2020 +0200 lib: add missing headers to .c files Signed-off-by: Karel Zak lib/buffer.c | 7 ++++++- lib/env.c | 7 +++---- lib/fileutils.c | 4 +++- lib/linux_version.c | 4 ++++ lib/pwdutils.c | 4 ++++ lib/swapprober.c | 7 ++++++- lib/timer.c | 3 +++ 7 files changed, 29 insertions(+), 7 deletions(-) commit eee886ba1d72d0a1bb5aa5946d85b6ccaf8c235e Author: Karel Zak Date: Tue Oct 6 13:26:36 2020 +0200 build-sys: exclude GPL from libcommon The library is not distributed and almost all code in this ar(1) archive is Public Domain or LGPL ... but let's avoid any doubts and do not mix non-GPL and GPL code there. Addresses: https://github.com/karelzak/util-linux/issues/1157 Signed-off-by: Karel Zak disk-utils/Makemodule.am | 9 ++++++--- lib/Makemodule.am | 21 ++++++++++++--------- login-utils/Makemodule.am | 3 ++- misc-utils/Makemodule.am | 3 ++- sys-utils/Makemodule.am | 12 ++++++++---- term-utils/Makemodule.am | 3 ++- 6 files changed, 32 insertions(+), 19 deletions(-) commit b412824db4f37cbc8a18024caa687bd24161ca4a Author: Karel Zak Date: Tue Oct 6 13:15:29 2020 +0200 lib/procutils: use Public Domain for this file It's was originally GPL, but all the current code in the file is from me and I don't think it makes sense to use GPL here anymore. We need to use lib/ files in LGPL as well as in GPL binaries, etc. Let's makes things (build-system) less complicated. Signed-off-by: Karel Zak lib/procutils.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit a61955ba1f15bf0a252a03a9abe54c1e02828c2e Author: Karel Zak Date: Mon Oct 5 13:49:16 2020 +0200 lib/loopdev: cosmetic changes to LOOP_CONFIGURE Signed-off-by: Karel Zak include/loopdev.h | 5 ++++- lib/loopdev.c | 20 +++++++++++--------- 2 files changed, 15 insertions(+), 10 deletions(-) commit 558880dd35eae5b468a85c06594b6e9c38018619 Merge: 3fb46f5e7 d5fd456c8 Author: Karel Zak Date: Mon Oct 5 14:51:45 2020 +0200 Merge branch 'frkaya/loopconfig' of https://github.com/franksinankaya/util-linux * 'frkaya/loopconfig' of https://github.com/franksinankaya/util-linux: loopdev: use LOOP_CONFIG ioctl commit 3fb46f5e7bdff350e93ff7301a6abda2ad4e6dec Author: Samanta Navarro Date: Sat Oct 3 11:57:56 2020 +0000 agetty: fix typo in manual page term-utils/agetty.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b648917e0bd3473c5cc26b6d8c5ca93883bfa8b3 Author: Karel Zak Date: Thu Oct 1 14:04:21 2020 +0200 login: use mem2strcpy() rather than rely on printf() The strings from utmp does not have to be terminated. It's seems better to explicitly terminate it than rely on "%.*s" printf() functionality -- printf() man page assumes that "If a precision is given, no null byte need be present", but static analyzers are pretty unhappy with it. Signed-off-by: Karel Zak login-utils/login.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 3cb827ad36652d0cfe7cc85c5beb29a5fe2998ad Author: Karel Zak Date: Thu Oct 1 13:44:44 2020 +0200 hwclock: make tz use more robust [coverity scan] It's probably unnecessary, but let's make it more robust and keep static analyzers happy. Signed-off-by: Karel Zak sys-utils/hwclock-parse-date.y | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bd4739dae2759e1490a0675d57d6421c95bb1b1e Author: Karel Zak Date: Thu Oct 1 13:29:46 2020 +0200 script: don't use strings from user as printf-format [coverity scan] Let's avoid format string vulnerability (TAINTED_STRING). Signed-off-by: Karel Zak term-utils/script.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit f831651e3abe5eef3eaf6c5148268a3358705a8d Author: Karel Zak Date: Thu Oct 1 13:23:34 2020 +0200 lib/buffer: make it robust for static analyzers [coverity scan] Signed-off-by: Karel Zak lib/buffer.c | 3 +++ 1 file changed, 3 insertions(+) commit 865f5f469c694a7edd740846c620e6fe75ec2ca1 Author: Karel Zak Date: Thu Oct 1 11:20:01 2020 +0200 chrt: don't restrict --reset-on-fork, add more info to man page The flag works (= kernel accepts it) for all scheduling policies and sched_getattr() returns the flag for all policies. There is no reason for userspace to be more smart than kernel or hide the flag when it prints sched_getattr()/sched_getscheduler() results. # chrt -v --reset-on-fork --batch 0 /bin/true pid 1315019's new scheduling policy: SCHED_BATCH|SCHED_RESET_ON_FORK # chrt -v --reset-on-fork --fifo 1 /bin/true pid 1315055's new scheduling policy: SCHED_FIFO|SCHED_RESET_ON_FORK # chrt -v --reset-on-fork --deadline --sched-period 10000 0 /bin/true pid 1315182's new scheduling policy: SCHED_DEADLINE|SCHED_RESET_ON_FORK # chrt -v --reset-on-fork --idle 0 /bin/true pid 1315247's new scheduling policy: SCHED_IDLE|SCHED_RESET_ON_FORK # chrt -v --reset-on-fork --rr 1 /bin/true pid 1315275's new scheduling policy: SCHED_RR|SCHED_RESET_ON_FORK # chrt -v --reset-on-fork --other 0 /bin/true pid 1315311's new scheduling policy: SCHED_OTHER|SCHED_RESET_ON_FORK Signed-off-by: Karel Zak schedutils/chrt.1 | 32 ++++++++++++++++++++++++++++---- schedutils/chrt.c | 18 +++++------------- 2 files changed, 33 insertions(+), 17 deletions(-) commit fb4f1da4e040af3f5c8d1467e170894bc46ab324 Author: Karel Zak Date: Thu Oct 1 11:04:29 2020 +0200 chrt: (man) add human-readable names for policies Signed-off-by: Karel Zak schedutils/chrt.1 | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) commit 240634f80caf99590c4acdb432d9db7cbb8902df Author: Karel Zak Date: Thu Oct 1 10:40:27 2020 +0200 chrt: use SCHED_FLAG_RESET_ON_FORK for sched_setattr() Reviewed by many people, used for years (but probably nobody uses SCHED_DEADLINE with reset-on-fork), but we all missed: - sched_setscheduler() uses SCHED_RESET_ON_FORK (0x40000000) - sched_setattr() uses SCHED_FLAG_RESET_ON_FORK (0x01) Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1883013 Signed-off-by: Karel Zak schedutils/chrt.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit d5fd456c88aba4fcf77d35fe38024a8d5c814686 Author: Sinan Kaya Date: Wed Sep 30 03:28:30 2020 +0000 loopdev: use LOOP_CONFIG ioctl Prefer to use the new LOOP_CONFIG ioctl. https://lwn.net/Articles/820408/ Signed-off-by: Sinan Kaya include/loopdev.h | 12 +++++- lib/loopdev.c | 115 ++++++++++++++++++++++++++++++++-------------------- sys-utils/losetup.c | 2 +- 3 files changed, 82 insertions(+), 47 deletions(-) commit b76b4788be25f1fe37c8a39315d9d27c1cea0458 Author: Karel Zak Date: Wed Sep 30 14:57:08 2020 +0200 lscpu: don't use smbios when read snapshots Signed-off-by: Karel Zak sys-utils/lscpu-arm.c | 5 +++-- sys-utils/lscpu.c | 2 +- sys-utils/lscpu.h | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) commit c76f79e9793f4c4ba4a137c1c04bd0e5b4e4558f Author: Karel Zak Date: Wed Sep 30 14:35:33 2020 +0200 lib/buffer: fix end pointer initilaization Signed-off-by: Karel Zak lib/buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1918b4dd9d434242120dc5113183c44dbc2afa8b Author: Karel Zak Date: Wed Sep 30 14:03:15 2020 +0200 build-sys: add missing header file Signed-off-by: Karel Zak include/Makemodule.am | 1 + 1 file changed, 1 insertion(+) commit 598ea3fd305852552bd2f38e7a5f7c332760af93 Author: Karel Zak Date: Wed Sep 30 13:47:35 2020 +0200 col: enable deallocation on exit also for __SANITIZE_ADDRESS__ The macro FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION does not have to enabled in all cases (e.g. default travis-ci, local tests, ...). It seems more robust also check for __SANITIZE_ADDRESS__ too. Addresses: https://github.com/karelzak/util-linux/pull/1115 Signed-off-by: Karel Zak text-utils/col.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit 4b2e840c115ac574ed1b5df7039ebcad78090e31 Author: Karel Zak Date: Wed Sep 30 13:11:01 2020 +0200 libblkid: (gpt) accept tiny devices GPT prober reads 2 first sectors. There is no overhead as we already read begin of the device for another filesystems (like FAT) and we have these sectors already in memory. Addresses: https://github.com/karelzak/util-linux/issues/1147 Signed-off-by: Karel Zak libblkid/src/partitions/gpt.c | 1 - 1 file changed, 1 deletion(-) commit b11e1b7ea12f220d1c9be085d56dbd5ccfc3bce0 Author: Karel Zak Date: Wed Sep 30 12:38:59 2020 +0200 libfdisk: (gpt) reduce number of entries to fit small device The default is 128 partitions (entries in partitions array). The size of the entry is 128 bytes, it means 32 sectors (512-byte) for the array. The default is too large for tiny devices and it seems better to dynamically reduce the number to fix the device size. The reduction is reported to user. Example: $ dd if=/dev/zero of=8-sectors.img count=8 bs=512 $ fdisk 8-sectors.img ... Command (m for help): g Created a new GPT disklabel (GUID: 3DB3EECE-BCCA-6C46-95FA-7E23783BB3B2). The maximal number of partitions is 8 (default is 128). Command (m for help): x Expert command (m for help): p Disk 8-sectors.img: 4 KiB, 4096 bytes, 8 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: gpt Disk identifier: 3DB3EECE-BCCA-6C46-95FA-7E23783BB3B2 First LBA: 4 Last LBA: 4 Alternative LBA: 7 Partition entries LBA: 2 Allocated partition entries: 8 In this case, sectors: 0 - PMBR 1 - GPT header 2-3 - GPT array of partitions (8 entries, 128 bytes each) 4 - partition data 5-6 - backup GPT array of partitions 7 - backup GPT header The smallest image is 6 sectors with 4 entries in array of partitions. Note that Linux kernel has no problem to accept 4K image with 1 512-bytes GPT partition. # losetup -P -f 4K.img # lsblk /dev/loop0 NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT loop0 7:0 0 4K 0 loop └─loop0p1 259:5 0 512B 0 part ... but we need to fix libblkid, it ignores so small devices to probe for GPT :) Addresses: https://github.com/karelzak/util-linux/issues/1147 Signed-off-by: Karel Zak libfdisk/src/gpt.c | 45 +++++++++++++++++++++++++++++++-------------- 1 file changed, 31 insertions(+), 14 deletions(-) commit 134b6296e390c7761730a36b9f3bfb08d289215e Author: Karel Zak Date: Wed Sep 30 11:49:05 2020 +0200 fdisk: always report fdisk_create_disklabel() errors This is fdisk, cfdisk and sfdisk change to inform user about fdisk_create_disklabel() issues. Addresses: https://github.com/karelzak/util-linux/issues/1147 Signed-off-by: Karel Zak disk-utils/cfdisk.c | 20 ++++++++++++++++++-- disk-utils/fdisk-menu.c | 20 ++++++++++++++------ disk-utils/sfdisk.c | 9 +++++---- 3 files changed, 37 insertions(+), 12 deletions(-) commit ffac9652c737b97069732a6a2b1eae8d3db40d57 Author: Karel Zak Date: Wed Sep 30 11:44:03 2020 +0200 libfdisk: (gpt) make sure device is large enough The current code creates GPT header and partitions arrays (with 128 entries ...) although there is no space for all the stuff. This patch forces fdisk_create_disklabel() to return -ENOSPC if the last and first usable LBA calculation is out of device size. Addresses: https://github.com/karelzak/util-linux/issues/1147 Signed-off-by: Karel Zak libfdisk/src/gpt.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) commit e9131920485962f33bd32b492cb93078ee7a3c34 Author: Karel Zak Date: Wed Sep 30 11:37:09 2020 +0200 libblkid: improve debug for /proc/partitions Signed-off-by: Karel Zak libblkid/src/devname.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 62dee0176a0c8e687d9ff0cb87342a0f8b893aaa Author: Karel Zak Date: Tue Sep 29 14:20:57 2020 +0200 col: cleanup usage() and struct col_* - remove extra line about stdout in usage() output - use our macros to print int about --help and --version - remove uint8_t bit-field from struct col_ctl (it seems fragile for future code changes). Signed-off-by: Karel Zak text-utils/col.c | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) commit 18b96d7102e36fd92d4dcf59cf99427543d566a2 Merge: 367c85c47 81c9867d1 Author: Karel Zak Date: Tue Sep 29 13:41:00 2020 +0200 Merge branch 'col-refactor' of https://github.com/kerolasa/util-linux * 'col-refactor' of https://github.com/kerolasa/util-linux: col: replace LINE and CHAR typedefs with structs col: free memory before exit [LeakSanitizer] col: tidy up sources a little bit col: add defaults to switch case clauses col: flip all comparisions to numerical order col: use size_t when dealing with numbers that buffer sizes col: add structure to hold line variables col: add update_cur_line() function col: add handle_not_graphic() function col: initialize variables when they are declared col: move option handling to separate function col: move global variables to a control structure col: use inline function rather than function like define col: use typedef and enum to clarify struct col: remove function prototypes col: add more tests commit 367c85c472869b75eaf770d4be0b360e30710b95 Author: Jeffrey Bastian Date: Tue Sep 29 13:28:16 2020 +0200 lscpu: use SMBIOS tables on ARM for lscpu ARM SBBR (Sever Base Boot Requirements) require SMBIOS tables, and SMBIOS Type 4 describes the CPU manufacturer and model name (among other details). If SMBIOS Type 4 is present, use it to extract these strings. Example output (before and after the patch) on an HP m400, Lenovo HR330A, and HPE Apollo 70: [root@hp-m400 ~]# /usr/bin/lscpu | grep -i -e vendor -e model -e stepping Vendor ID: APM Model: 1 Model name: X-Gene Stepping: 0x0 [root@hp-m400 ~]# ./lscpu | grep -i -e vendor -e model -e stepping Vendor ID: AppliedMicro Model: 1 Model name: X-Gene Stepping: 0x0 [root@lenovo-hr330a ~]# /usr/bin/lscpu | grep -i -e vendor -e model -e stepping Vendor ID: APM Model: 2 Model name: X-Gene Stepping: 0x3 [root@lenovo-hr330a ~]# ./lscpu | grep -i -e vendor -e model -e stepping Vendor ID: Ampere(TM) Model: 2 Model name: eMAG Stepping: 0x3 [root@hpe-apollo-70 ~]# /usr/bin/lscpu | grep -i -e vendor -e model -e stepping Vendor ID: Cavium Model: 1 Model name: ThunderX2 99xx Stepping: 0x1 [root@hpe-apollo-70 ~]# ./lscpu | grep -i -e vendor -e model -e stepping Vendor ID: Cavium Inc. Model: 1 Model name: Cavium ThunderX2(R) CPU CN9980 v2.1 @ 2.20GHz Stepping: 0x1 [kzak@redhat.com: - move dmi_header to lscpu.h - make arm_cpu_smbios() more robust for failed open() and read() - use original arm_cpu_decode() also on failed arm_cpu_smbios()] Signed-off-by: Jeffrey Bastian Signed-off-by: Karel Zak sys-utils/lscpu-arm.c | 120 ++++++++++++++++++++++++++++++++++++++------------ sys-utils/lscpu-dmi.c | 41 +---------------- sys-utils/lscpu.h | 36 +++++++++++++++ 3 files changed, 128 insertions(+), 69 deletions(-) commit a625b32e2c716723a28a49702a02c78274dd3bb6 Author: Shunsuke Nakamura Date: Mon Sep 28 18:46:14 2020 +0900 lscpu: Add FUJITSU aarch64 A64FX cpupart Add an entry for FUJITSU aarch64 part A64FX. I tested it on the FX1000. Signed-off-by: Shunsuke Nakamura sys-utils/lscpu-arm.c | 6 ++++++ 1 file changed, 6 insertions(+) commit f01e54d7a1f5803853c6a482078713ce4b486bcf Author: Lennard Hofmann Date: Mon Sep 21 18:26:00 2020 +0200 column: Deprecate --table-empty-lines in favor of --keep-empty-lines `--table-empty-lines` gives the false impression that the option only applies to table mode. Signed-off-by: Lennard Hofmann Documentation/deprecated.txt | 7 +++++++ bash-completion/column | 2 +- text-utils/column.1 | 8 +++++--- text-utils/column.c | 11 ++++++----- 4 files changed, 19 insertions(+), 9 deletions(-) commit aae0bf77bb49612397f017fcc733a34f4757f863 Author: Lennard Hofmann Date: Mon Sep 21 18:16:20 2020 +0200 column: Optionally keep empty lines in cols/rows mode Signed-off-by: Lennard Hofmann text-utils/column.c | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) commit 83bbda2026607c3447507605d20354f352c8a18f Merge: cc07b5110 1973affe1 Author: Karel Zak Date: Tue Sep 29 12:34:45 2020 +0200 Merge branch 'blockdev' of https://github.com/jwilk-forks/util-linux commit cc07b5110578f4004a2e6e3c71e9824646be045f Merge: ab35743a0 cbe3304bc Author: Karel Zak Date: Tue Sep 29 12:34:08 2020 +0200 Merge branch 'master' of https://github.com/tabraham/util-linux commit ab35743a0f42e94a58f3365177ca1e2eab38b3e1 Author: Karel Zak Date: Tue Sep 29 12:31:06 2020 +0200 libmount: optimize mnt_optstr_apply_flags() We append to the options string in loop there. It seems better to use ul_buffer for this case to avoid duplicate strlen() and reallocs. Signed-off-by: Karel Zak libmount/src/optstr.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) commit 4973aed09db05f41995851fd0a703cc071012d16 Author: Karel Zak Date: Fri Sep 25 17:23:18 2020 +0200 libmount: improve mnt_split_optstr() performance This function is used by fstab (etc.) parser to split VFS, FS and userspace options to separate lists. Unfortunately, the current implementation reallocates the final string always when append a new option to the string. The new implementation pre-allocate memory for the final string according to source string length (1/2 of the original string). This dramatically reduces realloc() calls. For example oss-fuzz (./test_mount_fuzz) uses 800K input string, old version needs 28s to parse the string, new version 500ms. Addresses: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=23861 Signed-off-by: Karel Zak libmount/src/optstr.c | 184 ++++++++++++++++++++++++-------------------------- 1 file changed, 89 insertions(+), 95 deletions(-) commit 0a9939816c1d6c57200f99432e38bf1c425a77ea Author: Karel Zak Date: Fri Sep 25 17:21:57 2020 +0200 lib/buffer: add simple grow-able buffer The goal is to use it in libmount when generate options strings and in libsmartcols to replace libscols_buffer. Signed-off-by: Karel Zak include/buffer.h | 28 ++++++++++ lib/Makemodule.am | 5 ++ lib/buffer.c | 154 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 187 insertions(+) commit 1973affe18ee487c7b2720608332027ebaba5f64 Author: Jakub Wilk Date: Sat Sep 26 18:15:42 2020 +0200 blockdev: fix man page formatting Signed-off-by: Jakub Wilk disk-utils/blockdev.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 40681c41ce16fb70db0648a264dbdd64a485a892 Author: Karel Zak Date: Fri Sep 25 10:25:25 2020 +0200 libmount: (optstr) improve default initialization Don't use memset() if we can use compiler for the first initialization. Signed-off-by: Karel Zak libmount/src/optstr.c | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) commit cbe3304bc43b3fceb06fb6e5dd822bb59abf1b84 Author: Thomas Abraham Date: Thu Sep 24 14:52:33 2020 -0400 lscpu: avoid segfault on PowerPC systems with valid hardware configurations ntypes greater than 1 is valid in some hardware configurations, and an assert() on the value isn't necessary or very future proof sys-utils/lscpu.c | 2 -- 1 file changed, 2 deletions(-) commit b95752ad206222dfaa854a01c6106c89d2c607a2 Author: Karel Zak Date: Thu Sep 24 09:56:03 2020 +0200 lsblk: fix SCSI_IDENT_SERIAL It seems sg3_utils does not use ID_ prefix like other udev stuff. Addresses: https://github.com/karelzak/util-linux/issues/1143 Signed-off-by: Karel Zak misc-utils/lsblk-properties.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1e89f4fe18f9edfe2307751393a93373c7f100de Author: Karel Zak Date: Wed Sep 23 16:54:34 2020 +0200 su: remove useless assignment Address: https://github.com/karelzak/util-linux/issues/1145 Signed-off-by: Karel Zak login-utils/su-common.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit de6c2a4aec140e6086e278688d97f4655ced1a9a Author: Karel Zak Date: Wed Sep 23 15:41:05 2020 +0200 lsblk: read ID_SCSI_IDENT_SERIAL if available This SERIAL comes from sg3_utils. Addresses: https://github.com/karelzak/util-linux/issues/1143 Signed-off-by: Karel Zak misc-utils/lsblk-properties.c | 1 + 1 file changed, 1 insertion(+) commit 5362bfa3ea98062c92ae24c59835df4529d40b0c Author: nl6720 Date: Mon Sep 21 18:20:16 2020 +0300 libfdisk: add "Linux /usr" and "Linux /usr verity" GPT partition types See https://systemd.io/DISCOVERABLE_PARTITIONS/ and https://github.com/systemd/systemd/pull/17101 . Move ARM after x86-64, so that x86 and x86-64 are next to one another. Signed-off-by: nl6720 include/pt-gpt-partnames.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit c8baef03c6fbc71fd54fe3ca329764bbbb1a7cf3 Author: Karel Zak Date: Mon Sep 21 13:34:06 2020 +0200 tests: update script(1) return code Signed-off-by: Karel Zak tests/expected/script/options-size | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8deb45fc5682c3ac0903a3e2b947ceedcc4ab7d6 Author: Karel Zak Date: Mon Sep 21 12:51:02 2020 +0200 script: kill child process on error The recent change in code improves main-pool on error, but we need to kill child process if it still running to avoid hang up in next waitpid(). Signed-off-by: Karel Zak lib/pty-session.c | 6 ++++++ term-utils/script.c | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) commit 5c6903b159e389a4c51327f78300a81ddfede1e0 Author: Soumendra Ganguly Date: Tue Sep 15 09:14:59 2020 -0500 script: improve I/O return code checks Handle error based on return code of handle_io() and handle_signal(). Keep SIGTTIN unblocked during read() in handle_io(). Signed-off-by: Soumendra Ganguly lib/pty-session.c | 67 ++++++++++++++++++++++++++++++------------------------- 1 file changed, 37 insertions(+), 30 deletions(-) commit 39d16258a1860dda5e2be1cda9de2ca011496381 Author: Karel Zak Date: Tue Sep 15 09:01:13 2020 +0200 docs: add note about github Signed-off-by: Karel Zak Documentation/howto-contribute.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 23fcac045711da524682c0f23ea8f5ba4d15ad15 Author: Gero Treuner Date: Thu Sep 10 21:43:03 2020 +0200 fallocate: fix --dig-holes at end of files I discovered that making a file sparse with "fallocate -d filename" fails on the last block of a file, because - usually being partial - the system call only zeroes that part instead of deallocating the block. See man fallocate(2) - section "Deallocating file space". The expected call is punching the whole block beyond eof, which doesn't change the file length because of flag FALLOC_FL_KEEP_SIZE. Signed-off-by: Karel Zak sys-utils/fallocate.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 93b23ce42068ec03e253421bf8e156b5d960c158 Merge: 049859a6d 793378dfc Author: Karel Zak Date: Mon Sep 14 10:49:28 2020 +0200 Merge branch 'addCarmelLscpu' of https://github.com/tomoaki0705/util-linux * 'addCarmelLscpu' of https://github.com/tomoaki0705/util-linux: add Carmel from NVIDIA commit 81c9867d18af4a7601c1239c0c4c692413a0a1f9 Author: Sami Kerola Date: Sat Sep 12 19:18:36 2020 +0100 col: replace LINE and CHAR typedefs with structs Karel Zak said; typedef is evil, see reference. I don't know are they evil, but it is fair comment structs without hiding what is the data type is easier and quicker understand when reading the code. Reference: https://github.com/karelzak/util-linux/pull/1115#discussion_r481971317 Signed-off-by: Sami Kerola text-utils/col.c | 75 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 38 insertions(+), 37 deletions(-) commit 86c6d3ff68f514112e28f2c9d13b5e64ea580367 Author: Sami Kerola Date: Sat Aug 8 16:49:09 2020 +0100 col: free memory before exit [LeakSanitizer] Clean up before exit to satisfy LeakSanitizer tests run by travis. Signed-off-by: Sami Kerola text-utils/col.c | 48 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) commit 3375fd9ccf0edaafc58f38ae8059e6627dc3ba94 Author: Sami Kerola Date: Sun Jun 28 17:59:59 2020 +0100 col: tidy up sources a little bit Signed-off-by: Sami Kerola text-utils/col.c | 75 +++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 47 insertions(+), 28 deletions(-) commit 12234f462aff6df226ce21ef1b625a8a196c588d Author: Sami Kerola Date: Sun Jun 28 17:08:47 2020 +0100 col: add defaults to switch case clauses Signed-off-by: Sami Kerola text-utils/col.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit e15ed08756ffb05c7e195b895a79c6908b66ca9b Author: Sami Kerola Date: Sun Jun 28 13:24:28 2020 +0100 col: flip all comparisions to numerical order Left side is always smaller or equal to right side. This makes reading code quicker when not having to constantly swap where is the greater value. Signed-off-by: Sami Kerola text-utils/col.c | 56 +++++++++++++++++++++++++++++++------------------------- 1 file changed, 31 insertions(+), 25 deletions(-) commit 8f36d39294ddd0e5985ff3bc90fd794ebc69388b Author: Sami Kerola Date: Sun Jun 28 12:54:24 2020 +0100 col: use size_t when dealing with numbers that buffer sizes Signed-off-by: Sami Kerola text-utils/col.c | 84 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 42 insertions(+), 42 deletions(-) commit 0148d75bcd1503bf2510e8866c062b31ed97d46e Author: Sami Kerola Date: Sun Jun 28 12:40:13 2020 +0100 col: add structure to hold line variables Signed-off-by: Sami Kerola text-utils/col.c | 152 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 77 insertions(+), 75 deletions(-) commit 812e849eacaf13ca40aae9d367572b8e2dd11eb0 Author: Sami Kerola Date: Sun Jun 28 12:20:03 2020 +0100 col: add update_cur_line() function Signed-off-by: Sami Kerola text-utils/col.c | 143 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 75 insertions(+), 68 deletions(-) commit 6591d3bd6b06ff3449197d96daa3a2ddf086556b Author: Sami Kerola Date: Sat Jun 27 20:50:55 2020 +0100 col: add handle_not_graphic() function Signed-off-by: Sami Kerola text-utils/col.c | 125 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 67 insertions(+), 58 deletions(-) commit d38392a1e84d5693ddec240d3f1b2a99c543df58 Author: Sami Kerola Date: Sat Jun 27 19:44:46 2020 +0100 col: initialize variables when they are declared Signed-off-by: Sami Kerola text-utils/col.c | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) commit 9f60a692170d3ada3f9d5d4e8399f4e975aaf208 Author: Sami Kerola Date: Sat Jun 27 19:32:25 2020 +0100 col: move option handling to separate function Mark --tabs and --spaces mutually exclusive in same go. Signed-off-by: Sami Kerola text-utils/col.c | 75 +++++++++++++++++++++++++++++++++----------------------- 1 file changed, 45 insertions(+), 30 deletions(-) commit 31a61cbedc44d45051382dce6b007febd2ecee42 Author: Sami Kerola Date: Sat Jun 27 19:23:29 2020 +0100 col: move global variables to a control structure Signed-off-by: Sami Kerola text-utils/col.c | 128 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 66 insertions(+), 62 deletions(-) commit fd8270b4f2401ea155439b405316139063270111 Author: Sami Kerola Date: Sat Jun 27 19:03:33 2020 +0100 col: use inline function rather than function like define Signed-off-by: Sami Kerola text-utils/col.c | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) commit 6c5a421e09f628e7bc1156f8324ed7140ddf4434 Author: Sami Kerola Date: Sat Jun 27 18:57:48 2020 +0100 col: use typedef and enum to clarify struct Signed-off-by: Sami Kerola text-utils/col.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit f5ab4ee3755f26cac041795bdfc0d30fc2882678 Author: Sami Kerola Date: Sat Jun 27 18:40:44 2020 +0100 col: remove function prototypes Signed-off-by: Sami Kerola text-utils/col.c | 375 +++++++++++++++++++++++++++---------------------------- 1 file changed, 184 insertions(+), 191 deletions(-) commit b97981a7075e551bb5c3badf73e73241882e8207 Author: Sami Kerola Date: Fri Jun 26 22:24:25 2020 +0100 col: add more tests With these tests coverage is about 89%. The ts_run is added to ensure ASAN_OPTIONS and UBSAN_OPTIONS are set correctly when the tests run. Reference: https://github.com/karelzak/util-linux/pull/1115#issuecomment-670140224 Signed-off-by: Sami Kerola tests/expected/col/io | 238 +++++++++++++++++++++++++++++++++++++++++++++ tests/expected/col/options | 9 ++ tests/ts/col/io | 71 ++++++++++++++ tests/ts/col/multibyte | 3 +- tests/ts/col/newlines | 10 +- tests/ts/col/options | 39 ++++++++ 6 files changed, 364 insertions(+), 6 deletions(-) commit 793378dfc9cb3b28fdae1d400d8e115aca834ef1 Author: Tomoaki Teshima Date: Fri Sep 11 22:45:54 2020 +0900 add Carmel from NVIDIA sys-utils/lscpu-arm.c | 1 + 1 file changed, 1 insertion(+) commit 049859a6df0b2f0d2a7dcb3a7b13f18bfbc675a9 Author: Hans Holmberg Date: Fri Sep 11 10:47:23 2020 +0200 blkzone: add report capacity command Add a command that answers the the question: "How much data can I store on this device/in this range of zones?" Implement this by summing up zone capacities over the given range. Signed-off-by: Hans Holmberg sys-utils/blkzone.8 | 7 +++++++ sys-utils/blkzone.c | 28 ++++++++++++++++++++-------- 2 files changed, 27 insertions(+), 8 deletions(-) commit df09e21c244fd438c73aad12720993c6536ad009 Author: Thayne McCombs Date: Fri Sep 4 02:33:54 2020 -0600 login: add option to not reset username on each attempt [kzak@redhat.com: - use different message on failed password] Addresses: https://github.com/karelzak/util-linux/pull/1138 Addresses: https://github.com/karelzak/util-linux/issues/6 Signed-off-by: Karel Zak login-utils/login.1 | 9 +++++++++ login-utils/login.c | 11 ++++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) commit 701f0385a0a32b4f045838e4e924321feabe859f Author: Karel Zak Date: Thu Sep 10 12:54:14 2020 +0200 mkswap: add --verbose, reduce extents check output We do not need to provide details in the default output. It seems better to hide it behind --verbose to be user-friendly. Signed-off-by: Karel Zak bash-completion/mkswap | 2 +- disk-utils/mkswap.8 | 5 ++++ disk-utils/mkswap.c | 80 +++++++++++++++++++++++++++++--------------------- 3 files changed, 53 insertions(+), 34 deletions(-) commit e270d980ca1382e950386cf15970b9ff57f7ed79 Author: Karel Zak Date: Thu Sep 10 11:26:18 2020 +0200 mkswap: cleanup usage() - don't use one string for all --help output - use USAGE_* macros Signed-off-by: Karel Zak disk-utils/mkswap.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) commit 199cd674adc89d3297e0ca346078443ce6da1660 Author: Karel Zak Date: Wed Sep 9 15:50:39 2020 +0200 mkswap: remove unnecessary on FS_IOC_FIEMAP This is something user cannot fix and extents check is nothing critical. Signed-off-by: Karel Zak disk-utils/mkswap.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 29b68b9c7b414882dbe1e2e94b3e1b00c3d7cc57 Author: Karel Zak Date: Wed Sep 9 15:37:27 2020 +0200 mkswap: improve extents check - remove unknown extent type (kernel does not care about it too) - fix last_logical use in messages - improve warning for DELALLOC extents - check for hole at the end of the file Reported-by: Lukas Czerner Signed-off-by: Karel Zak disk-utils/mkswap.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) commit c90a8f1a3cdf116e050708098f0188349b55abc3 Author: Karel Zak Date: Wed Sep 9 14:50:02 2020 +0200 lsblk: show all empty, except loopdevs This patch improves the previous commit to accept also another empty devices. Addresses: https://github.com/karelzak/util-linux/issues/1118 Signed-off-by: Karel Zak misc-utils/lsblk.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 14bb8e3ca6abaab9a584413d2dd74a6eb2cc18d0 Author: Karel Zak Date: Wed Sep 9 12:18:07 2020 +0200 lsblk: ignore only loopdevs without backing file * do not ignore all empty devices, we need more smart solution * ignore only loop devices without backing file, for example: # touch img # losetup -f img losetup: img: Warning: file is smaller than 512 bytes; the loop device may be useless or invisible for system tools. - old version display nothing - new version: # lsblk /dev/loop0 NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT loop0 7:0 0 0B 0 loop Addresses: https://github.com/karelzak/util-linux/issues/1118 Signed-off-by: Karel Zak include/loopdev.h | 1 + lib/loopdev.c | 11 +++++++++++ misc-utils/lsblk.c | 12 +++++++++++- 3 files changed, 23 insertions(+), 1 deletion(-) commit bb6c51a650fe3469aee819016826c4f2ed2c97c6 Author: Karel Zak Date: Wed Sep 9 12:00:10 2020 +0200 lsblk: print zero rather than empty SIZE Addresses: https://github.com/karelzak/util-linux/issues/1118 Signed-off-by: Karel Zak misc-utils/lsblk.c | 2 -- 1 file changed, 2 deletions(-) commit 549e8c91ff3ae06e0ffe0e9ff9bef7077c0bbd48 Merge: 50a531f66 9c8487318 Author: Karel Zak Date: Wed Sep 9 11:23:48 2020 +0200 Merge branch 'cramfs-use-prepared-test-data' of https://github.com/masami256/util-linux commit 50a531f667c31d54fbb920d394e6008df89ae636 Merge: 195025c29 73b193f8d Author: Karel Zak Date: Wed Sep 9 11:13:34 2020 +0200 Merge branch 'nosymfollow' of https://github.com/rzwisler/util-linux * 'nosymfollow' of https://github.com/rzwisler/util-linux: mount: Add support for "nosymfollow" mount option. commit 195025c29e2ae7b1b203fb18d57509f675e924cd Author: Karel Zak Date: Wed Sep 9 11:00:40 2020 +0200 mkswap: check for holes and unwanted extentd in file Let's make mkswap(8) more user-friend and report possible swapon issues already when user initialize a swap file. The extents check produces warnings, no exit with error. # dd if=/dev/zero of=img count=100 bs=1MiB # chmod 0600 img # fallocate --dig-hole --offset 64520192 --length 1MiB img   # fallocate --dig-hole --offset 84520960 --length 1MiB img  # ./mkswap img mkswap: extents check failed: - hole detected at offset 64520192 (size 1048576 bytes) - hole detected at offset 84520960 (size 1048576 bytes) file img can be rejected by kernel on swap activation. Setting up swapspace version 1, size = 100 MiB (104853504 bytes) no label, UUID=92091112-26b5-47aa-a02a-592e52528319 It checks for holes in the file, and for unknown, inline, shared and deallocated extents. Addresses: https://github.com/karelzak/util-linux/issues/1120 Signed-off-by: Karel Zak configure.ac | 1 + disk-utils/mkswap.c | 96 +++++++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 95 insertions(+), 2 deletions(-) commit 9c84873186b1f0e5b70ebff6895d155b676a0cb0 Author: Masami Ichikawa Date: Tue Sep 8 14:19:32 2020 +0900 tests: mkfs-endianness test uses prepared test data Commit 7b54f05d6b7124c23bff3bc1b8310231c8a2e131 added iflag=fullblock option, it works fine with coreutils's dd but macOS's dd doesn't support iflag option then test failed on macOS[1]. This commit added prepared test data for test to not use dd command to avoid dd command difference. tested on raspberry pi3 $ sudo sh -c 'for i in $(seq 1 500); do taskset -c 0 ./ts/cramfs/mkfs-endianness ; done' | grep FAILED | wc -l 0 tested on macOS $ sudo sh -c 'for i in $(seq 1 500); do ./ts/cramfs/mkfs-endianness ; done' | grep FAILED | wc -l 0 [1]https://travis-ci.org/github/karelzak/util-linux/jobs/723642222#L3907 Signed-off-by: Masami Ichikawa tests/ts/cramfs/mkfs-endianness | 8 +- tests/ts/cramfs/mkfs-endianness_testdata_a | 8 ++ tests/ts/cramfs/mkfs-endianness_testdata_b | 217 +++++++++++++++++++++++++++++ 3 files changed, 229 insertions(+), 4 deletions(-) commit 933f095feb6c695e02c9989d091c76cc1b8d6d4c Author: yangzz-97 <70520104+yangzz-97@users.noreply.github.com> Date: Sun Sep 6 18:30:48 2020 +0800 libfdisk: reset context FD on error When the query disk fails, reset cxt->dev_fd. Addresses: https://github.com/karelzak/util-linux/pull/1137 Addresses: https://github.com/karelzak/util-linux/issues/1131 Signed-off-by: Karel Zak libfdisk/src/context.c | 1 + 1 file changed, 1 insertion(+) commit f29a2cfbe18ecc165f188b2df572be01a74e1ec5 Author: Karel Zak Date: Mon Sep 7 11:52:13 2020 +0200 libsmartcols: don't print empty output on empty table in JSON old version: $ findmnt --json --type foo $ new version: $ findmnt --json --type foo { "filesystems": [ ] } Addresses: https://github.com/karelzak/util-linux/issues/1136 Signed-off-by: Karel Zak libsmartcols/src/print-api.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 73b193f8da0437d1b399903cf0f8e4c827adc03c Author: Mattias Nissler Date: Thu Nov 17 14:47:51 2016 +0100 mount: Add support for "nosymfollow" mount option. This adds support for the "nosymfollow" mount option, which indicates that symlinks should not be traversed on the mount this option is applied to. Also update the mount(8) man page with information about this option. Signed-off-by: Mattias Nissler Signed-off-by: Ross Zwisler libmount/src/context_mount.c | 2 ++ libmount/src/libmount.h.in | 3 +++ libmount/src/optmap.c | 4 ++++ sys-utils/mount.8 | 10 ++++++++++ 4 files changed, 19 insertions(+) commit f9de18f54a7b78b4617831c6154beda54fb8e23c Merge: f4987e082 7b54f05d6 Author: Karel Zak Date: Thu Sep 3 10:57:13 2020 +0200 Merge branch 'cramfs-test-fix' of https://github.com/masami256/util-linux * 'cramfs-test-fix' of https://github.com/masami256/util-linux: tests: mkfs-endianness test use iflag=fullblock to fill block completely with string commit 7b54f05d6b7124c23bff3bc1b8310231c8a2e131 Author: Masami Ichikawa Date: Thu Sep 3 10:04:36 2020 +0900 tests: mkfs-endianness test use iflag=fullblock to fill block completely with string When run mkfs-endianness test on lowend machine, sometimes dd didn't fill block with string then test failed. So, it's nice to add iflag=fullblock option to fill a block with string read from stdin. Tested on Raspberry Pi 3 B+(using 1core to simulate lowend environment) with iflag=fullblock option didn't get test failure. Without iflag=fullblock option. $ sudo sh -c 'for i in $(seq 1 500); do taskset -c 0 ./ts/cramfs/mkfs-endianness ; done' | grep FAILED | wc -l 49 With iflag=fullblock option. $ sudo sh -c 'for i in $(seq 1 500); do taskset -c 0 ./ts/cramfs/mkfs-endianness ; done' | grep FAILED | wc -l 0 Signed-off-by: Masami Ichikawa tests/ts/cramfs/mkfs-endianness | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f4987e082bb551c2d28145b578fe4a620dcf9e52 Author: Sami Kerola Date: Fri Aug 28 20:59:57 2020 +0100 libmount: do not use pointer as an integer value Fix couple "initialization of ‘long int’ from ‘void *’ makes integer from pointer without a cast" warnings. Signed-off-by: Sami Kerola libmount/python/fs.c | 2 +- libmount/python/tab.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 6932a1103513fcd29ee11047515001187d58811f Author: Karel Zak Date: Wed Sep 2 11:10:18 2020 +0200 lsblk: fix -T optional argument Addresses: https://github.com/karelzak/util-linux/issues/1132 Signed-off-by: Karel Zak misc-utils/lsblk.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 42fa381b9ddfb17a347d50923b2741fdd48bc300 Author: Karel Zak Date: Tue Sep 1 11:50:11 2020 +0200 pg: fix wcstombs() use The size (3rd) argument should be ignored if the 1st *dest is NULL, but it seems gcc & glibc headers are more pedantic now: ext-utils/pg.c:456:13: error: argument 1 is null but the corresponding size argument 3 value is 2048 [-Werror=nonnull] Signed-off-by: Karel Zak text-utils/pg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 57898c3a7ee8fc5933cddd4526bb3980bef85a02 Author: Karel Zak Date: Tue Sep 1 10:15:14 2020 +0200 libmount: remove read-mountinfo workaround This workaround has been introduced by http://github.com/karelzak/util-linux/commit/e4925f591c1bfb83719418b56b952830d15b77eb And originally requested by https://github.com/systemd/systemd/issues/10872 It seems we do not need it anymore as the problem should be fixed in kernel since 5.8 (kernel commit 9f6c61f96f2d97cbb5f7fa85607bc398f843ff0f). Note that the libmount solution is very expensive as it repeats read() many times (until we get consistent result) if kernel is busy with mount table modification. This behaviour makes events management in systemd (or other places) pretty difficult as read mountinfo takes time on busy systems. Addresses: https://github.com/systemd/systemd/pull/16537 Signed-off-by: Karel Zak configure.ac | 1 - libmount/src/mountP.h | 2 - libmount/src/tab_parse.c | 87 +++++-------------------- libmount/src/utils.c | 166 ----------------------------------------------- 4 files changed, 15 insertions(+), 241 deletions(-) commit a3a0cc42afaa56dcc384282f0985421ea795f523 Merge: fdac67ae1 0c4bf7913 Author: Karel Zak Date: Tue Sep 1 09:45:32 2020 +0200 Merge branch 'master' of https://github.com/itsthem/util-linux * 'master' of https://github.com/itsthem/util-linux: her -> their her -> their him -> them him -> them his -> their he -> they he -> they he -> they commit fdac67ae14c3f780f1f3d41118611723a9d945eb Author: Rosen Penev Date: Sat Aug 29 21:55:58 2020 -0700 hwclock: fix SYS_settimeofday fallback turns out this is subtly broken. musl 1.2.x for 64-bit architectures defines __NR_settimeofday but not for 32-bit ones. For 32-bit, it defines a _time32 variant. sys-utils/hwclock.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 0c4bf7913c6e2e7b95ed9a4c8ec48164fd80acb1 Author: leeceeksdee <70331744+leeceeksdee@users.noreply.github.com> Date: Fri Aug 28 19:19:23 2020 +0200 her -> their login-utils/login.1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c9c7de79325c82fc4051524c9c52528a304307d7 Author: leeceeksdee <70331744+leeceeksdee@users.noreply.github.com> Date: Fri Aug 28 19:18:33 2020 +0200 her -> their login-utils/login.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 087203733d296c6d1d88b2090a320f4de2dc2540 Author: leeceeksdee <70331744+leeceeksdee@users.noreply.github.com> Date: Fri Aug 28 19:17:00 2020 +0200 him -> them sys-utils/umount.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3a03903011b6c9f1ca07c799a1f015e3fe6d2e00 Author: leeceeksdee <70331744+leeceeksdee@users.noreply.github.com> Date: Fri Aug 28 19:16:33 2020 +0200 him -> them sys-utils/mount.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 40d249fca0f5abd525ea97edc3f2097308434da6 Author: leeceeksdee <70331744+leeceeksdee@users.noreply.github.com> Date: Fri Aug 28 19:15:34 2020 +0200 his -> their login-utils/login.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d15a6c22cf70b42f04a69301e1dff97100693fb8 Author: leeceeksdee <70331744+leeceeksdee@users.noreply.github.com> Date: Fri Aug 28 19:12:44 2020 +0200 he -> they sys-utils/hwclock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c2fcf2f79761f4f7bd8d94bee2fc9baafb985607 Author: leeceeksdee <70331744+leeceeksdee@users.noreply.github.com> Date: Fri Aug 28 19:11:45 2020 +0200 he -> they login-utils/login.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3ba9018b8502c1d28e80bb8eea0a4dfe3d8c2934 Author: leeceeksdee <70331744+leeceeksdee@users.noreply.github.com> Date: Fri Aug 28 19:11:02 2020 +0200 he -> they term-utils/ttymsg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 76054e152730637e97ebccedf3395d7db9b19a24 Author: Michael Kerrisk (man-pages) Date: Thu Aug 27 17:12:45 2020 +0200 Manual pages: blockdev.8, sfdisk.8: typo fixes Fix a couple of typos that I introduced. Signed-off-by: Michael Kerrisk (man-pages) disk-utils/blockdev.8 | 2 +- disk-utils/sfdisk.8 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 75ccd75a2fa1194c6415c47b0024a438e26f1ad7 Author: Soumendra Ganguly Date: Thu Aug 27 11:50:25 2020 +0200 script: cleanup --echo Permanently turn off current stdin ECHO when it is a terminal and enable setting slave ECHO instead. Fix other minor typos, update documentation. [kzak@redhat.com: - remove irrelevant changes - keep --echo argument unchanged] Signed-off-by: Karel Zak include/pty-session.h | 2 +- lib/pty-session.c | 30 +++++++++++++++--------------- term-utils/script.1 | 16 +++++++++++----- term-utils/script.c | 9 ++------- 4 files changed, 29 insertions(+), 28 deletions(-) commit d3f21dca1e4612cfd90e7a06dfabd6c767736ae6 Author: Karel Zak Date: Tue Aug 25 14:23:28 2020 +0200 bash-completion: add column --table-columns-limit Signed-off-by: Karel Zak bash-completion/column | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ea160a2befce92c6e2cb07831ba84a253317327c Author: Karel Zak Date: Tue Aug 25 14:15:36 2020 +0200 column: add --table-columns-limit $ echo -e 'AAA:BBB:CCC:DDD\n' | ./column -t -s ':' AAA BBB CCC DDD $ echo -e 'AAA:BBB:CCC:DDD\n' | ./column -t -s ':' -l 2 AAA BBB:CCC:DDD $ echo -e 'AAA:BBB:CCC:DDD\n' | ./column -t -s ':' -l 3 AAA BBB CCC:DDD Addresses: https://github.com/karelzak/util-linux/issues/1124 Signed-off-by: Karel Zak text-utils/column.1 | 4 ++++ text-utils/column.c | 32 +++++++++++++++++++++++++------- 2 files changed, 29 insertions(+), 7 deletions(-) commit 816c5754f25641b496841f41cd2723cc6c447b7a Merge: f1f48270c bc743b355 Author: Karel Zak Date: Tue Aug 25 11:29:16 2020 +0200 Merge branch 'fix-sfdisk-json' of https://github.com/adriaandegroot/util-linux * 'fix-sfdisk-json' of https://github.com/adriaandegroot/util-linux: Generate valid JSON if partition table is empty commit f1f48270c92e6b14a5b4b0ea68d53c2f5fc8597c Author: Karel Zak Date: Tue Aug 25 10:48:29 2020 +0200 mount, umount: restore environ[] after suid drop The commands mount and umount sanitize environment variables as it works with suid permissions by default. Since v2.36 it's possible that the commands drop the permissions and continue as regular user. It seems we also need to restore the original environ to keep things consistent for users (e.g. HOME=). The implementation is pretty simple -- it keeps in memory removed variables and use it after switch to non-suid mode. Addresses: https://github.com/karelzak/util-linux/issues/880 Signed-off-by: Karel Zak sys-utils/mount.c | 12 +++++++++++- sys-utils/umount.c | 12 +++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) commit e113093ce94ac1145f9986e072746e8b6e8d0da9 Author: Karel Zak Date: Tue Aug 25 10:43:07 2020 +0200 lib/env: add function to save and restore unwanted variables Signed-off-by: Karel Zak include/env.h | 7 ++++ lib/env.c | 103 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 107 insertions(+), 3 deletions(-) commit bc743b355c5f5f45919f9c95c26f30df193343aa Author: Adriaan de Groot Date: Mon Aug 24 23:30:35 2020 +0200 Generate valid JSON if partition table is empty When the partition table is present **but** empty, the existing code would output fields followed by a `,` , on the assumption that the list of partitions would follow. But if the list of partitions is empty, it is skipped, leading to output like this: ``` { "partitiontable": { "label":"gpt", "id":"1F9E80D9-DD78-024F-94A3-B61EC82B18C8", "device":"/dev/sdb", "unit":"sectors", "firstlba":2048, "lastlba":30949342, "sectorsize":512, } } ``` Note the `512,` on the *sectorsize* line. This is invalid JSON for some parsers, which choke on it. Avoid this, by checking when outputting the last separator: if there's no table, or there is a table but it is empty, then just put a newline, otherwise use the old path of comma-newline and assume there's going to be a list of partitions after. libfdisk/src/script.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 80a54e2b3e4ddfb89e4cdfbedc659c6fc5c9e598 Author: nl6720 Date: Sat Aug 22 15:16:27 2020 +0300 libfdisk: add systemd-homed user's home GPT partition type See https://systemd.io/HOME_DIRECTORY/ . Additionally update the URL of the Boot Loader Specification. Signed-off-by: nl6720 include/pt-gpt-partnames.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 72f783d0ea5297e3fab22a93574aa63f421c5f69 Author: Karel Zak Date: Mon Aug 17 16:33:59 2020 +0200 libmount: fix tab parser for badly terminated lines Signed-off-by: Karel Zak libmount/src/tab_parse.c | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) commit d7720587f5863dd3488638ea9593bd29b4dd60ff Author: Evgeny Vereshchagin Date: Thu Aug 13 05:20:14 2020 +0000 tests: cover the code parsing comments It seems to be failing with ``` AddressSanitizer:DEADLYSIGNAL ================================================================= ==13==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x00000055f428 bp 0x7ffc3743a170 sp 0x7ffc3743a080 T0) ==13==The signal is caused by a WRITE memory access. ==13==Hint: address points to the zero page. SCARINESS: 10 (null-deref) #0 0x55f428 in mnt_table_parse_next /src/util-linux/libmount/src/tab_parse.c:587:6 #1 0x55c200 in __table_parse_stream /src/util-linux/libmount/src/tab_parse.c:737:8 #2 0x55be38 in mnt_table_parse_stream /src/util-linux/libmount/src/tab_parse.c:809:8 #3 0x5511ff in LLVMFuzzerTestOneInput /src/util-linux/libmount/src/fuzz.c:21:16 #4 0x458a31 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:558:15 #5 0x458175 in fuzzer::Fuzzer::RunOne(unsigned char const*, unsigned long, bool, fuzzer::InputInfo*, bool*) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:470:3 #6 0x45a117 in fuzzer::Fuzzer::ReadAndExecuteSeedCorpora(std::__Fuzzer::vector >&) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:770:7 #7 0x45a319 in fuzzer::Fuzzer::Loop(std::__Fuzzer::vector >&) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:799:3 #8 0x44a055 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:846:6 #9 0x471bf2 in main /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerMain.cpp:19:10 #10 0x7fe3bd93b83f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2083f) #11 0x41f208 in _start (/out/test_mount_fuzz+0x41f208) DEDUP_TOKEN: mnt_table_parse_next--__table_parse_stream--mnt_table_parse_stream ``` libmount/src/fuzz.c | 1 + 1 file changed, 1 insertion(+) commit 93bf606312eb68b9e18a79d72eb0fbe3129c043e Merge: 91a3e3748 5679c7bbd Author: Karel Zak Date: Fri Aug 14 11:18:59 2020 +0200 Merge branch 'patch-1' of https://github.com/8vasu/util-linux * 'patch-1' of https://github.com/8vasu/util-linux: Update pty-session.c More minor typos Fix minor typo commit 91a3e374897ac7272bcd608de3b543e7c8709b63 Merge: 1f50296c0 519ad7a13 Author: Karel Zak Date: Fri Aug 14 11:16:12 2020 +0200 Merge branch 'fdisk-fuzzer-follow-up' of https://github.com/evverx/util-linux * 'fdisk-fuzzer-follow-up' of https://github.com/evverx/util-linux: tests: add testcases that triggered various crashes commit 1f50296c0f2384f474e3bbd92926edea53c3bace Author: Karel Zak Date: Fri Aug 14 11:13:50 2020 +0200 libfdisk: (script) fix possible partno overflow Addresses: https://oss-fuzz.com/testcase-detail/5740890480705536 Signed-off-by: Karel Zak libfdisk/src/script.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 5679c7bbdbe41e560052ecd12e57d03eab65d20a Author: Soumendra Ganguly <67527439+8vasu@users.noreply.github.com> Date: Thu Aug 13 12:58:22 2020 -0500 Update pty-session.c lib/pty-session.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 678d03cc8a9c665ba989b098a9be903ede72f554 Author: Karel Zak Date: Thu Aug 13 13:48:28 2020 +0200 libfdisk: (script) fix possible memory leaks Signed-off-by: Karel Zak libfdisk/src/script.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit c556dc5943f7d2d5f367133e7572412d7741c694 Author: Soumendra Ganguly <67527439+8vasu@users.noreply.github.com> Date: Thu Aug 13 06:01:57 2020 -0500 More minor typos lib/pty-session.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit d8f35960ae0daa5d8b8231d22a6e967f5fcadb31 Author: Karel Zak Date: Thu Aug 13 10:13:01 2020 +0200 libfdisk: another parse_line_nameval() cleanup libfdisk/src/script.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) commit 9f03ad60e58f7bdcac6a1046471a3374550ee384 Author: Karel Zak Date: Thu Aug 13 10:12:01 2020 +0200 libfdisk: make fdisk_partname() more robust libfdisk/src/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 86139a7041a808643952af70b70c2f3e62c905c7 Author: Soumendra Ganguly <67527439+8vasu@users.noreply.github.com> Date: Thu Aug 13 02:44:28 2020 -0500 Fix minor typo terminall -> terminal lib/pty-session.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3b87a9af494b4ecc2ed3aa544f1a2f8df6789354 Author: Karel Zak Date: Wed Aug 12 19:48:47 2020 +0200 libfdisk: fix typo from 255f5f4c770ebd46a38b58975bd33e33ae87ed24 Signed-off-by: Karel Zak libfdisk/src/parttype.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4bdb681571d5f510ab2abff8630b802148aaf646 Author: Karel Zak Date: Wed Aug 12 19:36:51 2020 +0200 libfdisk: (script) make sure buffer is initialized Just to make static analyzers happy. Signed-off-by: Karel Zak libfdisk/src/script.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 8bbc11f12ffb7adfc188b7b8885e74d40bd54713 Author: Karel Zak Date: Wed Aug 12 15:59:38 2020 +0200 libfdisk: (script) don't use sector size if not specified This is probably bad script API use, but better be safe than sorry. Signed-off-by: Karel Zak libfdisk/src/script.c | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) commit 255f5f4c770ebd46a38b58975bd33e33ae87ed24 Author: Karel Zak Date: Wed Aug 12 15:52:53 2020 +0200 libfdisk: (script) make sure label is specified and unref type if already specified (unlikely, but be paranoid) Signed-off-by: Karel Zak libfdisk/src/parttype.c | 2 +- libfdisk/src/script.c | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) commit 519ad7a136ea8a6fe674c799c0fe72d3479d669f Author: Evgeny Vereshchagin Date: Tue Aug 11 23:58:15 2020 +0000 tests: add testcases that triggered various crashes to make it easier to catch regressions going forward. It's a follow-up to 678d03cc8a9c665ba989b09, 9f03ad60e58f7bdcac6a and 4bdb681571d5f510ab2abff86 Signed-off-by: Evgeny Vereshchagin tests/ts/fuzzers/test_fdisk_script_fuzz_files/oss-fuzz-24589 | 2 ++ tests/ts/fuzzers/test_fdisk_script_fuzz_files/oss-fuzz-24861 | 1 + .../parse_line_valcommas-use-of-uninitialized-value | 1 + 3 files changed, 4 insertions(+) commit 6c13bfcfed1fd743798b5f282f8903dcb2dec0e0 Author: Evgeny Vereshchagin Date: Mon Aug 10 23:33:51 2020 +0000 travis: stop building fuzz targets on macOS Looks like `-fsanitize=fuzzer` isn't supported there: https://travis-ci.org/github/karelzak/util-linux/jobs/716894984 ``` clang: error: unsupported option '-fsanitize=fuzzer' for target 'x86_64-apple-darwin17.7.0' ``` .travis-functions.sh | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit b62ec52e8f21cac2ad784e87571ce1d7f86431f5 Author: Evgeny Vereshchagin Date: Mon Aug 10 22:24:41 2020 +0000 tests: add a fuzz target calling fdisk_script_read_file It has already found a couple of issues mentioned in https://github.com/karelzak/util-linux/issues/1023#issuecomment-671910621 libfdisk/src/Makemodule.am | 12 +++++++ libfdisk/src/script.c | 40 +++++++++++++++++++++ tests/commands.sh | 1 + tests/ts/fuzzers/test_fdisk_script_fuzz | 26 ++++++++++++++ .../crash-8ae1c667bed4b4b864f62e78cded81d5083177eb | 1 + .../crash-d216dfd17039a189c3858d78fbcf588695439b3b | 1 + .../test_fdisk_script_fuzz_files/github-1015-1 | Bin 0 -> 12 bytes .../test_fdisk_script_fuzz_files/github-1015-2 | 2 ++ tools/oss-fuzz.sh | 2 +- 9 files changed, 84 insertions(+), 1 deletion(-) commit 943f4dbdfe62c2fa6137ba82a0d9376d2b308798 Merge: 69e4fbfbf 535e81ebb Author: Karel Zak Date: Tue Aug 11 11:58:30 2020 +0200 Merge branch 'scriptreplay_noebadf' of https://github.com/8vasu/util-linux commit 69e4fbfbfd9c42af508954d9fb985c5c7b657784 Author: Karel Zak Date: Tue Aug 11 11:02:31 2020 +0200 hwclock: add fallback if SYS_settimeofday does not exist It seems Musl-C removes SYS_settimeofday macro at all. Addresses: https://github.com/karelzak/util-linux/commit/9c6139a72017cecb9145e46102152cb4f456ada6#commitcomment-41290951 Signed-off-by: Karel Zak sys-utils/hwclock.c | 4 ++++ 1 file changed, 4 insertions(+) commit c87cce57d852d3f474966baeb5b4082eb990b773 Merge: dc4816142 6e277b7a9 Author: Karel Zak Date: Mon Aug 10 14:40:44 2020 +0200 Merge branch 'fuzz' of https://github.com/evverx/util-linux * 'fuzz' of https://github.com/evverx/util-linux: tests: pack testcases into zip archives tests: integrate test_last_fuzz into the testsuite tests: add a fuzzer for process_wtmp_file docs: mention OSS-Fuzz and CIFuzz and how to build fuzz targets locally tools: make it possible to set all the fuzzing flags with config-gen build-system: make "make distcheck" work travis: set CXX correctly travis: turn on --enable-fuzzing-engine build-sys: add support for --enable-fuzzing-engine tests: integrate test_mount_fuzz into the testsuite tests: take exit codes into account tests: add a fuzzer for mnt_table_parse_stream commit dc4816142c7f628e2828b09b7634e1c65be7e823 Author: Karel Zak Date: Mon Aug 10 12:00:17 2020 +0200 tests: add sfdisk test for 4fe7f9b614e2b5bb97f6d89af02acb867cffccc1 Signed-off-by: Karel Zak tests/expected/sfdisk/dos-sizes-vs-gaps | 26 ++++++++++++++++++++++++++ tests/ts/sfdisk/dos | 13 +++++++++++++ 2 files changed, 39 insertions(+) commit 4fe7f9b614e2b5bb97f6d89af02acb867cffccc1 Author: Karel Zak Date: Mon Aug 10 11:37:32 2020 +0200 libfdisk: fix last free sector detection if partition size specified We need to skip useless gaps between partition if the gap is no large enough for a new partition. Unfortunately, the current code checks size of the gap, but does not care for location of the gap -- this is good enough for dialog driven partitioning, but it's pretty bad if start of the partition is explicitly specified (e.g. sfdisk). Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1860461 Signed-off-by: Karel Zak libfdisk/src/dos.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 535e81ebba2c58f27936317bdfaaa7cf59035633 Author: Soumendra Ganguly Date: Sat Aug 8 05:28:42 2020 -0500 Change tcgetattr error handling. term-utils/scriptreplay.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit fbc9b6915141d7402479afc4be9b18cda549da16 Merge: 4418b5aa4 cfc264d50 Author: Karel Zak Date: Fri Aug 7 15:08:03 2020 +0200 Merge branch 'scriptreplay_noisatty' of https://github.com/8vasu/util-linux commit 4418b5aa492f0a2b1d20ec83ba0e97a88921b5e5 Merge: 8451390bd 67884c75e Author: Karel Zak Date: Fri Aug 7 15:02:56 2020 +0200 Merge branch 'sscanf-specifiers' of https://github.com/evverx/util-linux * 'sscanf-specifiers' of https://github.com/evverx/util-linux: travis: turn off libmount on OSX cifuzz: turn on MSan build-system: stop looking for %ms and %as commit 8451390bd9a00f031b1b73bd87023646dfbda646 Author: Karel Zak Date: Fri Aug 7 13:49:19 2020 +0200 docs: fix typo in v2.36-ReleaseNotes Reported-by: Pavel Machek Signed-off-by: Karel Zak Documentation/releases/v2.36-ReleaseNotes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cfc264d50bfc4855c1048fc5e0d7e27cdd0e4976 Author: Soumendra Ganguly Date: Fri Aug 7 03:01:02 2020 -0500 Add more elegant error handling. Avoid isatty. term-utils/scriptreplay.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) commit 67884c75e2deaecd0b248ce559ade4c499e6d516 Author: Evgeny Vereshchagin Date: Thu Aug 6 16:10:28 2020 +0000 travis: turn off libmount on OSX Now that the absence of the sscanf modifiers no longer prevents Travis from building libmount automatically it seems util-linux is failing to compile there with ``` In file included from disk-utils/fsck.c:49: [1m./libmount/src/libmount.h:32:10: [0m[0;1;31mfatal error: [0m[1m'mntent.h' file not found[0m [0;1;32m ^~~~~~~~~~ [0m1 error generated. make[2]: *** [disk-utils/fsck-fsck.o] Error 1 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2 ``` Signed-off-by: Evgeny Vereshchagin .travis-functions.sh | 1 + 1 file changed, 1 insertion(+) commit 2bb8c736967bcff6bdbc32f893568ad72407b625 Author: Evgeny Vereshchagin Date: Thu Aug 6 14:10:22 2020 +0000 cifuzz: turn on MSan Signed-off-by: Evgeny Vereshchagin .github/workflows/cifuzz.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0be452a82a50bb6bb371b1439b4b8633bf5d9d27 Author: Evgeny Vereshchagin Date: Thu Aug 6 13:59:35 2020 +0000 build-system: stop looking for %ms and %as Looks like those specifiers haven't been used since 6c9ab254aefb6ce7e0e (where sscanf was removed) was merged. This should help to get util-linux to compile with MSan. Currently it's failing with ``` ... configure: error: libmount selected, but required scanf string alloc modifier not available ... configure:20240: ./conftest ==116617==WARNING: MemorySanitizer: use-of-uninitialized-value #0 0x496fd6 in main /home/vagrant/util-linux/conftest.c:171:6 #1 0x7f5eb85ea1a2 in __libc_start_main (/lib64/libc.so.6+0x271a2) #2 0x41c2cd in _start (/home/vagrant/util-linux/conftest+0x41c2cd) SUMMARY: MemorySanitizer: use-of-uninitialized-value /home/vagrant/util-linux/conftest.c:171:6 in main Exiting configure:20240: $? = 77 ... configure:20265: $? = 0 configure:20265: ./conftest MemorySanitizer: bad pointer 0x000000496e60 ==116627==MemorySanitizer CHECK failed: /builddir/build/BUILD/compiler-rt-9.0.1.src/lib/msan/../sanitizer_common/sanitizer_allocator_secondary.h:177 "((IsAligned(reinterpret_cast(p), page_size_))) != (0)" (0x0, 0x0) #0 0x41d1d8 in MsanCheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) (/home/vagrant/util-linux/conftest+0x41d1d8) #1 0x484e1e in __sanitizer::CheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) (/home/vagrant/util-linux/conftest+0x484e1e) #2 0x42066c in __msan::MsanDeallocate(__sanitizer::StackTrace*, void*) (/home/vagrant/util-linux/conftest+0x42066c) #3 0x424bc9 in free (/home/vagrant/util-linux/conftest+0x424bc9) #4 0x496fae in main /home/vagrant/util-linux/conftest.c:173:2 #5 0x7f2245f311a2 in __libc_start_main (/lib64/libc.so.6+0x271a2) #6 0x41c2cd in _start (/home/vagrant/util-linux/conftest+0x41c2cd) configure:20265: $? = 77 configure: program exited with status 77 ... | } configure:22568: result: no configure:22926: error: libmount selected, but required scanf string alloc modifier not available ``` Signed-off-by: Evgeny Vereshchagin configure.ac | 64 ------------------------------------------------------------ include/c.h | 9 --------- 2 files changed, 73 deletions(-) commit 6e277b7a97f791b6fe491a1a870069fc9013ef7f Author: Evgeny Vereshchagin Date: Wed Jul 29 07:22:41 2020 +0000 tests: pack testcases into zip archives so that OSS-Fuzz can use them as seed corpora Signed-off-by: Evgeny Vereshchagin tools/oss-fuzz.sh | 6 ++++++ 1 file changed, 6 insertions(+) commit 877356164aa82f1fb64059db9ec2dcbc9102881b Author: Evgeny Vereshchagin Date: Wed Jul 29 06:31:11 2020 +0000 tests: integrate test_last_fuzz into the testsuite by adding tests/ts/* and a testcase triggering https://github.com/karelzak/util-linux/pull/1097 Signed-off-by: Evgeny Vereshchagin tests/commands.sh | 1 + tests/ts/fuzzers/test_last_fuzz | 26 ++++++++++++++++++++++ tests/ts/fuzzers/test_last_fuzz_files/github-1097 | Bin 0 -> 384 bytes 3 files changed, 27 insertions(+) commit 2cdbf06f5eecb7e4d6af833265978282c36595de Author: Evgeny Vereshchagin Date: Wed Jul 8 22:13:40 2020 +0000 tests: add a fuzzer for process_wtmp_file Signed-off-by: Evgeny Vereshchagin login-utils/Makemodule.am | 12 ++++++++++++ login-utils/last.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++- tools/oss-fuzz.sh | 2 +- 3 files changed, 60 insertions(+), 2 deletions(-) commit 0f311c7ae7dd0200531ccbfa93809c260e22e960 Author: Evgeny Vereshchagin Date: Tue Jul 28 11:47:08 2020 +0000 docs: mention OSS-Fuzz and CIFuzz and how to build fuzz targets locally Signed-off-by: Evgeny Vereshchagin Documentation/howto-tests.txt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 02f5fc1407390e414b7a6902f541b89a7a77981b Author: Evgeny Vereshchagin Date: Tue Jul 28 11:23:50 2020 +0000 tools: make it possible to set all the fuzzing flags with config-gen so that the fuzz targets (along with everything else) can be built and run with: ``` ./tools/config-gen fuzz make check ``` Signed-off-by: Evgeny Vereshchagin tools/config-gen | 4 ++++ tools/config-gen.d/fuzz.conf | 4 ++++ 2 files changed, 8 insertions(+) commit 681d3a95866a528c4bc006dcc179addd6c324367 Author: Evgeny Vereshchagin Date: Tue Jul 28 10:31:58 2020 +0000 build-system: make "make distcheck" work It failed with: ``` make[5]: Entering directory '/home/travis/build/karelzak/util-linux/util-linux-2.36.32-0fea/_build/sub/po' make[5]: *** No rule to make target '../../../include/fuzz.h', needed by 'util-linux.pot-update'. Stop. make[5]: Leaving directory '/home/travis/build/karelzak/util-linux/util-linux-2.36.32-0fea/_build/sub/po' Makefile:896: recipe for target 'update-po' failed make[4]: *** [update-po] Error 2 ``` Signed-off-by: Evgeny Vereshchagin include/Makemodule.am | 1 + 1 file changed, 1 insertion(+) commit 6056e05b283c62c725ef1b644d1eedc365c8e7e7 Author: Evgeny Vereshchagin Date: Tue Jul 28 05:26:53 2020 +0000 travis: set CXX correctly Signed-off-by: Evgeny Vereshchagin .travis-functions.sh | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) commit c8f78bde3a813ed81b0d6aae0093da53396f9f55 Author: Evgeny Vereshchagin Date: Tue Jul 28 04:19:10 2020 +0000 travis: turn on --enable-fuzzing-engine Signed-off-by: Evgeny Vereshchagin .travis-functions.sh | 8 ++++++++ 1 file changed, 8 insertions(+) commit 75196cd8be5d0ab3d724bd318de98b9e0ae7038a Author: Evgeny Vereshchagin Date: Tue Jul 28 04:17:40 2020 +0000 build-sys: add support for --enable-fuzzing-engine Signed-off-by: Evgeny Vereshchagin Makefile.am | 12 +++++++++++- configure.ac | 10 +++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) commit 7b4ab119f4e45d1873cae035684f010a457fb111 Author: Evgeny Vereshchagin Date: Tue Jul 28 00:56:04 2020 +0000 tests: integrate test_mount_fuzz into the testsuite Signed-off-by: Evgeny Vereshchagin include/fuzz.h | 9 +++++++ libmount/src/fuzz.c | 1 + tests/commands.sh | 1 + tests/ts/fuzzers/test_mount_fuzz | 26 +++++++++++++++++++++ .../fuzzers/test_mount_fuzz_files/oss-fuzz-23722 | Bin 0 -> 4 bytes 5 files changed, 37 insertions(+) commit 78905e445059dfaf8dc41070ff0a1269ebbdde84 Author: Evgeny Vereshchagin Date: Sun Jun 28 04:15:23 2020 +0200 tests: take exit codes into account In its current form the testsuite isn't suitable for running fuzz targets because it ignores exit codes and relies solely on diffs (that unfortunately aren't helpful because the nondeterministic nature of fuzz targets makes it kind of hard to specify expected output in advance). This patch is supposed to address the "exit code" issue for now. Signed-off-by: Evgeny Vereshchagin tests/functions.sh | 39 +++++++++++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 10 deletions(-) commit ccdc47b7f57b323633d49e416117cfdd3f80f9ad Author: Evgeny Vereshchagin Date: Sat Apr 11 13:25:26 2020 +0000 tests: add a fuzzer for mnt_table_parse_stream The fuzzer is supposed to cover `mnt_table_parse_stream`, which is used by systemd to parse /proc/self/mountinfo. The systemd project has run into memory leaks there at least twice: https://github.com/systemd/systemd/pull/12252#issuecomment-482804040 https://github.com/systemd/systemd/issues/8504 so it seems to be a good idea to continuously fuzz that particular function. The patch can be tested locally by installing clang and running ./tools/oss-fuzz.sh. Currently the fuzzer is failing with ``` ================================================================= ==96638==ERROR: LeakSanitizer: detected memory leaks Direct leak of 216 byte(s) in 1 object(s) allocated from: #0 0x50cd77 in calloc (/home/vagrant/util-linux/out/test_mount_fuzz+0x50cd77) #1 0x58716a in mnt_new_fs /home/vagrant/util-linux/libmount/src/fs.c:36:25 #2 0x54f224 in __table_parse_stream /home/vagrant/util-linux/libmount/src/tab_parse.c:728:9 #3 0x54eed8 in mnt_table_parse_stream /home/vagrant/util-linux/libmount/src/tab_parse.c:804:8 #4 0x5448b2 in LLVMFuzzerTestOneInput /home/vagrant/util-linux/libmount/src/fuzz.c:19:16 #5 0x44cc88 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) (/home/vagrant/util-linux/out/test_mount_fuzz+0x44cc88) #6 0x44d8b0 in fuzzer::Fuzzer::RunOne(unsigned char const*, unsigned long, bool, fuzzer::InputInfo*, bool*) (/home/vagrant/util-linux/out/test_mount_fuzz+0x44d8b0) #7 0x44e270 in fuzzer::Fuzzer::MutateAndTestOne() (/home/vagrant/util-linux/out/test_mount_fuzz+0x44e270) #8 0x450617 in fuzzer::Fuzzer::Loop(std::vector >&) (/home/vagrant/util-linux/out/test_mount_fuzz+0x450617) #9 0x43adbb in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) (/home/vagrant/util-linux/out/test_mount_fuzz+0x43adbb) #10 0x42ad46 in main (/home/vagrant/util-linux/out/test_mount_fuzz+0x42ad46) #11 0x7fa084f621a2 in __libc_start_main (/lib64/libc.so.6+0x271a2) SUMMARY: AddressSanitizer: 216 byte(s) leaked in 1 allocation(s). INFO: to ignore leaks on libFuzzer side use -detect_leaks=0. ``` Once the bug is fixed and the OSS-Fuzz counterpart is merged it should be possible to turn on CIFuzz to make sure the fuzz target can be built and run for some time without crashing: https://google.github.io/oss-fuzz/getting-started/continuous-integration/ Signed-off-by: Evgeny Vereshchagin configure.ac | 7 +++++++ libmount/src/Makemodule.am | 13 +++++++++++++ libmount/src/fuzz.c | 25 +++++++++++++++++++++++++ tools/oss-fuzz.sh | 25 +++++++++++++++++++++++++ 4 files changed, 70 insertions(+) commit db85c0eb8934d17280e7068ee5b5a1be955e647c Merge: 33f50706f f04521f4a Author: Karel Zak Date: Thu Aug 6 11:49:29 2020 +0200 Merge branch 'mk-rm' of https://github.com/evverx/util-linux * 'mk-rm' of https://github.com/evverx/util-linux: tests: an attempt to get around https://github.com/karelzak/util-linux/issues/1110 commit 33f50706fd7c1c5e53f8f355f12b685c6935f5a4 Author: Karel Zak Date: Thu Aug 6 11:32:33 2020 +0200 libfdisk: fix fdisk_reread_changes() for extended partitions Linux kernel assumes only 1KiB extended partition to avoid overlapping with nested logical partitions. We need to follow this rule for BLKPG_ADD_PARTITION. Addresses: https://github.com/karelzak/util-linux/issues/1112 Signed-off-by: Karel Zak libfdisk/src/context.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit f04521f4ac4e74208ca960f2ac04722f327d930b Author: Evgeny Vereshchagin Date: Tue Jul 28 08:04:35 2020 +0000 tests: an attempt to get around https://github.com/karelzak/util-linux/issues/1110 Signed-off-by: Evgeny Vereshchagin tests/ts/ipcs/mk-rm-msg | 3 ++- tests/ts/ipcs/mk-rm-sem | 3 ++- tests/ts/ipcs/mk-rm-shm | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) commit 359b522c3981cf5d46c289913fee3e14f4275e81 Author: Michael Kerrisk (man-pages) Date: Fri Jul 24 12:06:18 2020 +0200 Manual pages: wipefs.8: Formatting fixes Signed-off-by: Michael Kerrisk (man-pages) misc-utils/wipefs.8 | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 2b34e0141dad2b21012658893b623afbdd887ff2 Author: Michael Kerrisk (man-pages) Date: Fri Jul 24 12:06:17 2020 +0200 Manual pages: agetty.8: Minor formatting and wording fixes Signed-off-by: Michael Kerrisk (man-pages) term-utils/agetty.8 | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) commit 04be4affb743afe95b4daca94f27b044e4d9d000 Author: Michael Kerrisk (man-pages) Date: Fri Jul 24 12:06:16 2020 +0200 Manual pages: wdctl.8: typo fix sys-utils/wdctl.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4aabe42985ad773bba1d86cd811a7defab2f19cd Author: Michael Kerrisk (man-pages) Date: Fri Jul 24 12:06:15 2020 +0200 Manual pages: lsblk.8: Minor formatting and typo fixes Signed-off-by: Michael Kerrisk (man-pages) misc-utils/lsblk.8 | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit cbb38bfbdfc0d21fead045484c59ea6a529cef13 Author: Michael Kerrisk (man-pages) Date: Fri Jul 24 12:06:14 2020 +0200 Manual pages: logger.1: minor formatting and typo fixes Signed-off-by: Michael Kerrisk (man-pages) misc-utils/logger.1 | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 95553ea0dd5fe83c066d5e63392af66c2bf2456a Author: Michael Kerrisk (man-pages) Date: Fri Jul 24 12:06:13 2020 +0200 Manual pages: nologin.8: formatting fixes Signed-off-by: Michael Kerrisk (man-pages) login-utils/nologin.8 | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit 47c6012f2bca52c5dcf6d2e570d530e3520ab19e Author: Michael Kerrisk (man-pages) Date: Fri Jul 24 12:06:12 2020 +0200 Manual pages: lslogins.1: Minor wording and formatting fixres Signed-off-by: Michael Kerrisk (man-pages) login-utils/lslogins.1 | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) commit 89fdd6d439b2d042f8b1ad0949fe5e5e1a8119ee Author: Michael Kerrisk (man-pages) Date: Fri Jul 24 12:06:11 2020 +0200 Manual pages: sfdisk.8: Use less aggressive indenting The page currently uses rather aggressive indenting, which doesn't really improve readability, but does have cause ugly line filling. Signed-off-by: Michael Kerrisk (man-pages) disk-utils/sfdisk.8 | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) commit b382d543edb5b553f45c286abf21f0951ed92e6c Author: Michael Kerrisk (man-pages) Date: Fri Jul 24 12:06:10 2020 +0200 Manual pages: sfdisk.8: Minor wording and formatting fixes Signed-off-by: Michael Kerrisk (man-pages) disk-utils/sfdisk.8 | 38 +++++++++++++++++++++++++++----------- 1 file changed, 27 insertions(+), 11 deletions(-) commit 8be2cc81714a521f18b294056d8c42cb1db1555b Author: Michael Kerrisk (man-pages) Date: Fri Jul 24 12:06:09 2020 +0200 Manual pages: raw.8: Minor formatting and wording fixes Signed-off-by: Michael Kerrisk (man-pages) disk-utils/raw.8 | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit 342af74630436e9a51b0aee0a7972746ca9b00e4 Author: Michael Kerrisk (man-pages) Date: Fri Jul 24 12:06:07 2020 +0200 Manual pages: blockdev.8: Minor wording and formatting fixes Signed-off-by: Michael Kerrisk (man-pages) disk-utils/blockdev.8 | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) commit dcd77a69da689e96913adf306b97252a84926b2b Author: Chris Hofstaedtler Date: Fri Jul 24 00:35:09 2020 +0000 fdisk: fix expected test output on alpha The last test output update inadvertedly replaced "ext2" with "MS-DOS" in the alpha-specific data. Fixes: 3c36438f0 Broken build log: https://buildd.debian.org/status/fetch.php?pkg=util-linux&arch=alpha&ver=2.36-1&stamp=1595550493&raw=0 Signed-off-by: Chris Hofstaedtler tests/expected/fdisk/bsd_0_64_alpha.LE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7259f318b9f1376f411c40c285815b667bd1d540 Author: Chris Hofstaedtler Date: Thu Jul 23 22:31:41 2020 +0000 manpages: fix "The example command" in AVAILABILITY section Signed-off-by: Chris Hofstaedtler disk-utils/fsck.cramfs.8 | 2 +- disk-utils/mkfs.cramfs.8 | 2 +- misc-utils/uuidparse.1 | 2 +- sys-utils/irqtop.1 | 2 +- sys-utils/lsirq.1 | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) commit 00a09d78ea7ee2180d32280c9157677fef8d204c Author: Soumendra Ganguly Date: Fri Jul 17 04:54:30 2020 -0500 scriptreplay: enable special character handling Calling cfmakeraw disables terminal special character handling. For example, Ctrl-C does not send SIGINT to scriptreplay. The following fixes this. tattr.c_lflag |= ISIG; where tattr is the struct termios with which we are working. term-utils/scriptreplay.c | 1 + 1 file changed, 1 insertion(+) commit b725361adf03b24eebf70cf81fa872c00f31b9b0 Author: Luca Boccassi Date: Wed Jul 8 15:15:03 2020 +0100 libmount (verity): let crypt_deactivate_by_name handle its own data structure It's not necessary to initialize a crypt_device, the function will do it on its own if NULL is passed. Removes a few extra library calls. Signed-off-by: Luca Boccassi libmount/src/context_veritydev.c | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) commit e0b6f5a7c83e63191cc89c1431dbb989d611e62c Author: Luca Boccassi Date: Wed Jul 8 15:12:34 2020 +0100 libmount (verity): plug libcryptsetup logger into our logging system Allows logs from the library to be printed by our system: 731814: libmount: VERITY: crypsetup: Device libmnt_img.raw already exists. If the mount context is in verbose mode, enable all debug logs from libcrypsetup as well. Signed-off-by: Luca Boccassi libmount/src/context_veritydev.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit edb088ffbe537f4d7880dd29dcd7d663209cc391 Author: SOUMENDRA GANGULY Date: Fri Jul 10 06:16:03 2020 -0500 Make scriptreplay set terminal to raw mode term-utils/scriptreplay.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit 6e7fb6c49a198c241e69ea3b82bf917631fe8b3d Author: Karel Zak Date: Fri Jul 3 10:37:54 2020 +0200 bash-completion: add irqtop/lsirq --softirq Signed-off-by: Karel Zak bash-completion/irqtop | 1 + bash-completion/lsirq | 1 + 2 files changed, 2 insertions(+) commit 635ac7dad82bb9ad67a8d9fc034ce1ed1d50661f Author: zhenwei pi Date: Thu Jul 2 20:31:39 2020 +0800 irqtop/lsirq: add softirq for man page Signed-off-by: zhenwei pi sys-utils/irqtop.1 | 3 +++ sys-utils/lsirq.1 | 3 +++ 2 files changed, 6 insertions(+) commit b2a49bc243ce09e394adb2bb4ea9d04a5d6f7f68 Author: zhenwei pi Date: Thu Jul 2 20:24:20 2020 +0800 irqtop/lsirq: add additional desc for softirq Suggested by Karel, add additional description to make softirq more friendly to end-user. Discuss about this: https://github.com/karelzak/util-linux/pull/1079 Note that, we should keep softirqs table align to kernel source code. Signed-off-by: zhenwei pi sys-utils/irq-common.c | 55 +++++++++++++++++++++++++++++++++++++++++--------- sys-utils/irqtop.c | 3 +-- sys-utils/lsirq.c | 3 +-- 3 files changed, 48 insertions(+), 13 deletions(-) commit b6ce063b046f68094699af3f06bb0e20e47a32f9 Author: zhenwei pi Date: Mon Jun 29 14:19:21 2020 +0800 irqtop/lsirq: support softirq Add '-S' or '--softirq' for irqtop/lsirq, instead of interrupts, show softirqs infomation. Because there is no more description of softirq, do not show 'NAME' column by default. Signed-off-by: zhenwei pi include/pathnames.h | 1 + sys-utils/irq-common.c | 12 ++++++++---- sys-utils/irq-common.h | 3 ++- sys-utils/irqtop.c | 13 ++++++++++--- sys-utils/lsirq.c | 17 ++++++++++++----- 5 files changed, 33 insertions(+), 13 deletions(-) commit e5ad3a6ad0b416fd89fdd184c78055a80011abe7 Author: Shin'ichiro Kawasaki Date: Wed Jul 1 20:33:26 2020 +0900 blkzone: add capacity field to zone report NVMe ZNS specification defines zone capacity. The report zone interface of Linux kernel supports it. Expose it in report zone by blkzone command. Signed-off-by: Hans Holmberg Signed-off-by: Shin'ichiro Kawasaki configure.ac | 4 ++++ sys-utils/blkzone.8 | 1 + sys-utils/blkzone.c | 20 ++++++++++++++++++-- 3 files changed, 23 insertions(+), 2 deletions(-) commit d0aa83147ac69e6fa3429d6fd2268bd284e9e7c3 Author: Chris Hofstaedtler Date: Tue Jun 23 00:14:30 2020 +0000 hexdump: automatically use -C when called as hd When invoking hexdump as hd enable the "Canonical" format to by default, implying the -C option. This is historic behaviour on Debian and apparently also on FreeBSD. Some Debian users have asked for this to be restored, after Debian switched to util-linux' hexdump and hd. Signed-off-by: Chris Hofstaedtler text-utils/hexdump.1 | 3 +++ text-utils/hexdump.c | 7 +++++++ 2 files changed, 10 insertions(+)