Changes between v2.29 and v2.30-rc1 ----------------------------------- commit c604411fdfbcc53781cabb195af203fe2e58ff8e Author: Karel Zak Date: Fri May 12 13:02:05 2017 +0200 build-sys: release++ (v2.30-rc1) Signed-off-by: Karel Zak NEWS | 4 ++++ configure.ac | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) commit 013d25c09d9b1670fec3547203988d376182600e Author: Karel Zak Date: Fri May 12 13:32:14 2017 +0200 docs: add chmem and tailf to ReleaseNotes Signed-off-by: Karel Zak Documentation/releases/v2.30-ReleaseNotes | 5 +++++ 1 file changed, 5 insertions(+) commit bb73c3ae2253b5e2a2bd43b110b19ddc551fcf65 Author: Karel Zak Date: Fri May 12 13:00:36 2017 +0200 docs: update v2.30-ReleaseNotes Signed-off-by: Karel Zak Documentation/releases/v2.30-ReleaseNotes | 644 ++++++++++++++++++++++++++++++ 1 file changed, 644 insertions(+) commit f948cef99ce778b5569f1ef5b06cb62650faa8f9 Author: Karel Zak Date: Fri May 12 11:32:06 2017 +0200 docs: update AUTHORS file Signed-off-by: Karel Zak AUTHORS | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) commit ebe345d1ca992f52dac1fb8360d12ced2d5adc2d Author: Karel Zak Date: Fri May 12 11:27:52 2017 +0200 po: merge changes Signed-off-by: Karel Zak po/ca.po | 6755 ++++++++++++++++++++++++++++---------------------- po/cs.po | 6658 ++++++++++++++++++++++++++++---------------------- po/da.po | 7055 +++++++++++++++++++++++++++++------------------------ po/de.po | 6790 +++++++++++++++++++++++++++++---------------------- po/es.po | 6749 ++++++++++++++++++++++++++++---------------------- po/et.po | 6606 +++++++++++++++++++++++++++---------------------- po/eu.po | 6618 +++++++++++++++++++++++++++---------------------- po/fi.po | 6531 ++++++++++++++++++++++++++++--------------------- po/fr.po | 6708 ++++++++++++++++++++++++++++---------------------- po/gl.po | 6350 ++++++++++++++++++++++++++--------------------- po/hr.po | 6317 ++++++++++++++++++++++++++--------------------- po/hu.po | 6761 ++++++++++++++++++++++++++++---------------------- po/id.po | 6808 +++++++++++++++++++++++++++++---------------------- po/it.po | 6756 ++++++++++++++++++++++++++++---------------------- po/ja.po | 6615 ++++++++++++++++++++++++++++--------------------- po/nl.po | 6662 ++++++++++++++++++++++++++++---------------------- po/pl.po | 6630 ++++++++++++++++++++++++++++--------------------- po/pt_BR.po | 6654 ++++++++++++++++++++++++++++---------------------- po/ru.po | 6596 ++++++++++++++++++++++++++++--------------------- po/sl.po | 6749 ++++++++++++++++++++++++++++---------------------- po/sv.po | 6623 ++++++++++++++++++++++++++++--------------------- po/tr.po | 6745 ++++++++++++++++++++++++++++---------------------- po/uk.po | 6632 ++++++++++++++++++++++++++++--------------------- po/util-linux.pot | 6090 +++++++++++++++++++++++++-------------------- po/vi.po | 6648 ++++++++++++++++++++++++++++---------------------- po/zh_CN.po | 6715 ++++++++++++++++++++++++++++---------------------- po/zh_TW.po | 6855 +++++++++++++++++++++++++++++---------------------- 27 files changed, 101533 insertions(+), 78143 deletions(-) commit 52de3f148452f2108e5c0571ff2957c625538639 Author: Wylmer Wang Date: Fri May 12 11:21:06 2017 +0200 po: update zh_CN.po (from translationproject.org) po/zh_CN.po | 433 +++++++++++++++++++++++++++++++----------------------------- 1 file changed, 223 insertions(+), 210 deletions(-) commit 8940a488e2d32a38b5284c5e6ca2cdada780db6d Author: Rafael Fontenelle Date: Fri May 12 11:21:06 2017 +0200 po: update pt_BR.po (from translationproject.org) po/pt_BR.po | 827 ++++++++++++++++++++++++++++-------------------------------- 1 file changed, 392 insertions(+), 435 deletions(-) commit 54c77b0bd9ec7bf029e287ff1317f9608731d2b5 Author: Stéphane Aulery Date: Fri May 12 11:21:06 2017 +0200 po: update fr.po (from translationproject.org) po/fr.po | 7837 +++++++------------------------------------------------------- 1 file changed, 806 insertions(+), 7031 deletions(-) commit dc3ece6ecd4b2aaa59ff4a5378e56d50f3f84525 Author: Joe Hansen Date: Fri May 12 11:21:06 2017 +0200 po: update da.po (from translationproject.org) po/da.po | 1450 +++++++++++++++++++++++++++++++++++++------------------------- 1 file changed, 874 insertions(+), 576 deletions(-) commit 22cfe66265df6fabd7dd1c4036b1e500d0ed859f Author: Karel Zak Date: Fri May 12 11:15:34 2017 +0200 lib/parse-date: don't use xalloc in lib-like code Signed-off-by: Karel Zak lib/parse-date.y | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit b8af37d7670b2f328aa5144f168b3b6d2be05c8f Author: Karel Zak Date: Fri May 12 11:08:37 2017 +0200 build-sys: remove duplicate includes Signed-off-by: Karel Zak lib/randutils.c | 1 - login-utils/utmpdump.c | 1 - sys-utils/lsmem.c | 1 - 3 files changed, 3 deletions(-) commit f69eba1734ff238e576076bdd30c5fec62521063 Author: Karel Zak Date: Fri May 12 11:05:12 2017 +0200 build-sys: add AC_STRUCT_TIMEZONE new datetime parsing code assumes macros: lib/parse-date.c : HAVE_STRUCT_TM_TM_ZONE lib/parse-date.c : HAVE_TZNAME Signed-off-by: Karel Zak configure.ac | 1 + 1 file changed, 1 insertion(+) commit 5d217e6f158411dbd363a6ed5d3a7693ca87e847 Author: Karel Zak Date: Thu May 11 15:54:30 2017 +0200 wipefs: add note about no-act to the man page Signed-off-by: Karel Zak misc-utils/wipefs.8 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 84111dbae48d27d96596a9a78a93da02595fbda2 Author: Karel Zak Date: Thu May 11 15:53:07 2017 +0200 fdisk: fix type dialog Signed-off-by: Karel Zak disk-utils/fdisk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ce59d8bfa596262aba128a220d33d9a14646f9d6 Merge: 03dd701 28f01f7 Author: Karel Zak Date: Thu May 11 10:59:14 2017 +0200 Merge branch 'master' of https://github.com/pali/util-linux * 'master' of https://github.com/pali/util-linux: tests: Add UDF CD-ROM hybrid image (ISO+Joliet+UDF) created by Nero 6 tests: Fix test output for low-probe-udf to contain UDF data Revert "libblkid: Probe UDF volumes for ISO9660 info as well" commit 03dd701585c5bb5ebd6224e861fbf7b6b8ab03b9 Author: Karel Zak Date: Wed May 10 11:26:51 2017 +0200 tests: update wipe-partition Signed-off-by: Karel Zak tests/expected/sfdisk/wipe-partition | 2 ++ 1 file changed, 2 insertions(+) commit 2571d74382d0b2b1ad9e4acd316bc5ea46236e7e Author: Sami Kerola Date: Tue May 9 19:10:52 2017 +0100 docs: make column.1 example to use ascii output In same go ease reading by having data and arguments in same order. Signed-off-by: Sami Kerola text-utils/column.1 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 105bb8572f5eddd3e196363ee18a0d210990905f Author: Sami Kerola Date: Tue May 9 19:10:51 2017 +0100 switch_root: use getopt_long() to parse options Signed-off-by: Sami Kerola sys-utils/switch_root.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) commit 6c9f102f3e5806d70da2d33a40d86a10cf0a3354 Author: Sami Kerola Date: Tue May 9 19:10:50 2017 +0100 vipw: use getopt_long() to parse options Signed-off-by: Sami Kerola login-utils/vipw.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) commit b6b5272b03ea9d3fa15601801d4d0f76ea4440f1 Author: Sami Kerola Date: Tue May 9 19:10:49 2017 +0100 col: avoid extra newline if no input BSD fix missed for 22 years, and all util-linux releases so far. Backported-from: https://github.com/dspinellis/unix-history-repo/commit/2a15260a2a3230e02f57c096fb4c5e1f797bf4f3 Addresses: https://github.com/karelzak/util-linux/issues/422 Reported-by: Pavel Raiskup Signed-off-by: Sami Kerola text-utils/col.c | 2 ++ 1 file changed, 2 insertions(+) commit c6b0cbdd95ff30788cdb6afee707e20f0dd640b8 Author: Sami Kerola Date: Tue May 9 19:10:48 2017 +0100 lib/mbsedit: fix typo in comment Signed-off-by: Sami Kerola lib/mbsedit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ddead341c580e9da21f195c5b3815ec05697bf33 Author: Karel Zak Date: Tue May 9 14:30:36 2017 +0200 fdisk: inform on 'p' about wiped partitions The wipe operation is potentially dangerous. Let's inform about it always by 'p' (list) command to make sure user knowns about it. Command (m for help): p ... Device Boot Start End Sectors Size Id Type /dev/sdc1 2048 204799 202752 99M 83 Linux Filesystem/RAID signature on partition 1 will be wiped. Addresses: https://github.com/karelzak/util-linux/issues/437 Signed-off-by: Karel Zak disk-utils/fdisk-list.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 29f2e825d8a92fb45469098874691666e5e4e2a0 Author: Karel Zak Date: Tue May 9 14:30:02 2017 +0200 libfdisk: add fdisk_partition_has_wipe() Signed-off-by: Karel Zak libfdisk/docs/libfdisk-sections.txt | 1 + libfdisk/src/libfdisk.h.in | 3 +++ libfdisk/src/libfdisk.sym | 1 + libfdisk/src/partition.c | 13 +++++++++++++ 4 files changed, 18 insertions(+) commit a4aa4a6c9df5052dad9e72e829e6d2fad4473f83 Author: Karel Zak Date: Tue May 9 13:05:26 2017 +0200 fdisk: add to the man page missing option Signed-off-by: Karel Zak disk-utils/fdisk.8 | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 577d1a663c81035260a7e191f1e2a00775d7effc Author: Karel Zak Date: Tue May 9 12:31:52 2017 +0200 lscpu: reuse the same buffer Now we use libsmartcols for the default output and all is allocated in the smartcols table. So, we can reuse the same buffer for all sprintf/scanf calls. Signed-off-by: Karel Zak sys-utils/lscpu.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) commit 89222b17fc6b0e9d6d0e4de90a2413d946025d73 Author: Karel Zak Date: Tue May 9 12:29:24 2017 +0200 lscpu: make cpu_{max,min}_mhz() usage more elegant Signed-off-by: Karel Zak sys-utils/lscpu.c | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) commit fc07d9f5aba7c58d9793a6c781d569316dfd25f6 Author: Mamatha Inamdar Date: Thu Apr 27 15:52:59 2017 +0530 lscpu: Read available CPUs max and min frequencies Problem:"lscpu frequency-info" command was always reading CPU0 max and min frequencies. If CPU0 is guarded or offline then it used to display max and min frequencies as NULL. This patch will read overall CPU max and min frequencies. Test Results: Before Patch: #lscpu (CPU0 is guarded/offline) Architecture: ppc64le Byte Order: Little Endian CPU(s): 120 On-line CPU(s) list: 8-127 Thread(s) per core: 8 Core(s) per socket: 3 Socket(s): 4 NUMA node(s): 4 Model: 2.1 (pvr 004b 0201) Model name: POWER8E (raw), altivec supported CPU max MHz: (null) CPU min MHz: (null) L1d cache: 64K L1i cache: 32K L2 cache: 512K L3 cache: 8192K NUMA node0 CPU(s): 8-31 NUMA node1 CPU(s): 32-63 NUMA node16 CPU(s): 64-95 NUMA node17 CPU(s): 96-127 With Patch: # ./lscpu Architecture: ppc64le Byte Order: Little Endian CPU(s): 120 On-line CPU(s) list: 8-127 Thread(s) per core: 8 Core(s) per socket: 3 Socket(s): 4 NUMA node(s): 4 Model: 2.1 (pvr 004b 0201) Model name: POWER8E (raw), altivec supported CPU max MHz: 4322.0000 CPU min MHz: 2061.0000 L1d cache: 64K L1i cache: 32K L2 cache: 512K L3 cache: 8192K NUMA node0 CPU(s): 8-31 NUMA node1 CPU(s): 32-63 NUMA node16 CPU(s): 64-95 NUMA node17 CPU(s): 96-127 [kzak@redhat.com: - cpu_{max,min}_mhz() refactoring] Signed-off-by: Mamatha Inamdar Signed-off-by: Karel Zak sys-utils/lscpu.c | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 52 insertions(+), 5 deletions(-) commit 626aa65180384c83e1e2aa4408ca9956563f7826 Author: Karel Zak Date: Tue May 9 11:59:53 2017 +0200 sulogin: add missing type Signed-off-by: Karel Zak login-utils/sulogin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b1f1fe3dffdab81f1459b15657af0159f5a034bc Merge: da06d42 e41ae45 Author: Karel Zak Date: Tue May 9 11:58:23 2017 +0200 Merge branch '2017wk16' of git://github.com/kerolasa/lelux-utiliteetit * '2017wk16' of git://github.com/kerolasa/lelux-utiliteetit: chfn, chsh: use readline(3) to receive user input findfs: use getopt_long() to parse options logger: make month names, login name, and tag read-only objects sulogin: reduce vulnerability surface partx: add --list-types option libblkid: add blkid_partitions_get_name() docs: try to convince open(2) O_DIRECT rather than using raw device blkid: add long options lsipc: fix options parsing and sync with man page commit 28f01f74331eaf175be427a0891012b592869eaf Author: Pali Rohár Date: Mon May 1 13:03:55 2017 +0200 tests: Add UDF CD-ROM hybrid image (ISO+Joliet+UDF) created by Nero 6 This image was created by Nero Burning ROM version 6 via option CD-ROM (UDF/ISO) with UDF version 2.01 and enabled ISO Joliet extension. Moreover for testing purposes it has set custom Disc label (and also every other identifier) which is different for ISO, Joiliet and UDF part. It contains ISO/Joliet/UDF string prefix to distinguish between them. So reading this image as basic ISO would produce different label as when reading it as ISO with Joliet image and also different as UDF image. Windows detects its label as "UDF Label". Before commit ccfb5b0a1d318c1ac96884c70c7b5090331849fc blkid show label for this image as "Joliet Label" and after as "UDF Label". Note that it is not common to have such images with different label stored in Joliet part and in UDF part. Moreover it is very hard to generate them. tests/expected/blkid/low-probe-udf-cd-nero-6 | 9 +++++++++ tests/ts/blkid/images-fs/udf-cd-nero-6.img.xz | Bin 0 -> 2168 bytes 2 files changed, 9 insertions(+) commit 5531320087f163d30169abe603597d88c35f0865 Author: Pali Rohár Date: Mon May 1 12:57:53 2017 +0200 tests: Fix test output for low-probe-udf to contain UDF data Label was really not changed because of fix by commit 2f2730bc77c972d613cfec421468c84f15749708. UUID is different due to fact that ISO image does not have UUID and libblkid generate one from compilation date. Plus "Joliet Extension" in UDF context does not make sense. tests/expected/blkid/low-probe-udf | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit ccfb5b0a1d318c1ac96884c70c7b5090331849fc Author: Pali Rohár Date: Mon May 1 11:19:02 2017 +0200 Revert "libblkid: Probe UDF volumes for ISO9660 info as well" This reverts commit 8053b51c7601c4a7e5f2eca45610b8228f53d408. Reporting meaningless ID_FS_LABEL=UDF_Volume written in that commit was caused by reading wrong value for UDF label and it was fixed in commit 2f2730bc77c972d613cfec421468c84f15749708. So after this revert blkid reports for UDF filesystems label of UDF filesystem and not label of ISO (if present) like other systems. In most cases UDF and ISO labels are same (sometimes just one is upper case). Commit 8053b51c7601c4a7e5f2eca45610b8228f53d408 just fixed result, not reason why blkid reported different UDF Label as Windows. Real reason was fixed in 2f2730bc77c972d613cfec421468c84f15749708. libblkid/docs/Makefile.am | 2 +- libblkid/src/Makemodule.am | 1 - libblkid/src/superblocks/iso9660.c | 3 +-- libblkid/src/superblocks/iso9660.h | 14 -------------- libblkid/src/superblocks/udf.c | 23 +---------------------- 5 files changed, 3 insertions(+), 40 deletions(-) commit da06d421971d288078352bcff05e0bcc662b3a79 Author: Karel Zak Date: Fri May 5 13:56:40 2017 +0200 column: be robust on empty table Signed-off-by: Karel Zak text-utils/column.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit cb3fdf2ae9836d48b6176b4a9735d38796cbda88 Author: Karel Zak Date: Fri May 5 12:49:51 2017 +0200 column: require column names for JSON Signed-off-by: Karel Zak text-utils/column.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit dc46610bf57001859ce616c03fc3d21d2ebebcb6 Author: Alexey Gladkov Date: Thu May 4 15:53:13 2017 +0200 blkid: fix return code when display the version Signed-off-by: Alexey Gladkov misc-utils/blkid.c | 1 + 1 file changed, 1 insertion(+) commit c467fdaf8061c4a4b69a0398520a42003318e2fe Author: Karel Zak Date: Fri May 5 12:13:15 2017 +0200 column: use libsmartcols to avoid circular dependences Signed-off-by: Karel Zak text-utils/column.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit eebf2dd89ba905c52ec00ed321a9c246e00598f8 Author: Karel Zak Date: Fri May 5 12:12:43 2017 +0200 libsmartcols: add scols_line_is_ancestor() Signed-off-by: Karel Zak libsmartcols/docs/libsmartcols-sections.txt | 1 + libsmartcols/src/libsmartcols.h.in | 1 + libsmartcols/src/libsmartcols.sym | 1 + libsmartcols/src/line.c | 19 +++++++++++++++++++ 4 files changed, 22 insertions(+) commit 60102db546b13208347bb352ccf1a14345882d64 Author: Karel Zak Date: Fri May 5 11:52:04 2017 +0200 column: add note that circular dependencies are ignored Signed-off-by: Karel Zak text-utils/column.1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 435846ef99f57140791cacc8527cb8c8418aa5d3 Author: Karel Zak Date: Fri May 5 11:47:46 2017 +0200 column: add --tree to the man page Signed-off-by: Karel Zak text-utils/column.1 | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) commit b0f00a9471b7b92b2f8680898676bb5479b97d97 Author: Karel Zak Date: Fri May 5 11:31:47 2017 +0200 column: fix --tree id-parent loop crash The loop is silently ignored. Signed-off-by: Karel Zak text-utils/column.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit f3626e039f8a669921c94aabdf2a31858cb4004b Author: Karel Zak Date: Wed May 3 14:33:04 2017 +0200 tests: add new build-sys tests Signed-off-by: Karel Zak tests/expected/build-sys/config-enable-schedutils | 3 +++ tests/expected/build-sys/config-non-widechar | 1 + 2 files changed, 4 insertions(+) commit c4b6c832b435bcd364d29ecca0a4057955deef86 Author: Karel Zak Date: Wed May 3 13:36:20 2017 +0200 testsL update build-sys tests Signed-off-by: Karel Zak tests/expected/build-sys/config-all | 6 +++++- tests/expected/build-sys/config-all-non-nls | 6 +++++- tests/expected/build-sys/config-audit | 6 +++++- tests/expected/build-sys/config-chfnsh-libuser | 6 +++++- tests/expected/build-sys/config-chfnsh-no-password | 6 +++++- tests/expected/build-sys/config-chfnsh-pam | 6 +++++- tests/expected/build-sys/config-core | 6 +++++- tests/expected/build-sys/config-devel | 6 +++++- tests/expected/build-sys/config-devel-non-docs | 6 +++++- tests/expected/build-sys/config-non-libblkid | 6 +++++- tests/expected/build-sys/config-non-libmount | 6 +++++- tests/expected/build-sys/config-non-libs | 3 ++- tests/expected/build-sys/config-non-libsmartcols | 3 ++- tests/expected/build-sys/config-non-libuuid | 6 +++++- tests/expected/build-sys/config-non-nls | 6 +++++- tests/expected/build-sys/config-selinux | 6 +++++- tests/expected/build-sys/config-slang | 6 +++++- tests/expected/build-sys/config-static | 6 +++++- 18 files changed, 84 insertions(+), 18 deletions(-) commit 8b7f00a8bbfe21f942ab3c9094ee20dc92addaf6 Author: Karel Zak Date: Wed May 3 12:00:20 2017 +0200 build-sys: fix lsmem dependence Signed-off-by: Karel Zak configure.ac | 1 + 1 file changed, 1 insertion(+) commit 960ee8e3f1bc5e13fb1e5c3d85d09d0f92f38cd2 Author: Karel Zak Date: Wed May 3 10:40:46 2017 +0200 build-sys: remove column-old.c Signed-off-by: Karel Zak text-utils/Makemodule.am | 7 - text-utils/column-old.c | 491 ----------------------------------------------- 2 files changed, 498 deletions(-) commit e41ae450937e51d6016ba6a43f0559efdc09f4e2 Author: Sami Kerola Date: Sun Apr 23 18:51:51 2017 +0100 chfn, chsh: use readline(3) to receive user input The readline offers editing capabilities while the user is entering the line, unlike fgets(3) and getline(3) that were used earlier. Signed-off-by: Sami Kerola login-utils/Makemodule.am | 2 +- login-utils/chfn.c | 33 +++++++++++++++++++++++---------- login-utils/chsh.c | 15 ++++++++++++--- 3 files changed, 36 insertions(+), 14 deletions(-) commit 0e1fa6b63a0ced0e4f17fb95788fa6d0e7f4c87c Author: Sami Kerola Date: Mon Apr 17 21:43:35 2017 +0100 findfs: use getopt_long() to parse options This change makes the findfs(8) more coherent with other commands in the project source tree. Signed-off-by: Sami Kerola misc-utils/findfs.c | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) commit c8598d8a51fa91a27af251f1555471506174d66a Author: Sami Kerola Date: Sat Apr 15 21:56:23 2017 +0100 logger: make month names, login name, and tag read-only objects Signed-off-by: Sami Kerola misc-utils/logger.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 71f207a5f598623a539ba825b97a503072c4a1b4 Author: Sami Kerola Date: Sat Apr 15 21:46:38 2017 +0100 sulogin: reduce vulnerability surface Hopefully these changes are unreachable code, but better safe than sorry when dealing with setuid root code that is installed everywhere. Quite obviously the introduced abort() calls protect from impossible inputs. Secondly set all possible data to be read-only in attempt to make it more difficult to alter anything at all. Reference: https://www.securecoding.cert.org/confluence/display/c/DCL00-C.+Const-qualify+immutable+objects Reviewed-by: Petr Vorel Signed-off-by: Sami Kerola login-utils/su-common.c | 53 +++++++++++++++++++++++------------------- login-utils/sulogin-consoles.c | 20 ++++++++-------- login-utils/sulogin.c | 39 ++++++++++++------------------- 3 files changed, 54 insertions(+), 58 deletions(-) commit 2cdaf94b55bd862fc01c76f0e8cb39e68d8f89f9 Author: Sami Kerola Date: Thu Apr 13 18:09:23 2017 +0100 partx: add --list-types option Use libblkid as the source of truth what partition type names exist, and are supported. Signed-off-by: Sami Kerola bash-completion/partx | 4 ++-- disk-utils/partx.8 | 18 ++++-------------- disk-utils/partx.c | 16 +++++++++++++++- 3 files changed, 21 insertions(+), 17 deletions(-) commit 635d9aa5dbcc734cabab1befeb99838630a7d9c0 Author: Sami Kerola Date: Thu Apr 13 17:52:35 2017 +0100 libblkid: add blkid_partitions_get_name() This new function can be use to enquiry what partition names libblkid is aware of. First use of this information will be in partx(8) to make bash completion to work without a magic list. Signed-off-by: Sami Kerola libblkid/docs/libblkid-sections.txt | 1 + libblkid/src/blkid.h.in | 1 + libblkid/src/libblkid.sym | 1 + libblkid/src/partitions/partitions.c | 16 ++++++++++++++++ 4 files changed, 19 insertions(+) commit abec3cb1de6c9721110571a918e642df9eda6e73 Author: Sami Kerola Date: Thu Apr 13 11:18:58 2017 +0100 docs: try to convince open(2) O_DIRECT rather than using raw device Tell in manual page that one should use open(2) O_DIRECT flag rather than raw device. Signed-off-by: Sami Kerola disk-utils/raw.8 | 4 ++++ 1 file changed, 4 insertions(+) commit 15a74f755a32a9458a68526d7591f8ccb9204e63 Author: Sami Kerola Date: Thu Apr 13 09:39:39 2017 +0100 blkid: add long options This change attempts to make tab completion more reasonable by alloging memorizable option names. That also has positive impact to manual page, in which referrals to other options are now easier to understand. All short options are kept exactly as they were to avoid ABI breakage. The only exception is -f option that getopt(3) recognized, but was not found from anywhere else. The -f has been part of blkid since the initial commit. Commit: 51410fc6deb29cae54a2669aafabae6c49f964fc Signed-off-by: Sami Kerola bash-completion/blkid | 70 +++++++++++++++++++++------- misc-utils/blkid.8 | 127 ++++++++++++++++++++++++-------------------------- misc-utils/blkid.c | 83 +++++++++++++++++++++------------ 3 files changed, 167 insertions(+), 113 deletions(-) commit 1b71d08c6306dc80b6c5855695789d4d22ff1500 Author: Sami Kerola Date: Wed Apr 12 18:59:54 2017 +0100 lsipc: fix options parsing and sync with man page Option --pid was never implemented so remove it from struct options and manual page. Interestingly this option was not in usage(). Short option string had 'u' that has never appear anywhere else, so it is also removed. Finally add options --bytes and --numeric-perms to manual page. Signed-off-by: Sami Kerola sys-utils/lsipc.1 | 7 +++++-- sys-utils/lsipc.c | 3 +-- 2 files changed, 6 insertions(+), 4 deletions(-) commit 74cc7c2515b15d285700204d55388a3d7d8a2ca4 Author: Karel Zak Date: Wed Apr 19 13:22:31 2017 +0200 column: parent and child has to be independent Signed-off-by: Karel Zak text-utils/column.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1c9de9dbc891f3cae8bfc56e3c46d6f852207923 Author: Karel Zak Date: Tue Apr 11 13:49:36 2017 +0200 tests: add tests for new column features Signed-off-by: Karel Zak tests/expected/column/table-headers | 42 +++++++++++++++++++++++ tests/expected/column/table-hide | 41 +++++++++++++++++++++++ tests/expected/column/table-long | 41 +++++++++++++++++++++++ tests/expected/column/table-order | 42 +++++++++++++++++++++++ tests/expected/column/table-right | 42 +++++++++++++++++++++++ tests/expected/column/table-tree | 42 +++++++++++++++++++++++ tests/expected/column/table-truncate | 42 +++++++++++++++++++++++ tests/expected/column/table-wrap | 56 +++++++++++++++++++++++++++++++ tests/ts/column/files/mountinfo | 41 +++++++++++++++++++++++ tests/ts/column/table | 65 ++++++++++++++++++++++++++++++++++++ 10 files changed, 454 insertions(+) commit 7e2a4ef700e2f49ad58e0c4c1f419a6cadd5f77c Author: Karel Zak Date: Tue Apr 11 13:48:41 2017 +0200 libsmartcols: add debug mesg to see width change Signed-off-by: Karel Zak libsmartcols/src/table.c | 1 + 1 file changed, 1 insertion(+) commit bd6b5a6498d7a33983cde032a42186fa1e534d0d Author: Karel Zak Date: Tue Apr 11 13:48:02 2017 +0200 column: force to follow specified width Signed-off-by: Karel Zak text-utils/column.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 838ca70ce724c05cd11a9aa264e47dd48fa90edf Author: Karel Zak Date: Tue Apr 11 12:40:39 2017 +0200 columns: add note about width Signed-off-by: Karel Zak text-utils/column.1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c728e00012abe988d085f60d0325deb1654eaa07 Author: Karel Zak Date: Mon Apr 3 14:43:13 2017 +0200 column: use NOEXTREMES for the last column Signed-off-by: Karel Zak text-utils/column.1 | 4 +++- text-utils/column.c | 24 ++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) commit 90852c3e1295ad500e5b98ced9c5f3a515a2804f Author: Karel Zak Date: Fri Mar 31 15:09:45 2017 +0200 column: add support for trees Signed-off-by: Karel Zak text-utils/column.c | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 77 insertions(+), 1 deletion(-) commit 236092172a12d57548b04aecb1619a62d8376c68 Author: Karel Zak Date: Wed Mar 29 14:46:07 2017 +0200 column: clean up man page Signed-off-by: Karel Zak text-utils/column.1 | 49 +++++++++++++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 20 deletions(-) commit 7e947f48e749e9931ae60dcad677d806b5adcaaf Author: Karel Zak Date: Wed Mar 29 14:45:44 2017 +0200 column: clean up usage() and options order Signed-off-by: Karel Zak text-utils/column.c | 83 +++++++++++++++++++++++++++++------------------------ 1 file changed, 46 insertions(+), 37 deletions(-) commit 166271a90bb8e8df90a7c63c5d059042f99dcbc1 Author: Karel Zak Date: Wed Mar 29 14:08:14 2017 +0200 column: add --table-order Signed-off-by: Karel Zak text-utils/column.1 | 3 +++ text-utils/column.c | 36 +++++++++++++++++++++++++++++++++++- 2 files changed, 38 insertions(+), 1 deletion(-) commit 2483c4c9da2b7c6dffeb69a253c292816b8437fb Author: Karel Zak Date: Wed Mar 29 13:17:12 2017 +0200 column: fix typo Signed-off-by: Karel Zak text-utils/column.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9624f6157c635a991225a3c2ba5dc133e78844c8 Author: Karel Zak Date: Wed Mar 29 12:52:41 2017 +0200 column: add --table-hide Signed-off-by: Karel Zak text-utils/column.1 | 3 +++ text-utils/column.c | 11 ++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) commit 68916af3b94a72b93b428068986b5d98dc7f0255 Author: Karel Zak Date: Wed Mar 29 12:46:54 2017 +0200 column: add --table-wrap Signed-off-by: Karel Zak text-utils/column.1 | 4 ++++ text-utils/column.c | 15 +++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) commit 1ae24ec2390055b41191e32a20787bda3d0e9c1e Author: Karel Zak Date: Wed Mar 29 12:38:52 2017 +0200 column: add --table-noextreme Signed-off-by: Karel Zak text-utils/column.1 | 6 ++++++ text-utils/column.c | 20 ++++++++++++++------ 2 files changed, 20 insertions(+), 6 deletions(-) commit 3ba01db0aba93aaf6e377f8ae54e6c47201bd3ba Author: Karel Zak Date: Wed Mar 29 12:26:35 2017 +0200 column: add --table-truncate Signed-off-by: Karel Zak text-utils/column.1 | 5 +++++ text-utils/column.c | 45 ++++++++++++++++++++++++++++++++------------- 2 files changed, 37 insertions(+), 13 deletions(-) commit 01e335c9e49707e3361c1e15cfe712ac0958133f Author: Karel Zak Date: Wed Mar 29 12:00:48 2017 +0200 column: rename options Signed-off-by: Karel Zak text-utils/column.1 | 8 ++++---- text-utils/column.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) commit f05593e1007678d32262239ed26eef7b4906bf5c Author: Karel Zak Date: Mon Mar 6 13:32:52 2017 +0100 column: fix greedy initialization Signed-off-by: Karel Zak text-utils/column.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit dbed2f8c6313c28b4926bfad7596e51885736e00 Author: Karel Zak Date: Mon Mar 6 12:57:24 2017 +0100 column: add --table-colright Signed-off-by: Karel Zak text-utils/column.1 | 3 +++ text-utils/column.c | 69 ++++++++++++++++++++++++++++++++++++++++++++++------- 2 files changed, 63 insertions(+), 9 deletions(-) commit be03f652323ce65174877fcfdd4e252b7cb17ed3 Author: Karel Zak Date: Mon Mar 6 12:09:59 2017 +0100 column: use err_exclusive_options() Signed-off-by: Karel Zak text-utils/column.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) commit 86399c3306fb5d287faaa428361d3d16bca8e4ed Author: Karel Zak Date: Mon Mar 6 12:05:09 2017 +0100 column: make mbs/wcs conversions more robust Signed-off-by: Karel Zak text-utils/column.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9dbe8e1c023c7597b8885b39f50bbf1a452fcfdf Author: Karel Zak Date: Mon Mar 6 11:58:15 2017 +0100 column: add --json Signed-off-by: Karel Zak text-utils/column.1 | 5 +++++ text-utils/column.c | 25 ++++++++++++++++++++++--- 2 files changed, 27 insertions(+), 3 deletions(-) commit 11a1092ad6acc66c58eb97e6d5a8438430ab8deb Author: Karel Zak Date: Mon Mar 6 11:37:01 2017 +0100 column: add --table-colnames Signed-off-by: Karel Zak text-utils/column.1 | 3 +++ text-utils/column.c | 46 ++++++++++++++++++++++++++++++++++++---------- 2 files changed, 39 insertions(+), 10 deletions(-) commit 739e58ffe04830fe6eed60b1f0bb03fe26aa861d Author: Karel Zak Date: Fri Mar 3 12:20:47 2017 +0100 column: rename too generic macro Signed-off-by: Karel Zak text-utils/column.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 4762ae9d60f772d40bb2664170045447f7e4ff3a Author: Karel Zak Date: Fri Mar 3 12:17:44 2017 +0100 column: use libsmartcols for --table Signed-off-by: Karel Zak text-utils/column.c | 275 +++++++++++++++++++++++----------------------------- 1 file changed, 121 insertions(+), 154 deletions(-) commit 8f1be588163bc3fc5e58cf59252769fbfb04f095 Author: Karel Zak Date: Thu Mar 2 14:50:03 2017 +0100 column: clean up multi-byte #ifelse Signed-off-by: Karel Zak text-utils/column.c | 35 ++++++++++------------------------- 1 file changed, 10 insertions(+), 25 deletions(-) commit 37d84d6d26b9873f42bb57d1343435a1f85a5d5c Author: Karel Zak Date: Thu Mar 2 14:41:22 2017 +0100 column: reorder functions Signed-off-by: Karel Zak text-utils/column.c | 275 ++++++++++++++++++++++++++-------------------------- 1 file changed, 139 insertions(+), 136 deletions(-) commit d6b63b9f1db61e8c1f9474b6f40ee00c6dfdb06f Author: Karel Zak Date: Thu Mar 2 14:38:04 2017 +0100 column: rename functions Signed-off-by: Karel Zak text-utils/column.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 2acfa40ac128a5f271c20515b10adbd0403aba25 Author: Karel Zak Date: Thu Mar 2 14:34:08 2017 +0100 tests: add column(1) table test Signed-off-by: Karel Zak tests/expected/column/table | 0 tests/expected/column/table-default | 6 ++++++ tests/expected/column/table-input-separator | 6 ++++++ tests/expected/column/table-output-separator | 6 ++++++ tests/ts/column/files/table | 6 ++++++ tests/ts/column/files/table-sep | 6 ++++++ tests/ts/column/{separator_table => table} | 16 ++++++++++++---- 7 files changed, 42 insertions(+), 4 deletions(-) commit cee91191ea06822bf676aeb214f6f5b767bedc6b Author: Karel Zak Date: Thu Mar 2 14:21:16 2017 +0100 tests: add column(1) columnate test Signed-off-by: Karel Zak tests/expected/column/columnate | 0 tests/expected/column/columnate-fill-cols-250 | 1 + tests/expected/column/columnate-fill-cols-50 | 5 +++ tests/expected/column/columnate-fill-cols-80 | 3 ++ tests/expected/column/columnate-fill-rows-250 | 1 + tests/expected/column/columnate-fill-rows-50 | 5 +++ tests/expected/column/columnate-fill-rows-80 | 3 ++ tests/expected/column/fillrow | 4 -- tests/ts/column/columnate | 53 +++++++++++++++++++++++++++ tests/ts/column/files/onecolumn | 9 +++++ tests/ts/column/fillrow | 31 ---------------- 11 files changed, 80 insertions(+), 35 deletions(-) commit 3cc2ade8264e9e0533e9683792fa1b67a9de5082 Author: Karel Zak Date: Thu Mar 2 14:04:47 2017 +0100 column: don't ignore mbs_to_wcs() errors Signed-off-by: Karel Zak text-utils/column.c | 2 ++ 1 file changed, 2 insertions(+) commit 4219aa375664dc3c7f380068b7a4e060fc8e8f33 Author: Karel Zak Date: Thu Mar 2 14:00:53 2017 +0100 tests: add column/files directory Signed-off-by: Karel Zak tests/ts/column/{input => files/fivecols} | 0 tests/ts/column/fillrow | 2 +- tests/ts/column/multi-file | 6 +++--- tests/ts/column/separator_table | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) commit 0784187d141f1889dca331312c4c668502d0f4bb Author: Karel Zak Date: Wed Mar 1 15:05:47 2017 +0100 column: make input() more generic * remove line size limit * use multi-byte rather than wchar when read input * prepare for future libsmartcols use in input() for table Signed-off-by: Karel Zak text-utils/column.c | 115 ++++++++++++++++++++++++---------------------------- 1 file changed, 53 insertions(+), 62 deletions(-) commit 2593c139980d549878b782d1c3931f258b332021 Author: Karel Zak Date: Wed Mar 1 13:58:00 2017 +0100 column: use colntrol struct on more places Signed-off-by: Karel Zak text-utils/column.c | 119 +++++++++++++++++++++++++++------------------------- 1 file changed, 61 insertions(+), 58 deletions(-) commit 7d07df62a22703f14f36114ae7df17d1efc82097 Author: Karel Zak Date: Wed Mar 1 13:11:59 2017 +0100 columns: add control struct Signed-off-by: Karel Zak text-utils/column.c | 56 +++++++++++++++++++++++++++++++++-------------------- 1 file changed, 35 insertions(+), 21 deletions(-) commit 38d691921ce692ffd9e4584262ce4d3f9dfd3121 Author: Karel Zak Date: Fri Feb 24 14:05:59 2017 +0100 column: split old and new code Signed-off-by: Karel Zak configure.ac | 3 +- text-utils/Makemodule.am | 10 +- text-utils/column-old.c | 491 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 502 insertions(+), 2 deletions(-) commit d4ab297043c766a73018d3e179dc97eb4714ec61 Merge: 13944f3 20f47ea Author: Karel Zak Date: Tue May 2 11:28:42 2017 +0200 Merge branch 'master' of https://github.com/pali/util-linux * 'master' of https://github.com/pali/util-linux: tests: Add UDF hdd images created by Linux mkudffs 1.3 tests: Rename udf-hdd-mkudffs* images to indicate used mkudffs version libblkid: udf: For better readibility use one snprintf call instead multiple in loop commit 13944f3d053c10e33a0342813473a58030c2d0c6 Merge: dc9a23f 5741565 Author: Karel Zak Date: Tue May 2 11:12:33 2017 +0200 Merge branch '170419' of github.com:jwpi/util-linux * '170419' of github.com:jwpi/util-linux: hwclock: use a consistent name for --predict hwclock: remove unneeded braces hwclock: make clock test mode message consistent hwclock: extra messages for debug only commit 20f47eaab56c04f66187fa40844b763c4856d305 Author: Pali Rohár Date: Mon May 1 10:03:08 2017 +0200 tests: Add UDF hdd images created by Linux mkudffs 1.3 $ dd if=/dev/zero of=udf-hdd-mkudffs-1.3-1.img bs=1M count=10 $ mkudffs -l Label -b 512 udf-hdd-mkudffs-1.3-1.img $ dd if=/dev/zero of=udf-hdd-mkudffs-1.3-2.img bs=1M count=10 $ mkudffs -l Label udf-hdd-mkudffs-1.3-2.img tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-1 | 9 +++++++++ tests/expected/blkid/low-probe-udf-hdd-mkudffs-1.3-2 | 9 +++++++++ tests/ts/blkid/images-fs/udf-hdd-mkudffs-1.3-1.img.xz | Bin 0 -> 2364 bytes tests/ts/blkid/images-fs/udf-hdd-mkudffs-1.3-2.img.xz | Bin 0 -> 2380 bytes 4 files changed, 18 insertions(+) commit ee069f5f337635956905335ac15970c71e824a0c Author: Pali Rohár Date: Mon May 1 09:32:01 2017 +0200 tests: Rename udf-hdd-mkudffs* images to indicate used mkudffs version ...be-udf-hdd-mkudffs => low-probe-udf-hdd-mkudffs-1.0.0-1} | 0 ...e-udf-hdd-mkudffs2 => low-probe-udf-hdd-mkudffs-1.0.0-2} | 0 ...df-hdd-mkudffs.img.xz => udf-hdd-mkudffs-1.0.0-1.img.xz} | Bin ...f-hdd-mkudffs2.img.xz => udf-hdd-mkudffs-1.0.0-2.img.xz} | Bin 4 files changed, 0 insertions(+), 0 deletions(-) commit 49d84dbedcb9b1babe5e5f93709163452e51f872 Author: Pali Rohár Date: Mon May 1 09:28:22 2017 +0200 libblkid: udf: For better readibility use one snprintf call instead multiple in loop libblkid/src/superblocks/udf.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit dc9a23fe66356ece744e27d14bb5fc3368a1a829 Author: Karel Zak Date: Fri Apr 28 13:25:41 2017 +0200 lib/timer: add comment Signed-off-by: Karel Zak lib/timer.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit ed1c112666e67dd9c1ae427a94acd1249fa8314f Merge: 8503c0e e2cd107 Author: Karel Zak Date: Fri Apr 28 13:02:02 2017 +0200 Merge branch 'timer' of https://github.com/Villemoes/util-linux commit 8503c0ed304e96b32a663c9dc425498f92d1905c Author: Karel Zak Date: Fri Apr 28 12:39:21 2017 +0200 libmount: (docs) remove unwanted tag Signed-off-by: Karel Zak libmount/src/context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a8771daefecf8201cdb96e493e61b048d783842c Author: Karel Zak Date: Fri Apr 28 11:19:59 2017 +0200 tests: update libmount outputs Signed-off-by: Karel Zak tests/expected/libmount/loop-conflict | 2 +- tests/expected/libmount/loop-o-loop-val-conflict | 2 +- tests/expected/libmount/loop-o-loop-val-initialized | 2 +- tests/expected/libmount/loop-overlay | 6 +++--- tests/ts/libmount/loop | 9 ++++++--- tests/ts/libmount/loop-overlay | 10 ++++++---- 6 files changed, 18 insertions(+), 13 deletions(-) commit 0361cb6f9bb8f74438c0577d968eb6f4bf9a2515 Author: Karel Zak Date: Fri Apr 28 11:03:24 2017 +0200 libmount: add read-only warning Signed-off-by: Karel Zak libmount/src/context.c | 2 +- libmount/src/context_mount.c | 2 ++ sys-utils/mount.c | 8 ++------ 3 files changed, 5 insertions(+), 7 deletions(-) commit 79055689a2da1855c2d2fe090fec5b9399400d72 Author: Karel Zak Date: Thu Apr 27 14:26:45 2017 +0200 include/exitcodes: remove mount(8) exit codes All defined by libmount now. Signed-off-by: Karel Zak include/exitcodes.h | 10 ---------- 1 file changed, 10 deletions(-) commit 8e9039afe4d8bf50103cfd159e38e93eeec703bb Author: Karel Zak Date: Thu Apr 27 14:26:16 2017 +0200 fstrim: use MNT_EX_* from libmount Signed-off-by: Karel Zak sys-utils/fstrim.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit e3a7a5f8f058ac5c1a78a088f04e30a3a1b77889 Author: Karel Zak Date: Thu Apr 27 14:26:02 2017 +0200 mount: use MNT_EX_* from libmount Signed-off-by: Karel Zak sys-utils/mount.c | 57 +++++++++++++++++++++++++++---------------------------- 1 file changed, 28 insertions(+), 29 deletions(-) commit e058a6c1a0ee3969a08550ed2ae0259d600ba4ab Author: Karel Zak Date: Thu Apr 27 14:25:57 2017 +0200 umount: use MNT_EX_* from libmount Signed-off-by: Karel Zak sys-utils/umount.c | 55 +++++++++++++++++++++++++++--------------------------- 1 file changed, 27 insertions(+), 28 deletions(-) commit 7b53418bf0f5bd6bc7c399f93ea8b6d12b1fec37 Author: Karel Zak Date: Thu Apr 27 14:17:50 2017 +0200 libmount: (docs) add unused declarations Signed-off-by: Karel Zak libmount/docs/libmount-sections.txt | 1 + 1 file changed, 1 insertion(+) commit e1706a6783c8b63fb66c4a065ad8ee3807bb5f2d Author: Karel Zak Date: Thu Apr 27 14:11:50 2017 +0200 mount, umount: use mnt_context_get_excode() Signed-off-by: Karel Zak sys-utils/mount.c | 360 +++-------------------------------------------------- sys-utils/umount.c | 125 ++----------------- 2 files changed, 28 insertions(+), 457 deletions(-) commit ea848180dd344ec2859b5ca329d9b1375ddde1ac Author: Karel Zak Date: Thu Apr 27 14:01:26 2017 +0200 libmount: add mnt_context_get_excode() It's pretty complex task to make mount(8) and umount(8) return code and generate error message. It seems better to do that in the libmount rather than force all library users to duplicate mount(8) mk_exit_code() functions. It also means that all the messages will be translated only once. Changes: * all error messages are printed by warn() * no more multi-line messages * all messages prefixed by mount target (mountpoint) * library provides mount(8) compatible MNT_EX_* codes Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1429531 Signed-off-by: Karel Zak libmount/docs/libmount-sections.txt | 16 +- libmount/src/context.c | 97 ++++++++++- libmount/src/context_mount.c | 329 ++++++++++++++++++++++++++++++++++++ libmount/src/context_umount.c | 80 +++++++++ libmount/src/libmount.h.in | 73 +++++++- libmount/src/libmount.sym | 1 + libmount/src/mountP.h | 18 ++ 7 files changed, 609 insertions(+), 5 deletions(-) commit 57415653a667cf2442d019f62287534931ab3da4 Author: J William Piggott Date: Thu Apr 20 09:34:33 2017 -0400 hwclock: use a consistent name for --predict The predict function name is documented as '--predict', but the code uses '--predict-hc'. This works okay, except that the 'mutually exclusive' error message prints the undocumented name. * sys-utils/hwclock.c: rename 'predict-hc' to 'predict' so that it matches the man-page. This should not be a problem because 'predict-hc' was never documented. Signed-off-by: J William Piggott sys-utils/hwclock.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 019093776a26f1df50bbde946e865a85349e3cde Author: J William Piggott Date: Wed Apr 19 20:27:53 2017 -0400 hwclock: remove unneeded braces Signed-off-by: J William Piggott sys-utils/hwclock.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 142efd24061f2ba8a825c4d2368b6271b2d79c2f Author: J William Piggott Date: Wed Apr 19 19:54:28 2017 -0400 hwclock: make clock test mode message consistent Signed-off-by: J William Piggott sys-utils/hwclock.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 66c83c1c7f4294fbe1b1683e2c972205650c6b85 Author: J William Piggott Date: Wed Apr 19 19:29:26 2017 -0400 hwclock: extra messages for debug only Only print extra save_adjtime() messages in debug mode. This makes the --test mode output consistent accross functions. Signed-off-by: J William Piggott sys-utils/hwclock.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 6dede2f2f7c5271b95c0361abd647af2a731b1dc Author: Karel Zak Date: Wed Apr 26 17:27:02 2017 +0200 libmount: support MS_RDONLY on write-protected devices This feature is supported by mount(8) only. It seems better move this code to libmount. The results is more simple mount(8) and the feature is accessible for all libmount users. Signed-off-by: Karel Zak libmount/docs/libmount-sections.txt | 3 +++ libmount/src/context.c | 47 ++++++++++++++++++++++++++++++++++++- libmount/src/context_mount.c | 27 +++++++++++++++++++++ libmount/src/libmount.h.in | 5 ++++ libmount/src/libmount.sym | 6 +++++ libmount/src/mountP.h | 2 ++ sys-utils/mount.8 | 6 ++++- sys-utils/mount.c | 46 ++++++++++++------------------------ 8 files changed, 109 insertions(+), 33 deletions(-) commit e2cd1072b44fe4fe269ee0e9ee51e05e946a011d Author: Rasmus Villemoes Date: Wed Apr 26 13:03:10 2017 +0200 lib/timer.c: prevent pathological race condition flock(1) uses the timer facility to interrupt a blocking flock(2) call. However, in a pathological case (or with a sufficiently short timeout), the timer may fire and the signal be delivered after the timer is set up, but before we get around to doing the flock(2) call. In that case, we'd block forever. Checking timeout_expired right before calling flock(2) does not eliminate that race, so the only option is to make the timer fire repeatedly. Having the timer fire after we've returned from flock(2) is not a problem, since we only check timeout_expired in case of EINTR (also, this firing after return could also happen with the current code). There is currently one other user of setup_timer (misc-utils/uuidd.c), but in that case the signal handler simply exits. Future users of setup_timer obviously need to ensure that they can tolerate multiple signal deliveries. Choosing 1% of the initial timeout as the repeating interval is somewhat arbitrary. However, I put a lower bound of 0.01s, since setting the interval much smaller than this may end up effectively live-locking the process, handling a never-ending stream of signals. Signed-off-by: Rasmus Villemoes lib/timer.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit c6a9147fd8b21bdbdaa0ea363d3db9a819d2b5f7 Author: Rasmus Villemoes Date: Wed Apr 26 12:56:08 2017 +0200 lib/timer.c: remove bogus SA_SIGINFO from timer_settime call The only valid flag for timer_settime is TIMER_ABSTIME, which we certainly don't want here. This seems to be harmless since timer_settime doesn't validate the flags parameter, TIMER_ABSTIME is universally 0x1, and no architecture has SA_SIGINFO == 1. Signed-off-by: Rasmus Villemoes lib/timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 863cf02a1486810918abc884f8ee8d08c9921bc7 Author: Karel Zak Date: Wed Apr 26 12:34:48 2017 +0200 umount: fix typo Signed-off-by: Karel Zak sys-utils/umount.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 85bfb519afcbccccb63849b1a348dde76ff6bb83 Author: Patrick Steinhardt Date: Sun Apr 23 02:33:04 2017 +0200 switch_root: unlink files without _DIRENT_HAVE_D_TYPE When _DIRENT_HAVE_D_TYPE is not defined, we need to always fstat the directory entry in order to determine whether it is a directory or not. If we determine that the file is indeed a directory on the same device, we proceed to recursively remove its contents as well. Otherwise, we simply skip removing the entry altogether. This logic is not entirely correct though. Note that we actually skip deletion of the entry if it is either not a directory or if it is not on the same device. The second condition is obviously correct here, as we do not want to delete files on other mounts here. But skipping deletion of the entry itself if it is not a directory is wrong. When _DIRENT_HAVE_D_TYPE is defined, this condition should never be triggered, as we have already determined that the entry is a directory. But if it is not, we will always do the fstat and check. Because of this, we will now skip deletion of all files which are not directories, which is wrong. Fix the issue by disentangling both conditions. We now first check whether we are still on the same device - if not, we skip recursive deletion as well as deletion of the directory entry. Afterwards, we check whether it is a directory - if so, we do delete its contents recursively. And finally, we will now unlink the entry disregarding whether it is a directory or not. Signed-off-by: Patrick Steinhardt sys-utils/switch_root.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 97fc6ccf791fc44f945f779608051a7bd3b6ea65 Merge: 7095232 9bf1375 Author: Karel Zak Date: Wed Apr 26 11:17:46 2017 +0200 Merge branch '170415' of github.com:jwpi/util-linux * '170415' of github.com:jwpi/util-linux: optutils.h: don't print non-graph characters hwclock: improve audit control hwclock: --set and --predict segmentation fault hwclock: make epoch functions alpha only hwclock: improve default function handling commit 7095232d21232ca1ab307fbdd1a36471347f23c6 Author: Karel Zak Date: Tue Apr 25 17:05:09 2017 +0200 libfdisk: fix NLS support The current libfdisk code uses gettext() to translate strings. It means it follows the default text domain (as set by textdomain(3) usually in the main program). This is useless for public shared library. We have call private bindtextdomain() and use dgettext() with private domain name to be independent on the main program. For this purpose include/nls.h supports UL_TEXTDOMAIN_EXPLICIT to use dgettext(). Note that libfdisk will continue to use util-linux.po, rather than keep the texts in the separate file. The nls.h has to be included only from fdiskP.h to be sure that nls.h works as expected for the library. Signed-off-by: Karel Zak include/nls.h | 14 ++++++++++++-- libfdisk/src/bsd.c | 1 - libfdisk/src/context.c | 2 ++ libfdisk/src/dos.c | 1 - libfdisk/src/fdiskP.h | 13 ++++++++++++- libfdisk/src/gpt.c | 1 - libfdisk/src/parttype.c | 1 - libfdisk/src/sgi.c | 1 - libfdisk/src/sun.c | 1 - 9 files changed, 26 insertions(+), 9 deletions(-) commit be685b98c03b43c34d0f6e0447361f7d2dcdae9a Author: Karel Zak Date: Wed Apr 19 14:28:16 2017 +0200 lsblk: don't duplicate columns $ lsblk --discard --perms NAME DISC-ALN DISC-GRAN DISC-MAX DISC-ZERO NAME SIZE OWNER GROUP MODE sdb 0 0B 0B 0 sdb 74.5G root disk brw-rw---- └─sdb1 0 0B 0B 0 └─sdb1 74.5G root disk brw-rw---- sda 0 512B 2G 0 sda 223.6G root disk brw-rw---- ├─sda4 0 512B 2G 0 ├─sda4 50G root disk brw-rw---- ├─sda2 0 512B 2G 0 ├─sda2 200M root disk brw-rw---- ├─sda5 0 512B 2G 0 ├─sda5 35.1G root disk brw-rw---- ├─sda3 0 512B 2G 0 ├─sda3 130.3G root disk brw-rw---- ├─sda1 0 512B 2G 0 ├─sda1 200M root disk brw-rw---- └─sda6 0 512B 2G 0 └─sda6 7.8G root disk brw-rw---- ... see NAME column. It's fine to support duplicated columns when requested by user (e.g. -o NAME,NAME,SIZE), but it does not make sense for the default output when multiple command options specified. Signed-off-by: Karel Zak misc-utils/lsblk.c | 104 ++++++++++++++++++++++++++++------------------------- 1 file changed, 55 insertions(+), 49 deletions(-) commit f2df436564a5dbd8770855d84a4b361aff7b246f Author: Damien Le Moal Date: Wed Apr 19 09:25:58 2017 +0900 lsblk: add ZONED column Add the column "ZONED" to the output to display block devices zone model information. Example output: > lsblk -o+ZONED NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT ZONED sda 8:0 0 111.8G 0 disk none ├─sda1 8:1 0 500M 0 part /boot none ├─sda2 8:2 0 87.3G 0 part / none └─sda3 8:3 0 24G 0 part [SWAP] none sdb 8:16 0 12.8T 0 disk host-managed sdc 8:32 0 5.5T 0 disk host-managed or: > lsblk --zoned NAME ZONED sda none ├─sda1 none ├─sda2 none └─sda3 none sdb host-managed sdc host-managed Signed-off-by: Damien Le Moal misc-utils/lsblk.8 | 3 +++ misc-utils/lsblk.c | 15 +++++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) commit 02a376f2eed8e5488bf963231cbc490e5af9537f Author: Karel Zak Date: Wed Apr 19 14:00:07 2017 +0200 libfdisk: (gpt) rename to gpt_entry_is_used() The current function name is inconsistent with the rest of the code. Signed-off-by: Karel Zak libfdisk/src/gpt.c | 43 ++++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 21 deletions(-) commit e6b4209d954a6d34b2544e4dde29074a69b477e1 Author: Pavel Butsykin Date: Tue Apr 18 18:59:18 2017 +0300 libfdisk: allow to change an existing extended partition Signed-off-by: Pavel Butsykin libfdisk/src/dos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9bf13750cb55d747314a472c306e66b02a2abda9 Author: J William Piggott Date: Tue Apr 18 20:57:27 2017 -0400 optutils.h: don't print non-graph characters There is no eloquent way to exclude/include arch dependent arguments from the ul_excl_t array. So when an arch dependent argument is left undefined err_exclusive_options() was printing out-of-bounds values. This commit cause them to be skipped instead. err_exclusive_options() shouldn't be printing out-of-bounds values in any case. Also change the error massage from 'options' to 'arguments' as some programs, like hwclock, distinguish between options and functions. Signed-off-by: J William Piggott include/optutils.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit d8949acaa7a5b3023df115f1bb8b41d0c01f21dd Author: J William Piggott Date: Tue Apr 18 18:51:43 2017 -0400 hwclock: improve audit control Move audit control to option parsing. This fixes non-alpha build error and cleans up an unruly 'if' statement. Having audit control in option parsing may also draw awareness to the audit system when adding new functions, which could easily be overlooked otherwise. Signed-off-by: J William Piggott sys-utils/hwclock.c | 17 ++++++----------- sys-utils/hwclock.h | 2 -- 2 files changed, 6 insertions(+), 13 deletions(-) commit 969bffb748feea71690193ba6c6405e36a22af9b Author: J William Piggott Date: Tue Apr 18 10:42:02 2017 -0400 hwclock: --set and --predict segmentation fault Segmentation fault for --set or --predict when the --date option is not included. * sys-utils/hwclock.c: exit with an error message when the required --date option is missing. Signed-off-by: J William Piggott sys-utils/hwclock.c | 4 ++++ 1 file changed, 4 insertions(+) commit 039a0ceccf11f293ce9db96cc9f556f861505e6e Author: J William Piggott Date: Mon Apr 17 18:39:56 2017 -0400 hwclock: make epoch functions alpha only It's been 19.1315 years since the comment below was written and the kernel has actually gone further away from allowing an RTC epoch on ISA machines. /* * Maintenance note: This should work on non-Alpha machines, but the * evidence today (98.03.04) indicates that the kernel only keeps the epoch * value on Alphas. If that is ever fixed, this function should be changed. */ The current behavior is to accept the epoch options on ISA machines only to print a lengthy message explaining that you cannot use them. This patch removes that behavior, making the epoch functions truly Alpha only, as the man-page states that they are. * sys-utils/hwclock.c: make epoch function alpha only. * sys-utils/hwclock.h: same. Signed-off-by: J William Piggott sys-utils/hwclock.c | 61 ++++++++++++++++++++--------------------------------- sys-utils/hwclock.h | 8 +++++-- 2 files changed, 29 insertions(+), 40 deletions(-) commit 8b73ff963398bededb182b09e5788454e7eeea1d Author: J William Piggott Date: Sun Apr 16 19:10:48 2017 -0400 hwclock: improve default function handling Removes long default function test. Instead handle the default when the options are parsed. Also fixes the non-linux build failure reported by Rudi: http://marc.info/?l=util-linux-ng&m=149189833115871 Reported-by: Ruediger Meier Signed-off-by: J William Piggott sys-utils/hwclock.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit d9f90f697c41a7040e5ff5e11a42c41adab173f6 Author: Karel Zak Date: Tue Apr 18 12:42:58 2017 +0200 tests: update script(1) tests Signed-off-by: Karel Zak tests/expected/script/options-append | 8 ++++---- tests/expected/script/options-force | 8 ++++---- tests/expected/script/options-quiet | 8 ++++++-- tests/expected/script/options-return | 16 ++++++++-------- 4 files changed, 22 insertions(+), 18 deletions(-) commit 6f3c9c34306cb40115dc878629667c22a36115a4 Author: Karel Zak Date: Tue Apr 18 12:12:44 2017 +0200 script: always write stat and done message to typescript file And remove usec from timestamp. Signed-off-by: Karel Zak term-utils/script.1 | 3 +-- term-utils/script.c | 9 +++++---- 2 files changed, 6 insertions(+), 6 deletions(-) commit 4213390597a015065fb9fb3db87f2a0e620e80ca Merge: 6ca1b9d bdef362 Author: Karel Zak Date: Tue Apr 18 12:02:01 2017 +0200 Merge branch 'script_newline' of https://github.com/renyuneyun/util-linux * 'script_newline' of https://github.com/renyuneyun/util-linux: fix the position of newline in the time output of 'script' commit 6ca1b9d3d0b705cae74ffaa055cc240ce728f56f Merge: b1484d8 768f315 Author: Karel Zak Date: Tue Apr 18 11:35:27 2017 +0200 Merge branch 'bash-completion' of git://github.com/kerolasa/lelux-utiliteetit * 'bash-completion' of git://github.com/kerolasa/lelux-utiliteetit: bash-completion: update text-utils bash-completion: update term-utils bash-completion: update sys-utils bash-completion: update schedutils bash-completion: update misc-utils bash-completion: update login-utils bash-completion: update disk-utils commit b1484d8d37a8bb90dca99131b08e38d6c8399cac Author: Damien Le Moal Date: Wed Apr 12 18:20:32 2017 +0900 blkzone: Fix zone condition strings handling Fixed the condition strings for implicit open and explicit open to match the man page defined strings ("oi" and "oe"). Also while at it, correct the condition_str array entries adding the reserved "xC" case so that the read_only, full and offline conditions match the condition codes. This increases the array size to 16, so also fix the condition code masking when displaying the result. Signed-off-by: Damien Le Moal sys-utils/blkzone.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 73be2127cb26b9fdfc6b9417b431d792a028423d Author: Karel Zak Date: Tue Apr 18 11:18:36 2017 +0200 lscpu: use macro for path to DMI Just to be consistent with lscpu.c. Signed-off-by: Karel Zak sys-utils/lscpu-dmi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 92a6392c41c11bcb49af9f129dfbd1fed651f044 Author: Ard Biesheuvel Date: Wed Apr 12 10:11:29 2017 +0100 lscpu: use sysfs for table access if available On ARM systems, accessing SMBIOS tables via /dev/mem using read() calls is not supported. The reason is that such tables are usually located in EFI_RUNTIME_SERVICE_DATA memory, which is not covered by the linear mapping on those systems, and so read() calls will fail. So instead, use the /sys/firmware/dmi/tables/DMI sysfs file, which contains the entire structure table array, and will be available on any recent Linux system, even on ones that only export the rev3 SMBIOS entry point, which is currently ignored by lscpu. Note that the max 'num' value is inferred from the size. This is not a limitation of the sysfs interface, but a limitation of the rev3 entry point, which no longer carries a number of array elements. Signed-off-by: Ard Biesheuvel Tested-by: Alexander Graf Reviewed-by: Alexander Graf sys-utils/lscpu-dmi.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit ecfeae90a2947fb82e19076131a3ef166374b249 Author: Stanislav Brabec Date: Tue Apr 11 16:12:52 2017 +0200 libmount: Ensure utab.lock mode 644 If utab.lock is created by a process with a restricted umask, utab.lock is created with restricted permissions. It breaks userspace monitor. Ensure that the mode is always 644. Signed-off-by: Stanislav Brabec libmount/src/lock.c | 5 +++++ 1 file changed, 5 insertions(+) commit 1ab3f16b43ff76bb3d72428cc65d77a07dd83a77 Author: Sami Kerola Date: Tue Apr 11 11:04:12 2017 +0100 bash-completion: update fincore Add RES column to --output completions. Commit: e4e8b57be2b63fed82647e4d5efd0e0eaf36b19e Signed-off-by: Sami Kerola bash-completion/fincore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fb6f70184df10944391dd6a6904c47174fb736f1 Author: Sami Kerola Date: Tue Apr 11 11:01:06 2017 +0100 bash-completion: update hwclock Add --udate-drift [1], remove --badyear [2], and use the same argument for --date as in manual page[3]. Commit [1]: f276d71a3ef6a65299deb5e14a188e0a786ecebd Commit [2]: f6374e1fb33d5ca726b72212b787e11fea78c0ca Commit [3]: cc5ec6936ea3c218b3e8c46880659db5ee01329f Signed-off-by: Sami Kerola bash-completion/hwclock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2eb243c2b51c9ad7b56c0ac537663d84d890a0a1 Merge: d054224 697bfcf Author: Karel Zak Date: Tue Apr 18 11:07:09 2017 +0200 Merge branch '170409' of github.com:jwpi/util-linux * '170409' of github.com:jwpi/util-linux: hwclock: remove residual 'compare' from man-page hwclock: fix whitespace in hwclock-rtc.c docs: parse-date.txt fix whitespace parse-date: remove extraneous form feed hwclock: use errtryhelp() commit 768f3152309e44c1a6b927c7d3597808738b5b85 Author: Sami Kerola Date: Tue Apr 11 21:37:40 2017 +0100 bash-completion: update text-utils hexdump: Add --color option. Commit: 098ab0778f5a46ab4519c8404fd4ba8ec137368b Signed-off-by: Sami Kerola bash-completion/hexdump | 5 +++++ 1 file changed, 5 insertions(+) commit e4fc3d574c836d5a8b2ddbb4660b96609f028252 Author: Sami Kerola Date: Wed Apr 12 10:48:31 2017 +0100 bash-completion: update term-utils scriptreplay: Add --maxdelay option. Commit: 7f1d48363823f7da47ca56f84eb4b2155c5ed36b setterm: Add --resize coption. Commit: 5d795999511adc455d223be8281948796bd7d087 write: List only users who are online and determine tty based on given user name. Signed-off-by: Sami Kerola bash-completion/scriptreplay | 3 ++- bash-completion/setterm | 1 + bash-completion/write | 8 ++------ 3 files changed, 5 insertions(+), 7 deletions(-) commit d092911bcda64f4bad038ca2aa874c34a7737d47 Author: Sami Kerola Date: Tue Apr 11 19:02:21 2017 +0100 bash-completion: update sys-utils blkdiscard: Add --step [1] and --zeroout [2] options. Commit [1]: c472a7e35ae40652bdcf66c08a23bd50d48d1884 Commit [2]: 7154cc892688f3c58cbbcdc2055f2635c1d0ef5b chmem: Commit: 30e1ea8ba1984488fdb16506ebafe4dc23280e5a dmesg: Add --time-format. Commit: babf605d2ca969a434f2f14579ddf44252adff4f fallocate: Add --insert-range [1], --collapse-range [2], --zero-range [3], and --posix [4] options. Also make the options to be in same order as usage() output. Commit [1]: b439065634e693dda385a6e5269e1d9258d6d471 Commit [2]: 83cc932d7412cb9d23bf9f06a9a54c8566e1a788 Commit [3]: 1fd4f609ee65be0f376ed28322fc3593026d39e4 Commit [4]: 833f9a7aae713278eec5f85266597482f18c7370 Command [5]: fallocate --help | awk '/--/ {print "\t\t\t\t" $2}' flock: Add --no-fork option. Commit: 703251401cb11ee5d00a6b8f8bd9dc80c160f476 hwclock: Add --udate-drift [1], remove --badyear [2], and use the same argument for --date as in manual page[3]. Commit [1]: f276d71a3ef6a65299deb5e14a188e0a786ecebd Commit [2]: f6374e1fb33d5ca726b72212b787e11fea78c0ca Commit [3]: cc5ec6936ea3c218b3e8c46880659db5ee01329f ldattach: Add --intro-command and --pause. Commit: 8596f6391461bac53f5bab48f8c8b17a7c459f28 losetup: Add --nooverlap [1], --json [2], --noheadings and --raw [3] options, and direct io aka DIO output field [4]. Commit [1]: 9a94b634a343e83bfa2a9d311074e3e520abdddd Commit [2]: 4827093d4b3090389ae0cabb7d8b522cf794ef90 Commit [3]: 9f56106df6b49864ba604f6824f9fad5aeabd17a Commit [4]: faeef4d2e9d5e38bed57846ba903009990f24422 lscpu: Add --json [1] and --physical [2] options. Add DRAWER [3] to output fields. Commit [1]: 19a5510b964c6163e7117913d3de35aba3cd0006 Commit [2]: 0d2b5d2a72bc6619229a4d7456fbb70eda561825 Commit [3]: b3adf6ef6676ca8c10ecdda3e1c92a861df3b885 lsipc: Update output columns (earlier field names were almost completely incorrect). Remove --colon-separate and --print0 [1] options. Add --time-format, --bytes, --numeric-perms [2], and --list [3] options. Commit [1]: 2a7150ac2e57418f471cca0aae259b7bcd0b90db Commit [2]: 9d20ffda794208d26e6b3ed09fbc38d94d0b8fc6 Commit [3]: 2916afa3f510182987f88c17bade5dffb4aaf0b8 lsmem: Commit: cad2d1ac9291112bd9199b36a12335f6770356f3 lsns: Add cgroup --type argument. Commit: 2b8889c44b6752e92bfb982a5eaa2255a129e072 mount: Use /proc and kernel module listing for --type argument list. Some of the items in the lists do not make much sense, but this is still better than a static list provided by package maintainer. mountpoint: Remove fixme item that was left in place when this completion was originally wrote. nsenter: Add --cgroup [1], --setuid, --setgid [2], --preserve-credentials [3] and, --all [4] option. Commit [1]: f9e7b66dbded19d798b883be68b0613749d7b8bb Commit [2]: 6b9e5bf670c70690d44b8ce4055e1997fb0b6496 Commit [3]: e99a6626d6262266f012a20ae69c8e4573ee22fd Commit [4]: 974cc006f122f36e2187cedb9d3e58dc2d24814c rtcwake: Add --auto [1], --adjfile [2], and --list-modes [3] options. Commit [1]: 49ebda9b89fc7360d15ca651b8492633b3bbc1d7 Commit [2]: 3a2f3e82bba616c93d80fd88938b38144e66eee7 Commit [3]: 43a44bfc6da8f4666c5dd6bc03c89713e6c4bd46 setarch: Add --list [1] option. Commit [1]: 5edb0ea6bbd57dd916417737f98c9109dc1ecb5b setsid: Add --wait option. Commit: 0dde19974bcbb07ce977992ab04b7dfa752d99b3 umount: Use /proc and kernel module listing for --type argument list. unshare: Add --cgroup [1], --fork [2], --mount-proc [3], --map-root-user, --setgroups [4], and --propagation [5] options. Commit [1]: f9e7b66dbded19d798b883be68b0613749d7b8bb Commit [2]: 5088ec338fe5dcd7e9a2d8daf7e7fa7dd6f87c27 Commit [3]: 6728ca101e7edc223a8eb99201197831d8daa61f Commit [4]: fbceefded6645de693d576cd988a703a6f60d207 Commit [5]: f0f22e9c6f109f8c1234caa3173368ef43b023eb zramctl: Add new output fields MEM-LIMIT, MEM-USED, and MIGRATED. Commit: bffc9174b89d8d9fefe7a77b9350ab8f0dbef54f Signed-off-by: Sami Kerola bash-completion/Makemodule.am | 6 ++++ bash-completion/blkdiscard | 13 ++++++-- bash-completion/chmem | 29 +++++++++++++++++ bash-completion/dmesg | 6 ++++ bash-completion/fallocate | 16 +++++++--- bash-completion/flock | 1 + bash-completion/hwclock | 4 +-- bash-completion/ldattach | 10 ++++++ bash-completion/losetup | 10 ++++-- bash-completion/lscpu | 4 ++- bash-completion/lsipc | 74 +++++++++++++++++++++++-------------------- bash-completion/lsmem | 52 ++++++++++++++++++++++++++++++ bash-completion/lsns | 2 +- bash-completion/mount | 31 ++++++++---------- bash-completion/mountpoint | 4 --- bash-completion/nsenter | 19 +++++++++-- bash-completion/rtcwake | 15 +++++++-- bash-completion/setarch | 17 ++++++---- bash-completion/setsid | 2 +- bash-completion/umount | 19 ++--------- bash-completion/unshare | 14 ++++++++ bash-completion/zramctl | 4 ++- 22 files changed, 253 insertions(+), 99 deletions(-) commit f2b9813286001ba9968f35ce3fb07272c5d1e6c7 Author: Sami Kerola Date: Tue Apr 11 21:50:09 2017 +0100 bash-completion: update schedutils ionice: Add --pgid and --uid options. Commit: bd2ff3d2d952d75a6707846831623455647a9a8d Signed-off-by: Sami Kerola bash-completion/ionice | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit c6b1d511d21cc5b0c760935e57559d4ec3a44bf8 Author: Sami Kerola Date: Tue Apr 11 11:02:25 2017 +0100 bash-completion: update misc-utils fincore: Add RES column to --output completions. Commit: e4e8b57be2b63fed82647e4d5efd0e0eaf36b19e findfs: Commit: 940817b736bceccca9be6b9b73e4dd7da0d89142 logger: Add --socket-errors [1] and --tcp [2] options. Commit [1]: d77dc29e6e18d39b1845282e8039ac7117f3bd1c Commit [2]: 68265d070d3041d16ab074ba25c610d6ef6c842e lsblk: Add HOTPLUG [1], SERIAL [2], and SUBSYSTEMS [3] output fields. Add --json [4], --output-all [5], and --paths [6] options. Commit [1]: 483987c275e461f4118a89d3be013698845d702b Commit [2]: 460c7afb79075bd5b39e7d4bc153aa41c939bab3 Commit [3]: 7f14ee1b551e839a4ae081c8d2b7633ca40a5823 Commit [4]: 4a102a4871fdb415f4de5af9ffb7a2fb8926b5d1 Commit [5]: 1b4d2a4a4aa7df52033d293f26cd4fa79f95578d Commit [6]: c7e76cd145b0c40e1d346203f3222f5937146939 lslocks: Add --noinaccessible option. Remove file argument completion, this command does not use that sort of command line input. Commit: f29bc6e1cc4ed9f76bded543c6ab393f674ec3ed mcookie: Add --max-size option. Commit: f7bac5731bf559216aa2f0e8be1d7f477e7cf41a wipefs: Add --backup option. Commit: 7e658c15a2c1fc5092a790afbe7d9d395d04b098 Signed-off-by: Sami Kerola bash-completion/Makemodule.am | 3 +++ bash-completion/fincore | 2 +- bash-completion/findfs | 34 ++++++++++++++++++++++++++++++++++ bash-completion/logger | 6 ++++++ bash-completion/lsblk | 20 +++++++++++--------- bash-completion/lslocks | 30 +++++++++++++----------------- bash-completion/mcookie | 6 +++++- bash-completion/wipefs | 13 ++++++++++++- 8 files changed, 85 insertions(+), 29 deletions(-) commit f4e8fd91d653ced2364ceb099b7a83e89ef70395 Author: Sami Kerola Date: Tue Apr 11 22:11:13 2017 +0100 bash-completion: update login-utils last: Broken since first commit. Commit: 41e5a92cf1cd8950df8b02fdd2ea8be571dbab02 Signed-off-by: Sami Kerola bash-completion/last | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) commit 99d8ed0ac53f8ede5dedcfb25fd5f9085b131f0b Author: Sami Kerola Date: Tue Apr 11 20:30:02 2017 +0100 bash-completion: update disk-utils fdformat: Add --from, --to, and --repair options. Commit: e0402441a143533d33d3c450471b2cd655407d77 fdisk: Add --output [1], --bytes [2], --wipe [3], --wipe-partition [4], and remove --geom- from from --cylinders, --heads, --sector options [5]. Commit [1]: fff8ad5882308825a131c645e4d28bcaef943351 Commit [2]: 354f8cc8cf06de44656fb83705c57062d04d1565 Commit [3]: cb9a4b0033eca429689a403be2a192fe2842f2e9 Commit [4]: ba465623d84b9e330f248a477d078b5f280b7943 Commit [5]: 4b4e391a28b4dfeb69781c20190bffe8622d1907 fsck.cramfs: Broken since first commit. Commit: bf60993cf2442f67bd47bcfcf6bd49c7392c2ba1 mkswap: Provide random uuid when completing --uuid argument. partx: Add --sector-size option. Fix also list of known partition types to match with libblkid blkid_idinfo names. The fix is also applied to manual page. Commit: f8a4a0d4f2fd569252029bd004e24ee433b43fe8 Reference: git grep -A 4 blkid_idinfo libblkid/src/partitions | grep name sfdisk: Add --reoder, --delete, --mode-dataa, -no-tell-kernel, --wipe, and --wipe-partitions options. In same go fix some option argument completions. Signed-off-by: Sami Kerola bash-completion/fdformat | 14 +++++++++++++- bash-completion/fdisk | 47 +++++++++++++++++++++++++++++++++++++++++---- bash-completion/fsck.cramfs | 6 +++++- bash-completion/mkswap | 6 +++++- bash-completion/partx | 24 +++++++++++++++++++++-- bash-completion/sfdisk | 34 +++++++++++++++++++++++++++++--- disk-utils/partx.8 | 3 ++- 7 files changed, 121 insertions(+), 13 deletions(-) commit bdef362d5d6c2c899fc23270d9be10968a0cbdc2 Author: Rui Zhao (renyuneyun) Date: Fri Apr 14 17:43:41 2017 +0100 fix the position of newline in the time output of 'script' - move '\n' to fprintf - use `timeutils/strtime_iso()` instead of `strtime()` Signed-off-by: Rui Zhao (renyuneyun) term-utils/script.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit d05422417eec3fe0b85d158ac1b0bd3d1da4d6c6 Author: Karel Zak Date: Thu Apr 13 15:06:52 2017 +0200 script: don't call strftime() if not necessary Signed-off-by: Karel Zak term-utils/script.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 59868828e408c522ffc62771a71fa3ccaa7b21cd Merge: c8341f4 493548b Author: Karel Zak Date: Thu Apr 13 15:04:54 2017 +0200 Merge branch 'script_quiet' of https://github.com/renyuneyun/util-linux * 'script_quiet' of https://github.com/renyuneyun/util-linux: script: fix start message showing in output file when -q is on commit c8341f418a23ba55183f9007f8f8b8862655235f Author: Karel Zak Date: Thu Apr 13 11:47:43 2017 +0200 libsmartcols: fix typo Signed-off-by: Karel Zak libsmartcols/src/table.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 091683a82f85b4cc81a829b2c1155d4d09cf03cd Author: Karel Zak Date: Thu Apr 13 11:39:22 2017 +0200 lsblk: fix --inverse --list Let's follow --inverse dependencies although --list output requested. Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1441175 Signed-off-by: Karel Zak misc-utils/lsblk.8 | 3 ++- misc-utils/lsblk.c | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) commit 066f46e0eeea248274be1c5d6a2ddc731bcff1b3 Author: Karel Zak Date: Thu Apr 13 11:19:59 2017 +0200 libsmartcols: add scols_sort_table_by_tree() Signed-off-by: Karel Zak libsmartcols/docs/libsmartcols-sections.txt | 1 + libsmartcols/src/libsmartcols.h.in | 2 +- libsmartcols/src/libsmartcols.sym | 1 + libsmartcols/src/table.c | 55 ++++++++++++++++++++++++++++- 4 files changed, 57 insertions(+), 2 deletions(-) commit 341c4ae26e5dcb1404fd030a700385696b9864a7 Author: Karel Zak Date: Thu Apr 13 10:17:36 2017 +0200 lsblk: move scols_flags to lsblk control struct Signed-off-by: Karel Zak misc-utils/lsblk.c | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) commit 697bfcf57695087713750900f369af28ae0cbd74 Author: J William Piggott Date: Mon Apr 10 14:57:01 2017 -0400 hwclock: remove residual 'compare' from man-page Signed-off-by: J William Piggott sys-utils/hwclock.8.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9c7234bc32a32776f156ba86033662fb8bfdbc28 Author: J William Piggott Date: Mon Apr 10 14:50:32 2017 -0400 hwclock: fix whitespace in hwclock-rtc.c Signed-off-by: J William Piggott sys-utils/hwclock-rtc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 796b9759a5b0d1d56944c0385655e08c25aa9b2c Author: J William Piggott Date: Mon Apr 10 14:41:46 2017 -0400 docs: parse-date.txt fix whitespace Signed-off-by: J William Piggott Documentation/parse-date.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit dc0b13af68b28590921e53246aa5c3a3ee3a2080 Author: J William Piggott Date: Mon Apr 10 14:26:12 2017 -0400 parse-date: remove extraneous form feed * lib/parse-date.y: Remove extraneous form feed (FF, 0x0C, ^L). Signed-off-by: J William Piggott lib/parse-date.y | 2 -- 1 file changed, 2 deletions(-) commit 657a55681a1da0bd0388c0cddf8b0874a2e5e0b5 Author: J William Piggott Date: Mon Apr 10 13:39:49 2017 -0400 hwclock: use errtryhelp() * sys-utils/hwclock.c: use errtryhelp() instead of usage(). Signed-off-by: J William Piggott sys-utils/hwclock.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit dddbfa4e9ba63fb731dd04f3b9c1ba18c57f5f69 Author: J William Piggott Date: Thu Apr 6 10:21:07 2017 -0400 agetty: various man-page fixes Signed-off-by: J William Piggott term-utils/agetty.8 | 60 ++++++++++++++++++++++++++++++++--------------------- 1 file changed, 36 insertions(+), 24 deletions(-) commit 1ea4e7bd8d9d0f0ef317558c627e6fa069950e8d Author: Ruediger Meier Date: Fri Apr 7 13:35:59 2017 +0200 chmem: don't use scanf format for printf The compiler had not complained here because both macros are probably the same. But gettext issued a funny warning: sys-utils/chmem.c:67: warning: Although being used in a format string position, the msgid is not a valid C format string. Reason: The string ends in the middle of a directive. CC: Heiko Carstens Signed-off-by: Ruediger Meier sys-utils/chmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c8df4b17d47eeaca6ed274b311e80f77013f5e8d Author: Ruediger Meier Date: Fri Apr 7 13:35:58 2017 +0200 misc: fix some printf format strings Fix compiler warnings seen on Linux/i586 and OSX/travis. #type #format #cast unsigned long %lu - uint64_t PRIu64 - fdisk_sector_t %ju (uintmax_t) Signed-off-by: Ruediger Meier libblkid/src/partitions/gpt.c | 3 ++- libfdisk/src/alignment.c | 2 +- sys-utils/blkzone.c | 8 ++++---- 3 files changed, 7 insertions(+), 6 deletions(-) commit a0a32456c8d9b24e3df1a35d51ca67e53f791cd9 Author: Sami Kerola Date: Thu Apr 6 22:11:16 2017 +0100 libmount: fix file descriptor leak Signed-off-by: Sami Kerola libmount/src/utils.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit b9dc8d071d7ce227aff9fb17f7fd4373c2b3e32d Author: Sami Kerola Date: Thu Apr 6 22:11:15 2017 +0100 fincore: fix file descriptor leak Signed-off-by: Sami Kerola misc-utils/fincore.c | 1 + 1 file changed, 1 insertion(+) commit 14cd0a67a3e273db5b28ef786698320bab0962d2 Author: Karel Zak Date: Fri Apr 7 14:21:19 2017 +0200 libsmartcols: fix relative width interpretation The non-defined width hint (=0) should not be interpreted as relative width. Signed-off-by: Karel Zak libsmartcols/src/table.c | 6 +++--- libsmartcols/src/table_print.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) commit f691831481a28d7d902524d650cd76e28ac939f9 Author: Karel Zak Date: Fri Apr 7 13:40:14 2017 +0200 libsmartcols: column width reduction refactoring The current implementation is unreadable... Let's write it again with more obvious semantic. Signed-off-by: Karel Zak libsmartcols/src/table.c | 17 ++++++++ libsmartcols/src/table_print.c | 95 ++++++++++++++++++++++++++++-------------- 2 files changed, 80 insertions(+), 32 deletions(-) commit 48645e7bbb9be43ef3e063bd756620902766488a Author: Karel Zak Date: Thu Mar 30 14:27:07 2017 +0200 libsmartcols: add scols_line_move_cells() Signed-off-by: Karel Zak libsmartcols/src/line.c | 27 +++++++++++++++++++++++++++ libsmartcols/src/smartcolsP.h | 1 + libsmartcols/src/table.c | 25 ++++++++++++++++++++++--- 3 files changed, 50 insertions(+), 3 deletions(-) commit 7bdefc7fc0c3c321363f8074f3ab1e2faaca6b2d Author: Karel Zak Date: Wed Mar 29 14:06:37 2017 +0200 libsmartcols: add scols_table_move_column() Signed-off-by: Karel Zak libsmartcols/docs/libsmartcols-sections.txt | 1 + libsmartcols/src/libsmartcols.h.in | 1 + libsmartcols/src/libsmartcols.sym | 1 + libsmartcols/src/table.c | 32 +++++++++++++++++++++++++++++ 4 files changed, 35 insertions(+) commit 52f35f1eccaf94f47b3cb138b53eccb0e6ed9f38 Author: Karel Zak Date: Thu Apr 6 13:39:44 2017 +0200 libfdisk: (gpt) fix ents zeroize The gpt->ents is "unsigned char" buffer now. We need to use bytes, no number of entries... Signed-off-by: Karel Zak libfdisk/src/gpt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bbb574a2938fbd05ce5aae3fd0456b0f5d959360 Author: Karel Zak Date: Thu Apr 6 13:04:09 2017 +0200 libfdisk: (gpt) update nparts_max Signed-off-by: Karel Zak libfdisk/src/gpt.c | 3 +++ 1 file changed, 3 insertions(+) commit 452089fa2facfb160def4350aff9dc59c6dec999 Author: Karel Zak Date: Thu Apr 6 12:40:01 2017 +0200 fincore: use size_t everywhere It seems better to avoid "int" at all from sizes calculations to make the code more robust for future changes. Signed-off-by: Karel Zak misc-utils/fincore.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 137fae22827f3dffeeb1ce730e457d49a3aac8a7 Author: Ruediger Meier Date: Thu Apr 6 09:56:05 2017 +0200 tests: fincore/count, skip unsupported FS Signed-off-by: Ruediger Meier tests/ts/fincore/count | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit b9d3db99e11d821b6751375dd36b686b013192c8 Author: Ruediger Meier Date: Thu Apr 6 09:56:04 2017 +0200 tests: handle dd errors in fincore/count On dd error the test will fail earlier and the test diff will be more useful. Signed-off-by: Ruediger Meier tests/ts/fincore/count | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) commit 379c1a52a29701176cc45e9eef6fadd00d135de6 Author: Ruediger Meier Date: Thu Apr 6 09:56:03 2017 +0200 fincore: fix multiplication overflow This failed on ppc64 with page size 64k. Signed-off-by: Ruediger Meier misc-utils/fincore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4a4a617d03e0ccd87e0f47e00bc2a6a7ae0f4cf6 Author: Ruediger Meier Date: Thu Apr 6 09:56:02 2017 +0200 tests: fix fincore/count for PAGE_SIZE != 4096 Signed-off-by: Ruediger Meier tests/expected/fincore/{count => count.4096} | 0 tests/expected/fincore/count.65536 | 55 ++++++++++++++++++++++++++++ tests/expected/fincore/count.nosize | 55 ++++++++++++++++++++++++++++ tests/ts/fincore/count | 18 +++++++-- 4 files changed, 124 insertions(+), 4 deletions(-) commit 0614fe48bc7db29f204321cd18592958d673c40f Author: Ruediger Meier Date: Thu Apr 6 09:56:01 2017 +0200 tests: remove fincore SMALLER_THAN_PAGESIZE tests These tests failed for example on ext4 with a non-default blocksize 1024. In this case it seems that the kernel only caches a full page if we read at least PAGE_SIZE -BLOCK_SIZE +1. Both tests also failed on NFS allthough block size seems to be 1M there. We still keep the test for PAGE_SIZE-1 which seems to work more reliable. Signed-off-by: Ruediger Meier tests/expected/fincore/count | 6 ------ tests/ts/fincore/count | 8 -------- 2 files changed, 14 deletions(-) commit a8294f401f627bd6e9f918d629caebfdf4bdc9f6 Author: Karel Zak Date: Thu Apr 6 12:13:46 2017 +0200 libfdisk: (gpt) care about SSIZE_MAX for read(2) read(2) behavior is undefined if you want to read more than SSIZE_MAX bytes. Let's be paranoid and check for this... Reported-by: Ruediger Meier Signed-off-by: Karel Zak libfdisk/src/gpt.c | 5 +++++ 1 file changed, 5 insertions(+) commit 493548b85d528bb13e72af8240fd997fdbfdd7ea Author: Rui Zhao (renyuneyun) Date: Wed Apr 5 21:11:13 2017 +0100 script: fix start message showing in output file when -q is on Signed-off-by: Rui Zhao (renyuneyun) term-utils/script.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9e320545bb6186b14aa9339cdcb83cfce1d9221b Author: Karel Zak Date: Wed Apr 5 18:40:56 2017 +0200 libfdisk: (gpt) make entries array size calculation more robust * use the same function everywhere * keep calculation based on size_t Signed-off-by: Karel Zak libfdisk/src/gpt.c | 81 ++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 51 insertions(+), 30 deletions(-) commit b683c081085381401f1f777d076d073759cdb964 Author: Karel Zak Date: Wed Apr 5 14:46:12 2017 +0200 libfdisk: (gpt) use size_t and gpt_get_nentries() If possible use size_t for number of entries (partitions). It makes code more readable and without unnecessary casts. Signed-off-by: Karel Zak libfdisk/src/gpt.c | 84 +++++++++++++++++++++++++++++++----------------------- 1 file changed, 48 insertions(+), 36 deletions(-) commit b28df75eece3b65b79b2e56f1c197c2f128ac3d9 Author: Karel Zak Date: Wed Apr 5 14:19:13 2017 +0200 libfdisk: (gpt) don't access entries array directly We blindly assume that our sizeof(struct gpt_entry) is the same on-disk stored header->sizeof_partition_entry. It seems more correct would be to use sizeof specified by header to access the entries array items. This patch introduces gpt_get_entry() to avoid direct access to gpt->ents[]. Signed-off-by: Karel Zak libfdisk/src/gpt.c | 312 +++++++++++++++++++++++++++++++---------------------- 1 file changed, 183 insertions(+), 129 deletions(-) commit 4739b6fd3e162ca5fd860bb2be111eb92623fc99 Author: Karel Zak Date: Wed Apr 5 10:59:53 2017 +0200 agetty: fix login-options desc in man page Signed-off-by: Karel Zak term-utils/agetty.8 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 31fbf70bc148bdf03b06cd1fc20e3e5f26eef3bf Author: Karel Zak Date: Tue Apr 4 14:56:12 2017 +0200 docs: update Documentation/deprecated.txt Signed-off-by: Karel Zak Documentation/deprecated.txt | 5 ----- 1 file changed, 5 deletions(-) commit c9700fc156fe04b251be098230a3a4370c1c29b2 Merge: c8ce2f4 af68bd0 Author: Karel Zak Date: Tue Apr 4 14:41:50 2017 +0200 Merge branch 'hwclock-date7-3' of github.com:jwpi/util-linux * 'hwclock-date7-3' of github.com:jwpi/util-linux: hwclock: remove unused 'silent' arg hwclock: remove dead cmos code hwclock: improve cmos message strings hwclock: remove unused atomic arg in cmos hwclock: remove unused cmos ctl structs hwclock: remove alpha cmos commit c8ce2f4cb3ff1600e4fabdc5243e4f0c538f62c0 Merge: d1e27bf 70ca1a7 Author: Karel Zak Date: Tue Apr 4 14:25:37 2017 +0200 Merge branch 'tailf-removal' of https://github.com/kerolasa/lelux-utiliteetit * 'tailf-removal' of https://github.com/kerolasa/lelux-utiliteetit: tailf: remove deprecated utility commit d1e27bf190ffd1e1e185f0d169ac9a76061a6330 Merge: d134fea c915187 Author: Karel Zak Date: Tue Apr 4 14:20:25 2017 +0200 Merge branch '2017wk13' of https://github.com/kerolasa/lelux-utiliteetit * '2017wk13' of https://github.com/kerolasa/lelux-utiliteetit: docs: improve agetty.8 manual page agetty: make --remote to forward --nohostname as -H to login lib/cpuset: stop changing variable that is not read agetty: remove variable that is set but not read commit d134feab07c4a82e3d23465994911629dd533c58 Merge: ec3624a 61e29ab Author: Karel Zak Date: Tue Apr 4 14:04:08 2017 +0200 Merge branch 'fix-ipcs-shmall-overflow' of https://github.com/rudimeier/util-linux * 'fix-ipcs-shmall-overflow' of https://github.com/rudimeier/util-linux: ipcs: make shmall overflow a bit less worse commit ec3624aa755fe06678cdc6f762cd1d1f04c979b4 Author: Frederick Grose Date: Tue Apr 4 00:31:59 2017 -0400 losetup.8: Reorder options documentation Reorder options to match onboard help and group functionally. Include some missing optional arguments. [kzak@redhat.com: - don't include available columns in man page, - add comments to the usage() - fix order in usage() - fix typo in usage()] Signed-off-by: Karel Zak sys-utils/losetup.8 | 81 +++++++++++++++++++++++++---------------------------- sys-utils/losetup.c | 11 ++++---- 2 files changed, 44 insertions(+), 48 deletions(-) commit 1253b2a31fb461dfce94156777308cf79e2fadbf Author: Karel Zak Date: Tue Apr 4 12:06:45 2017 +0200 zramctl: be more specific about default output Signed-off-by: Karel Zak sys-utils/zramctl.8 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c9151874b67a652b7095243fde2203ab8cd7d107 Author: Sami Kerola Date: Mon Apr 3 22:17:52 2017 +0100 docs: improve agetty.8 manual page Reviewed-by: J William Piggott Signed-off-by: Sami Kerola term-utils/agetty.8 | 129 +++++++++++++++++++++++++++------------------------- 1 file changed, 68 insertions(+), 61 deletions(-) commit 343cc275591327bc2094f88387f09702a542dc8c Author: Sami Kerola Date: Sat Apr 1 11:38:01 2017 +0100 agetty: make --remote to forward --nohostname as -H to login Without this change an attempt to remove hostname printing required following rather clumsy agetty invocation. /sbin/agetty --nohostname --login-options '/bin/login -H -- \u' After the change --nohostname behaves similar way with --host option, that is when combined with --remote the effect is passed to login(1). Signed-off-by: Sami Kerola term-utils/agetty.8 | 8 ++++++-- term-utils/agetty.c | 9 ++++++--- 2 files changed, 12 insertions(+), 5 deletions(-) commit cab84ea39cfd19d197b4b59005aeaeaa94b83917 Author: Karel Zak Date: Mon Apr 3 12:52:53 2017 +0200 lib/strutils: fix typos in huge size suffixes Signed-off-by: Karel Zak lib/strutils.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 61e29ab44fc97bcf86c216ac66e3163739170198 Author: Ruediger Meier Date: Fri Mar 31 17:16:07 2017 +0200 ipcs: make shmall overflow a bit less worse Still no large integer support but on overflow we print now the largest possible value, maybe even the largest one which makes sense at all. So on x86_64 systems we'll see now: $ echo "4503599627370496" > /proc/sys/kernel/shmall $ ipcs -m -l | grep "max total" max total shared memory (kbytes) = 18014398509481980 rather than this: $ ipcs -m -l | grep "max total" max total shared memory (kbytes) = 0 Signed-off-by: Ruediger Meier sys-utils/ipcs.c | 10 ++++++++-- tests/ts/ipcs/functions.sh | 6 ++++++ tests/ts/ipcs/limits2 | 6 ------ 3 files changed, 14 insertions(+), 8 deletions(-) commit 70ca1a77721b41f2355eeb00d4e55e13dba3e313 Author: Sami Kerola Date: Sun Apr 2 16:50:42 2017 +0100 tailf: remove deprecated utility March 2017 is gone, it is time to remove this utility as scheduled in earlier commit, and promised in manual page. Reference: 3f8478a71ccde6883d4c81b7e65561a106653b28 Signed-off-by: Sami Kerola .gitignore | 1 - Documentation/deprecated.txt | 5 - bash-completion/Makemodule.am | 3 - bash-completion/tailf | 28 -- configure.ac | 7 - tests/commands.sh | 1 - tests/expected/build-sys/config-all | 1 - tests/expected/build-sys/config-all-devel | 1 - tests/expected/build-sys/config-all-non-nls | 1 - tests/expected/build-sys/config-audit | 1 - tests/expected/build-sys/config-chfnsh-libuser | 1 - tests/expected/build-sys/config-chfnsh-no-password | 1 - tests/expected/build-sys/config-chfnsh-pam | 1 - tests/expected/build-sys/config-core | 1 - tests/expected/build-sys/config-devel | 1 - tests/expected/build-sys/config-devel-new-mount | 1 - tests/expected/build-sys/config-devel-non-docs | 1 - tests/expected/build-sys/config-non-libblkid | 1 - tests/expected/build-sys/config-non-libmount | 1 - tests/expected/build-sys/config-non-libs | 1 - tests/expected/build-sys/config-non-libsmartcols | 1 - tests/expected/build-sys/config-non-libuuid | 1 - tests/expected/build-sys/config-non-nls | 1 - tests/expected/build-sys/config-selinux | 1 - tests/expected/build-sys/config-slang | 1 - tests/expected/build-sys/config-static | 1 - tests/ts/tailf/simple | 40 --- text-utils/Makemodule.am | 7 - text-utils/tailf.1 | 73 ----- text-utils/tailf.c | 295 --------------------- 30 files changed, 480 deletions(-) commit 4783f2005dfacaa03f73e070ce13eec05522c5ae Author: Sami Kerola Date: Thu Mar 30 21:28:27 2017 +0100 lib/cpuset: stop changing variable that is not read Signed-off-by: Sami Kerola lib/cpuset.c | 1 - 1 file changed, 1 deletion(-) commit 650e6df62ca2f9da910e12afce5da9d4dfda92e8 Author: Sami Kerola Date: Thu Mar 30 21:28:02 2017 +0100 agetty: remove variable that is set but not read Signed-off-by: Sami Kerola term-utils/agetty.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit af68bd014ab4f0eef8ef34f69365905385fd3b21 Author: J William Piggott Date: Sun Mar 26 11:56:42 2017 -0400 hwclock: remove unused 'silent' arg The 'silent' argument for get_epoch_rtc() was used to silence error messages when querying the rtc driver for an alpha epoch while using cmos direct access. Alpha cmos has since been removed so 'silent' is no longer used. * sys-utils/hwclock.h: remove 'silent' argument * sys-utils/hwclock.c: same * sys-utils/hwclock-rtc.c: same Signed-off-by: J William Piggott sys-utils/hwclock-rtc.c | 20 ++++++++------------ sys-utils/hwclock.c | 2 +- sys-utils/hwclock.h | 2 +- 3 files changed, 10 insertions(+), 14 deletions(-) commit e216a772b1c3ec4c7062ff50f18a9cd110ffa308 Author: J William Piggott Date: Sun Mar 26 10:04:16 2017 -0400 hwclock: remove dead cmos code * hwclock-cmos.c: remove unused 'century' code. Signed-off-by: J William Piggott sys-utils/hwclock-cmos.c | 17 ----------------- 1 file changed, 17 deletions(-) commit 859b0b1acb33fff2288fd6fb71b16dc62c65c44b Author: J William Piggott Date: Sun Mar 26 09:59:37 2017 -0400 hwclock: improve cmos message strings * sys-utils/hwclock-cmos.c: improve message strings Signed-off-by: J William Piggott sys-utils/hwclock-cmos.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 51d94caa8d74486e30463903f1412fe6728d776b Author: J William Piggott Date: Sat Mar 25 19:16:30 2017 -0400 hwclock: remove unused atomic arg in cmos * sys-utils/hwclock-cmos.c: remove unused arg for atomic() Signed-off-by: J William Piggott sys-utils/hwclock-cmos.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit f252169c56b31823e7f1593faef61d162fcb1c18 Author: J William Piggott Date: Sat Mar 25 19:02:12 2017 -0400 hwclock: remove unused cmos ctl structs The hwclock-cmos.c ctl structs were only used for the since removed alpha code. * sys-utils/hwclock-cmos.c: remove unused ctl structs Signed-off-by: J William Piggott sys-utils/hwclock-cmos.c | 83 +++++++++++++++++++++++------------------------- 1 file changed, 39 insertions(+), 44 deletions(-) commit c47a61894b35c51bb86a69ddfa638b617452b531 Author: J William Piggott Date: Sat Mar 25 14:29:24 2017 -0400 hwclock: remove alpha cmos Remove alpha direct I/O access, use RTC instead: http://marc.info/?l=util-linux-ng&m=141682406902804 Resolves the alpha 2020 issue for util-linux: http://marc.info/?l=util-linux-ng&m=148387021519787 Now it is only the kernel's RTC problem. * sys-utils/hwclock.c: remove alpha cmos * sys-utils/hwclock-cmos.c: same * sys-utils/hwclock.h: same * sys-utils/hwclock.8.in: same Signed-off-by: J William Piggott sys-utils/hwclock-cmos.c | 316 ++++++----------------------------------------- sys-utils/hwclock.8.in | 110 +++++------------ sys-utils/hwclock.c | 32 ----- sys-utils/hwclock.h | 9 -- 4 files changed, 72 insertions(+), 395 deletions(-) commit eff2c9a42621b4cba81a81bc78f431b00e8a2968 Author: Karel Zak Date: Fri Mar 31 14:00:24 2017 +0200 tests: add --mountpoint to findmnt calls ... if necessary to make things more robust. Signed-off-by: Karel Zak tests/ts/libmount/context | 4 ++-- tests/ts/libmount/context-utab | 4 ++-- tests/ts/libmount/loop | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) commit 34a9766b0ebf4af29cabdc2aca9dcfecb2315951 Author: Sami Kerola Date: Wed Mar 29 22:35:05 2017 +0100 utmpdump: remove unnecessary variable Signed-off-by: Sami Kerola login-utils/utmpdump.c | 3 --- 1 file changed, 3 deletions(-) commit f6374e1fb33d5ca726b72212b787e11fea78c0ca Author: J William Piggott Date: Fri Mar 24 11:03:16 2017 -0400 hwclock: remove 1994 Award BIOS workaround Remove the 1994 Award BIOS bug workaround as previously discussed more than two years ago: http://marc.info/?l=util-linux-ng&m=141682406902804&w=2 * sys-utils/hwclock.c: remove badyear option * sys-utils/hwclock.h: same * sys-utils/hwclock.8.in: same Signed-off-by: J William Piggott sys-utils/hwclock.8.in | 38 +------------------------------ sys-utils/hwclock.c | 62 -------------------------------------------------- sys-utils/hwclock.h | 1 - 3 files changed, 1 insertion(+), 100 deletions(-) commit a837b3bdf30d9d8674748f32e0c8fa230968b677 Author: Ruediger Meier Date: Fri Mar 31 12:09:46 2017 +0200 test: fix mountpoint device check in libmount/loop This test could fail if the build directory is somehow exoticly mounted (shared bind mounts, symlinks). CC: Stanislav Brabec Signed-off-by: Ruediger Meier tests/ts/libmount/loop | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) commit c6f6afc164df1396435a8a8181e97a92e12f1d89 Author: Karel Zak Date: Fri Mar 31 11:05:26 2017 +0200 lscpu: fix mem leak [coverity scan] Signed-off-by: Karel Zak sys-utils/lscpu.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit bf1eab0731cc6cacae0e1d65407c06171b512c1d Author: Karel Zak Date: Fri Mar 31 10:58:50 2017 +0200 lscpu: check return code [coverity scan] Signed-off-by: Karel Zak sys-utils/lscpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2546d54bd8b0ceac75d6d7e6c483479022d97509 Author: Karel Zak Date: Thu Mar 30 12:10:01 2017 +0200 zramctl: make mm_stat parser more robust Let's fallback to attribute files if mm_stat file is incomplete. It should not happen, but I have seen RHEL7 kernel where is no num_migrated/pages_compacted attribute... Signed-off-by: Karel Zak sys-utils/zramctl.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 9ff67eb9c88298f5e47007c56724aa102a1623ac Author: Karel Zak Date: Mon Mar 27 18:02:54 2017 +0200 agetty: fix typo Signed-off-by: Karel Zak term-utils/agetty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9877680caee18073250099447c0f297fc105480a Author: Karel Zak Date: Mon Mar 27 15:13:17 2017 +0200 tests: define columns for fincore test Signed-off-by: Karel Zak tests/ts/fincore/count | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 790119b8850ae13bb4254c5096a54b2aeb355b20 Author: Karel Zak Date: Mon Mar 27 14:54:39 2017 +0200 agetty: fix characters reorder in login prompt The current agetty uses TIOCSTI ioctl to return already read chars from login name back to the terminal (without read() before tcsetattr() we will lost data already written by user). The ioctl based solution is fragile due to race -- we can return chars when terminal already contains another new chars. The result is reordered chars in login name. The solution is to use extra buffer for already read data. Reported-by: Michael Tretter Signed-off-by: Karel Zak include/c.h | 4 ++++ lib/idcache.c | 4 ---- term-utils/agetty.c | 46 ++++++++++++++++++++++++++++++++++------------ 3 files changed, 38 insertions(+), 16 deletions(-) commit ca5389757ea51b65ed318700482d60b7ddb8ee16 Author: Karel Zak Date: Mon Mar 27 13:25:31 2017 +0200 unshare: add note about persisten PID namespaces Signed-off-by: Karel Zak sys-utils/unshare.1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e4e8b57be2b63fed82647e4d5efd0e0eaf36b19e Author: Karel Zak Date: Mon Mar 27 13:08:40 2017 +0200 fincore: add column RES Signed-off-by: Karel Zak misc-utils/fincore.1 | 7 +++---- misc-utils/fincore.c | 18 ++++++++++++++++-- 2 files changed, 19 insertions(+), 6 deletions(-) commit 8ea213781d7ad589c211501bac9aa67b8cb57875 Author: Karel Zak Date: Fri Mar 24 13:13:28 2017 +0100 tests: remove status=none dd(1) from fincore seems dd(1) sucks on travis more than expected: dd: invalid status flag: `none' Try `dd --help' for more information. Signed-off-by: Karel Zak tests/ts/fincore/count | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 958ff57c868c468110aebd25a9da6dc70a39e247 Author: Karel Zak Date: Fri Mar 24 12:23:59 2017 +0100 tests: redirect unwanted dd(1) advices to /dev/null It seems that dd(1) on travis writes unwanted messages to stdout dd: you probably want conv=notrunc with oflag=append and we do not want conv= Signed-off-by: Karel Zak tests/ts/fincore/count | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 071147ab89b00a74ada99ca849b9d7ceb9a24475 Author: Karel Zak Date: Fri Mar 24 12:07:17 2017 +0100 blkid: fix compiler warning [-Wdiscarded-qualifiers] Let's also hide the show[] array in has_item(). Signed-off-by: Karel Zak misc-utils/blkid.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 3006dd73527eb43a960325d2f0e396f20f0828ba Merge: 69dee22 59b94cc Author: Karel Zak Date: Fri Mar 24 11:59:57 2017 +0100 Merge branch '2017wk11' of git://github.com/kerolasa/lelux-utiliteetit * '2017wk11' of git://github.com/kerolasa/lelux-utiliteetit: blkid: add control struct blkid: simplify version option handling tests: add static keyword where needed [smatch scan] tests: do not use plain 0 as NULL [smatch scan] libsmartcols: fix test variable shadowing commit 69dee227f2e249c6f457e1dd970a09cb56e636b6 Author: Sami Kerola Date: Thu Mar 23 22:05:23 2017 +0000 bash-completion: update fincore to have latest options Also include --output smartcols fields. Signed-off-by: Sami Kerola bash-completion/fincore | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) commit 2ee3b6b735f4ffe17a9cd3a8d1a661f95a7744f9 Merge: 044d6e5 1811900 Author: Karel Zak Date: Fri Mar 24 11:51:06 2017 +0100 Merge branch 'hwclock-date7-1' of github.com:jwpi/util-linux * 'hwclock-date7-1' of github.com:jwpi/util-linux: hwclock-rtc.c: try the 'new' rtc class first commit 044d6e556564f76b4ac3543cadb44b0cd48aa22d Author: Karel Zak Date: Fri Mar 24 11:46:33 2017 +0100 libblkid: fix typo Signed-off-by: Karel Zak libblkid/src/superblocks/hfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1811900a91be856e794005511eac7859adb8e383 Author: J William Piggott Date: Sun Mar 12 20:26:37 2017 -0400 hwclock-rtc.c: try the 'new' rtc class first * sys-utils/hwclock-rtc.c: try to open the 'new' rtc class driver first. * sys-utils/hwclock.8.in: document this. Signed-off-by: J William Piggott sys-utils/hwclock-rtc.c | 2 +- sys-utils/hwclock.8.in | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) commit 24d746f705c488b28693b1c18c730de3c7202b3d Author: Karel Zak Date: Thu Mar 23 15:59:58 2017 +0100 build-sys: add missing header file Signed-off-by: Karel Zak include/Makemodule.am | 1 + 1 file changed, 1 insertion(+) commit 62ab1ebb12e812b15382318861a594c946b6238e Author: Tobias Stoeckmann Date: Wed Mar 15 22:12:00 2017 +0100 libblkid: prevent OOB access while probing HFS+ It is possible to perform out of boundary read accesses due to insufficient boundary checks in probe_hfsplus. The first issue occurs if the leaf count in a B-node is too small. The second happens while parsing a unicode description which is longer than 255 UTF-8 characters. The length is stored in a 16 bit integer, but the array in the struct is limited to 255 * 2, which is in sync with Apple's Open Source HFS+ implementation (HFSUniStr255). Signed-off-by: Tobias Stoeckmann libblkid/src/superblocks/hfs.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit eef0a92d311e37ed8cbcc979447be7d83f3775a5 Author: Karel Zak Date: Thu Mar 23 15:28:39 2017 +0100 tests: refresh fincore test Signed-off-by: Karel Zak tests/expected/fincore/count | 75 ++++++++++++++++++++++---------------------- tests/ts/fincore/count | 8 ++--- 2 files changed, 41 insertions(+), 42 deletions(-) commit cff1c113fe0686d0524a4a70973f2345fcc4c7c9 Author: Karel Zak Date: Thu Mar 23 15:28:05 2017 +0100 fincore: fix error on open() Signed-off-by: Karel Zak misc-utils/fincore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9b48766fb3f3e37797638552d208580d370201be Author: Karel Zak Date: Thu Mar 23 14:34:12 2017 +0100 fincore: add --raw and --json Signed-off-by: Karel Zak misc-utils/fincore.1 | 7 +++++++ misc-utils/fincore.c | 20 ++++++++++++++++++-- 2 files changed, 25 insertions(+), 2 deletions(-) commit c5cb541299dc9399d32b769d6c88ee5643428d3e Author: Karel Zak Date: Thu Mar 23 14:27:42 2017 +0100 fincore: add --output Signed-off-by: Karel Zak misc-utils/fincore.1 | 12 ++++++++++++ misc-utils/fincore.c | 25 +++++++++++++++++++++---- 2 files changed, 33 insertions(+), 4 deletions(-) commit 3f91dd88ca7ea6905e39519d52896207521f905e Author: Karel Zak Date: Thu Mar 23 14:17:46 2017 +0100 fincore: add --bytes and --noheadings Signed-off-by: Karel Zak misc-utils/fincore.1 | 41 ++++++----------------------------------- misc-utils/fincore.c | 50 +++++++++++++++++++++++++++++++------------------- 2 files changed, 37 insertions(+), 54 deletions(-) commit 3e37d7b7731d47f5c3648607cf09e4d18cfe0489 Author: Karel Zak Date: Thu Mar 23 14:09:20 2017 +0100 fincore: use libsmartcols Signed-off-by: Karel Zak configure.ac | 1 + misc-utils/Makemodule.am | 2 + misc-utils/fincore.1 | 7 +- misc-utils/fincore.c | 174 ++++++++++++++++++++++++++++++++++++++++------- 4 files changed, 155 insertions(+), 29 deletions(-) commit b57fe43cd41fb196a0d6061614a59612bfda4bba Author: Karel Zak Date: Thu Mar 23 13:06:34 2017 +0100 fincore: cleanup return codes Don't use EXIT_* macros as functions return code. Signed-off-by: Karel Zak .gitignore | 1 + misc-utils/fincore.c | 46 ++++++++++++++++++++++------------------------ 2 files changed, 23 insertions(+), 24 deletions(-) commit 483baa35abdcfb35bfcefde8988ed4483640e2f9 Author: Masatake YAMATO Date: Tue Mar 7 11:33:52 2017 +0900 bash-completion: add a function for fincore command Signed-off-by: Masatake YAMATO bash-completion/Makemodule.am | 3 +++ bash-completion/fincore | 25 +++++++++++++++++++++++++ 2 files changed, 28 insertions(+) commit c1cc045d127364898b9cfd654213ea04ea2d479a Author: Masatake YAMATO Date: Tue Mar 7 11:33:51 2017 +0900 tests: add cases for testing fincore command Signed-off-by: Masatake YAMATO tests/commands.sh | 1 + tests/expected/fincore/count | 62 ++++++++++++++ tests/ts/fincore/count | 194 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 257 insertions(+) commit ffbfa7fbafef20aa4815a921d453f511eacc4808 Author: Masatake YAMATO Date: Tue Mar 7 11:33:50 2017 +0900 man: add a page for fincore command Signed-off-by: Masatake YAMATO misc-utils/Makemodule.am | 1 + misc-utils/fincore.1 | 76 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 77 insertions(+) commit a921a7dea91b995454cfa8c408d4804b6657f731 Author: Masatake YAMATO Date: Tue Mar 7 11:33:49 2017 +0900 fincore: new command for counting pages of file contents in core Signed-off-by: Masatake YAMATO Signed-off-by: Karel Zak configure.ac | 4 + misc-utils/Makemodule.am | 5 ++ misc-utils/fincore.c | 209 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 218 insertions(+) commit 7e26832d706ee73af7f85f36581c5f8ba089cbb1 Merge: b607e5f b80d6d4 Author: Karel Zak Date: Thu Mar 23 12:36:47 2017 +0100 Merge remote-tracking branch 'jwpi/hwclock-date7' * jwpi/hwclock-date7: lib: add parse-date documentation hwclock: use parse_date function build-sys: add parse-date.y lib: add parse-date.y commit b607e5facafdeae0ae7025365a3403651aed0dc4 Author: Karel Zak Date: Wed Mar 22 10:43:55 2017 +0100 Fix menu spelling in cfdisk debug messages Signed-off-by: Karel Zak disk-utils/cfdisk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 59b94cc0c5125ecb29f32235a168989a5c2b2f82 Author: Sami Kerola Date: Sat Mar 11 18:52:56 2017 +0000 blkid: add control struct Signed-off-by: Sami Kerola misc-utils/blkid.c | 171 +++++++++++++++++++++++++++-------------------------- 1 file changed, 88 insertions(+), 83 deletions(-) commit 93bdbe199317082da6ddad4fa3882ef311095848 Author: Sami Kerola Date: Fri Mar 10 20:14:10 2017 +0000 blkid: simplify version option handling Signed-off-by: Sami Kerola misc-utils/blkid.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) commit 41427f97d91ab1e533713105034fa7fe57731163 Author: Sami Kerola Date: Fri Mar 10 19:56:16 2017 +0000 tests: add static keyword where needed [smatch scan] Signed-off-by: Sami Kerola libmount/src/context.c | 2 +- libmount/src/lock.c | 2 +- misc-utils/test_uuidd.c | 8 ++++---- tests/helpers/test_byteswap.c | 6 +++--- tests/helpers/test_pathnames.c | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) commit 71f08e9706697b5ca001bc42325b574f0dea0923 Author: Sami Kerola Date: Fri Mar 10 19:50:14 2017 +0000 tests: do not use plain 0 as NULL [smatch scan] Likewise commit 87918040658f2fa9b1bf78f1f8f4f5c065a2e3a3. Signed-off-by: Sami Kerola lib/colors.c | 10 +++++----- lib/cpuset.c | 8 ++++---- libfdisk/samples/mkpart.c | 8 ++++---- libsmartcols/samples/fromfile.c | 24 ++++++++++++------------ libsmartcols/samples/title.c | 6 +++--- libsmartcols/samples/tree.c | 20 ++++++++++---------- misc-utils/test_uuidd.c | 2 +- 7 files changed, 39 insertions(+), 39 deletions(-) commit 4ff3d13b439b40a91d96a10364cacdf6f0a577a3 Author: Sami Kerola Date: Sun Mar 5 21:02:53 2017 +0000 libsmartcols: fix test variable shadowing libsmartcols/samples/fromfile.c:57:16: warning: declaration of 'flags' shadows a global declaration [-Wshadow] libsmartcols/samples/fromfile.c:29:33: note: shadowed declaration is here libsmartcols/samples/fromfile.c:101:8: warning: declaration of 'flags' shadows a global declaration [-Wshadow] Signed-off-by: Sami Kerola libsmartcols/samples/fromfile.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit bb6762035a088583cb8c0cc87386da6f8a5958cb Author: Karel Zak Date: Thu Mar 16 10:01:54 2017 +0100 libfdisk: fix compiler warning [-Wsign-compare] Signed-off-by: Karel Zak libfdisk/src/gpt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 999448d86609cef27a481c6e0ed9006b27f19558 Author: Karel Zak Date: Wed Mar 15 11:49:22 2017 +0100 tests: refresh lscpu tests .. due to libsmartcols use for the default output. The output does not contain extra unnecessary blank space anymore. Signed-off-by: Karel Zak tests/expected/lscpu/lscpu-armv7 | 20 +++++------ tests/expected/lscpu/lscpu-ppc-qemu | 20 +++++------ tests/expected/lscpu/lscpu-ppc64-POWER7 | 22 ++++++------ tests/expected/lscpu/lscpu-ppc64-POWER7-64cpu | 28 +++++++-------- tests/expected/lscpu/lscpu-s390-kvm | 30 ++++++++-------- tests/expected/lscpu/lscpu-s390-lpar | 32 ++++++++--------- tests/expected/lscpu/lscpu-s390-lpar-drawer | 52 +++++++++++++-------------- tests/expected/lscpu/lscpu-s390-zvm | 30 ++++++++-------- tests/expected/lscpu/lscpu-sparc64 | 16 ++++----- tests/expected/lscpu/lscpu-vbox-win | 46 ++++++++++++------------ tests/expected/lscpu/lscpu-x86_64-64cpu | 50 +++++++++++++------------- tests/expected/lscpu/lscpu-x86_64-dell_e4310 | 46 ++++++++++++------------ 12 files changed, 196 insertions(+), 196 deletions(-) commit 19a5510b964c6163e7117913d3de35aba3cd0006 Author: Karel Zak Date: Tue Mar 14 15:32:53 2017 +0100 lscpu: add --json Signed-off-by: Karel Zak sys-utils/lscpu.1 | 6 +++++- sys-utils/lscpu.c | 18 ++++++++++++++++-- 2 files changed, 21 insertions(+), 3 deletions(-) commit c82b12a0a23713e95c536d23bfc6ac2deb6a844c Author: Karel Zak Date: Tue Mar 14 15:19:12 2017 +0100 lscpu: use libsmartcols to print summary too Addresses: https://github.com/karelzak/util-linux/issues/419 Signed-off-by: Karel Zak sys-utils/lscpu.c | 143 ++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 91 insertions(+), 52 deletions(-) commit 57ebfde2916f6f3a23ff0defff5a2307ef5ecd12 Author: Sami Kerola Date: Mon Feb 20 22:12:42 2017 +0000 fdisk, sfdisk: avoid non-ANSI function declarations [smatch scan] Adding _FUNCTION_DEF definition will exclude compatibility type definitions that do include void key word in empty argument list. /usr/include/readline/rltypedefs.h:35:23: warning: non-ANSI function declaration of function 'Function' These functions has been replaced by set of new ones in readline 4.2 (April 2001), and removed in 6.3 (February 2014). Reference: https://cnswww.cns.cwru.edu/php/chet/readline/CHANGES Rererence: https://blueslugs.com/blog/2016-10-23-updating-cppfunction-in-old-readline-consumers/ Signed-off-by: Sami Kerola disk-utils/fdisk.c | 1 + disk-utils/sfdisk.c | 1 + 2 files changed, 2 insertions(+) commit f5a2b07e8c2b248221daab22d085601b41a34df7 Author: Sami Kerola Date: Sun Mar 5 20:52:25 2017 +0000 blkid: add messages to translations Without obvious reason blkid has managed to be part of this project for pretty long time without getting translations. Lets change that. In same go use the usual error printing facilities instead of fprintf(stderr, ...); [kzak@redhat.com: - use errtryh(), - cleanup "unsupported output format"] Signed-off-by: Sami Kerola Signed-off-by: Karel Zak misc-utils/blkid.c | 143 ++++++++++++++++++++++++++--------------------------- 1 file changed, 69 insertions(+), 74 deletions(-) commit 126d8cf35b4403b575056304c966e9dd489f4aa9 Author: Sami Kerola Date: Sun Mar 5 20:52:24 2017 +0000 blkid: add curly braces to do-while statement Some say people read do-while statements are easily as while statements and get wrong impression. This happens because do-whiles are not common. Adding braces should make it easier to read the code. Reference: http://www.spinics.net/lists/linux-kernel-janitors/msg02018.html Signed-off-by: Sami Kerola misc-utils/blkid.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b2b5292541d08a9c0236c27a79e62acd49a3aaa1 Author: Karel Zak Date: Mon Mar 13 15:20:56 2017 +0100 libfdisk: fix potentially NULL pointer usage Reported-by: Sami Kerola Signed-off-by: Karel Zak libfdisk/src/dos.c | 87 ++++++++++++++++++++++++++++++++++++++++-------- libfdisk/src/partition.c | 4 +++ 2 files changed, 77 insertions(+), 14 deletions(-) commit 6cb55736cba05b26117e6e6e85375918a8d9f870 Author: Sami Kerola Date: Sun Mar 5 20:52:31 2017 +0000 docs: improve boilerplate.c options example Make usage() translations to contain complete option help in single translation unit. And make -z option example complete. Signed-off-by: Sami Kerola Documentation/boilerplate.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit fdf8e1f595b45337b7d12ab6ac9faf6040fe913c Author: Sami Kerola Date: Sun Mar 5 20:52:28 2017 +0000 include: fix compiler warning ./include/optutils.h:12:18: warning: null pointer dereference [-Wnull-dereference] for (o = opts; o->name; o++) ~^~~~~~ In file included from libfdisk/src/dos.c:12:0: ./include/pt-mbr.h:25:47: warning: potential null pointer dereference [-Wnull-dereference] return p[0] | (p[1] << 8) | (p[2] << 16) | (p[3] << 24); ~^~~ Well these should be impossible, so add assert() to catch possible bugs. Signed-off-by: Sami Kerola include/optutils.h | 3 +++ include/pt-mbr.h | 3 +++ 2 files changed, 6 insertions(+) commit 57f1539592c43dcf4c33eddcc022b47d3a64d177 Author: Sami Kerola Date: Sun Mar 5 20:52:23 2017 +0000 libblkid: ensure uninitialized variable is not used [clang] Following condition can be true if minix file system is corrupt, and versio number is found to be greater than 3. It is fair to say described scenario is unlikely. libblkid/src/superblocks/minix.c:107:13: warning: variable 'zone_size' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] } else if (version == 3) { ^~~~~~~~~~~~ libblkid/src/superblocks/minix.c:121:6: note: uninitialized use occurs here if (zone_size != 0 || ninodes == 0 || ninodes == UINT32_MAX) ^~~~~~~~~ Signed-off-by: Sami Kerola libblkid/src/superblocks/minix.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit c88f7aee8f1c0cef2db1cfa057e0ffeaf98f0de1 Author: Sami Kerola Date: Sun Mar 5 20:52:22 2017 +0000 libblkid: avoid overflow when initializing array libblkid/src/superblocks/drbdmanage.c:38:42: warning: too long initializer-string for array of char(no space for nul char) Signed-off-by: Sami Kerola libblkid/src/superblocks/drbdmanage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 08cce2e1cc659548553a8353a938813b826d7943 Author: Sami Kerola Date: Sun Mar 5 20:52:21 2017 +0000 libmount: fix use of preprocessor identifier libmount/src/context_mount.c:990:5: warning: undefined preprocessor identifier 'USE_LIBMOUNT_SUPPORT_MTAB' Signed-off-by: Sami Kerola libmount/src/context_mount.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c308e2050f3b7cc08be64227644ce1020a27fdfe Author: Sami Kerola Date: Sun Mar 5 20:52:20 2017 +0000 misc: stop mixing declarations and code Signed-off-by: Sami Kerola disk-utils/cfdisk.c | 4 +++- disk-utils/sfdisk.c | 2 +- libblkid/src/superblocks/minix.c | 7 +++---- text-utils/hexdump-display.c | 4 ++-- 4 files changed, 9 insertions(+), 8 deletions(-) commit ab7093775fc639d12c9f056a1cd3c935591db46f Author: Karel Zak Date: Mon Mar 13 14:44:22 2017 +0100 lib/colors: assert rathen than overflow [-Wnull-dereference] lib/colors.c: In function 'colors_read_schemes': lib/colors.c:412:7: warning: potential null pointer dereference [-Wnull-dereference] Reported-by: Sami Kerola Signed-off-by: Karel Zak lib/colors.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit bd2aece45eea531c3317e57b1ba06b30c4304554 Author: Karel Zak Date: Mon Mar 13 12:55:44 2017 +0100 last: use domain string more carefully Use xstrcpy() to explicitly terminate the domain string. Reported-by: Tobias Stoeckmann Signed-off-by: Karel Zak login-utils/last.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit b0f97de5a4ab62de55984651a6723acfff6917ae Author: Tobias Stoeckmann Date: Sun Mar 12 17:49:45 2017 +0100 login: prevent OOB read on illegal /etc/hushlogins If the file /etc/hushlogins exists and a line starts with '\0', the login tools are prone to an off-by-one read. I see no reliability issue with this, as it would clearly need a hostile action from a system administrator. But for the sake of correctness, I've sent this patch nonetheless. login-utils/logindefs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 55a5fbbc335480eb3b535fbe5f18289d9458d382 Author: Tobias Stoeckmann Date: Sun Mar 12 17:48:44 2017 +0100 libblkid: Fix blkid.conf parsing The SEND_UEVENT=yes|no line is not properly parsed, because the offset jumps one byte too far behind the equal sign. Therefore, every configuration that contains the line "SEND_UEVENT=yes" still does not send an uevent. The fix is simple: adjust the offset to be "12" instead of "13". libblkid/src/config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b80d6d4be8371b6e8fa4a31a1fc1f7ce57a91be7 Author: J William Piggott Date: Sat Mar 4 15:03:44 2017 -0500 lib: add parse-date documentation * Documentation/parse-date.txt - new file * sys-utils/hwclock.8.in Fix the --date option description. Signed-off-by: J William Piggott Documentation/parse-date.txt | 468 +++++++++++++++++++++++++++++++++++++++++++ sys-utils/hwclock.8.in | 22 +- 2 files changed, 479 insertions(+), 11 deletions(-) commit 7a3000f7ba548cf7d74ac77cc63fe8de228a669e Author: J William Piggott Date: Sat Mar 4 11:04:10 2017 -0500 hwclock: use parse_date function * hwclock.c: replace interpret_date_string() with parse_date(). Eliminates shell injection vulnerability from popen() date(1). Removes system dependency on date(1). Reduction in hwclock execution time. Significant cleanup of hwclock.c code. * Bug fix for "hwclock --predict --date 'bad_date'" printing: hwclock: No usable set-to time. Cannot set clock. The message now matches date(1) for an invalid --date argument. Signed-off-by: J William Piggott sys-utils/hwclock.c | 104 +++------------------------------------------------- 1 file changed, 5 insertions(+), 99 deletions(-) commit 30d7f61f4fc1967190a734e2d62696d546fb6378 Author: Karel Zak Date: Sat Mar 4 11:01:56 2017 -0500 build-sys: add parse-date.y * add lib/parse-date.y to build system * add necessary autotools stuff to generate .c on the fly (autotools are smart enough to add generated file to tarball) * check for bison version by ./autogen.sh * add non-wanted junk to .gitignore With some modification by J William Piggott with regard to moving the parse-date API into timeutils.h Signed-off-by: J William Piggott .gitignore | 1 + autogen.sh | 20 ++++++++++++++++++++ configure.ac | 2 +- lib/.gitignore | 1 + lib/Makemodule.am | 1 + 5 files changed, 24 insertions(+), 1 deletion(-) commit 7088bd88323fa9152ec9fbe4089fe76807445ed3 Author: J William Piggott Date: Sat Mar 4 10:49:41 2017 -0500 lib: add parse-date.y * include/timeutils.h Add parse-date API * lib/parse-date.y - new file Lib function that parses a date string into a timespec struct. Derived from gnulib-dd7a871 parse-datetime.y with these changes: * reduced to a single function API renamed to parse_date() * removed gnulib dependencies * removed debugging * converted to util-linux coding style * include/cctype.h - new file Like ctype.h only hard coded to the 'C' locale. Used by lib/parse-date.y. Derived from gnulib-dd7a871 c-ctype.h with these changes: * removed gnulib dependencies * converted to util-linux coding style * add requisite util-linux constants Signed-off-by: J William Piggott include/cctype.h | 325 ++++++++++ include/timeutils.h | 2 + lib/parse-date.y | 1645 +++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 1972 insertions(+) commit 1765814521bf2aba7b8c03d3ab2e3b784e1ce2c4 Author: Karel Zak Date: Fri Mar 3 10:37:37 2017 +0100 libsmartcols: allow to add column to already used table Now it's impossible to add new column if the table already contains lines with data. This patch forces library to realloc cell array in the lines to accept a new column. Signed-off-by: Karel Zak libsmartcols/src/table.c | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) commit c14224b37463259576cb1344f49719608754e4ec Author: Karel Zak Date: Thu Mar 2 16:56:39 2017 +0100 libsmartcols: support columns separators greater than one output cell Signed-off-by: Karel Zak libsmartcols/src/table.c | 1 - libsmartcols/src/table_print.c | 9 ++++++--- 2 files changed, 6 insertions(+), 4 deletions(-) commit 208b2ef0b6921898470acf3721329fd474098828 Author: Karel Zak Date: Thu Mar 2 13:51:40 2017 +0100 sfdisk: note about small partition in man page Signed-off-by: Karel Zak disk-utils/sfdisk.8 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 86800f5d75abd05e12de0b2e1ebd48f049cf256a Author: Karel Zak Date: Thu Mar 2 13:44:26 2017 +0100 sfdisk: add note about alignment to man page Addresses: https://github.com/karelzak/util-linux/issues/417 Signed-off-by: Karel Zak disk-utils/sfdisk.8 | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) commit 3e094e5fe2b9949506cb0e65b9d25aa8c628751f Author: Karel Zak Date: Wed Mar 1 12:25:16 2017 +0100 column: make more obvious what is default behavior The man page contains mistakes. The default is to fill columns before lines: $ printf 'aaaaaaaaaaaaaaaaaaaaaa\nBBBBBBBBBBBBBBBBBBBBB\nXXXXXXX\nYYYYYYYYYYY\nZZZZZ' > data $ column --columns 80 < data aaaaaaaaaaaaaaaaaaaaaa XXXXXXX ZZZZZ BBBBBBBBBBBBBBBBBBBBB YYYYYYYYYYY $ column --fillrows --columns 80 < data aaaaaaaaaaaaaaaaaaaaaa BBBBBBBBBBBBBBBBBBBBB XXXXXXX YYYYYYYYYYY ZZZZZ The patch also rename functions in the code to make it more obvious for code readers. Signed-off-by: Karel Zak text-utils/column.1 | 6 +++--- text-utils/column.c | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) commit 7bb9ee99da6558f75a1931bb95580124853f3e06 Author: Karel Zak Date: Tue Feb 28 14:47:02 2017 +0100 libmount: cosmetic change to mnt_table_find_srcpath() Signed-off-by: Karel Zak libmount/src/tab.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 443be11396fe4117c8587a5a55a26a96ce48e2a4 Author: Petr Vorel Date: Thu Feb 23 19:25:13 2017 +0100 libmount: return tab entry for default node This is useful for lsblk. Signed-off-by: Petr Vorel libmount/src/tab.c | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) commit e9f62f388137196cb999f995dc28030d135bcd0d Author: Sami Kerola Date: Sat Feb 25 17:35:17 2017 +0000 setterm: fix bitfield warning [smatch] term-utils/setterm.c:179:27: warning: dubious bitfield without explicit `signed' or `unsigned' Signed-off-by: Sami Kerola term-utils/setterm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 168950e3ce10555fc70ef56451d3dd2d07893965 Author: Karel Zak Date: Mon Feb 27 13:44:08 2017 +0100 libfdisk: (dos) add ID related debug messages Signed-off-by: Karel Zak libfdisk/src/dos.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit ea4ea332a81d37acc351720c81642b441a850f11 Author: Karel Zak Date: Mon Feb 27 13:16:18 2017 +0100 libfdisk: add version to debug output Signed-off-by: Karel Zak libfdisk/src/init.c | 4 ++++ 1 file changed, 4 insertions(+) commit 1db2468106cbd6f1cd5002562f42b9ac019b104f Author: Matthias Gerstner Date: Mon Feb 27 12:03:57 2017 +0100 agetty: fix a memory leak when parsing \S in issue files term-utils/agetty.c | 3 +++ 1 file changed, 3 insertions(+) commit 86b6d7f4346c6b85c60aaae993ce5b27dfff6bea Author: Karel Zak Date: Mon Feb 27 12:09:35 2017 +0100 unshare: add note about sysfs and procfs Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1390057 Signed-off-by: Karel Zak sys-utils/unshare.1 | 5 +++++ 1 file changed, 5 insertions(+) commit 7ab6461fae3848ea85f494f29e26229717685ae3 Author: Karel Zak Date: Fri Feb 24 14:19:04 2017 +0100 docs: add note about branches to README Signed-off-by: Karel Zak README | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 830043212f4fccb66fde9066a2f5e2c5a5a6f501 Author: Karel Zak Date: Fri Feb 24 12:05:13 2017 +0100 blkzone: add count option to bash-completion and fix typo in man page Signed-off-by: Karel Zak bash-completion/blkzone | 6 +++++- sys-utils/blkzone.8 | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) commit c16970f794e43e4a8aff954a663792268b87dfde Author: Karel Zak Date: Fri Feb 24 11:59:53 2017 +0100 blkzone: use optutils.h to check mutually exclusive options Signed-off-by: Karel Zak sys-utils/blkzone.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) commit f1b8b84d3476ac910d922c63a50a4129adbaf584 Author: Damien Le Moal Date: Fri Feb 24 15:45:31 2017 +0900 blkzone: Add --count option The length option is used to specify the number of zones to operate on. To be more consistent with other tools, have this option use a number of sectors and introduce the --count option to allow users to specify a number of zones. The --count and --length options cannot be used together on the command line. Signed-off-by: Damien Le Moal sys-utils/blkzone.8 | 39 ++++++++++++++++----------- sys-utils/blkzone.c | 76 ++++++++++++++++++++++++++++++++++++----------------- 2 files changed, 76 insertions(+), 39 deletions(-) commit a7f742069ec5f1a51d0c9cfc238954553e2ffe8f Author: Damien Le Moal Date: Fri Feb 24 12:47:29 2017 +0900 blkzone: Improve zone information print Add "0x" to the zone start, length and write pointer print to make it always clear that the values are Hexadecimal. Also update the zone condition string and associated comments to match more closely the wording in the standard document. The man page is also updated to match the new wording. Signed-off-by: Damien Le Moal sys-utils/blkzone.8 | 39 ++++++++++++++++++--------------------- sys-utils/blkzone.c | 22 +++++++++++----------- 2 files changed, 29 insertions(+), 32 deletions(-) commit 6e1958d8dd58ddc7c613466531df968d8eba27eb Author: Damien Le Moal Date: Fri Feb 24 12:36:08 2017 +0900 blkzone: Report all zones if length is not specified Report all zones of the block device when length is not specified on the command line. To do this, introduce an inner loop in blkzone_report to repeatedly issue report zone ioctl to the device. Signed-off-by: Damien Le Moal sys-utils/blkzone.c | 126 ++++++++++++++++++++++++++++++---------------------- 1 file changed, 72 insertions(+), 54 deletions(-) commit 72a73102334a7e531e566defcd92dcb822c4e388 Author: Damien Le Moal Date: Fri Feb 24 11:48:45 2017 +0900 blkzone: Reset all zones when length is not specified If length is 0, operate on all zones starting from offset. This also fix the maximum length calculation from offset. Signed-off-by: Damien Le Moal sys-utils/blkzone.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 22fae330d9b9b124e782a99c9daacdc5290cdf35 Author: Karel Zak Date: Thu Feb 23 17:03:26 2017 +0100 blkreport, blkreset: remove in favour of blkzone Signed-off-by: Karel Zak .gitignore | 2 - bash-completion/blkreset | 34 ------- configure.ac | 8 -- sys-utils/Makemodule.am | 14 --- sys-utils/blkreport.8 | 92 ------------------- sys-utils/blkreport.c | 225 ----------------------------------------------- sys-utils/blkreset.8 | 62 ------------- sys-utils/blkreset.c | 190 --------------------------------------- 8 files changed, 627 deletions(-) commit 6324d0f494b214244c3a2aa0b4ac785a3b069136 Author: Karel Zak Date: Thu Feb 23 17:01:29 2017 +0100 blkzone: add bash-completion Signed-off-by: Karel Zak bash-completion/Makemodule.am | 3 +++ bash-completion/blkzone | 48 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) commit 1ad8ef9187ba6ca814189c0466c46fbdf483f904 Author: Karel Zak Date: Thu Feb 23 16:43:51 2017 +0100 blkzone: add new command (merge blkreport and blkreset) This new command is based on the original implementation of blkreport and blkreset command. Signed-off-by: Karel Zak .gitignore | 1 + configure.ac | 5 + sys-utils/Makemodule.am | 7 + sys-utils/blkzone.8 | 103 ++++++++++++++ sys-utils/blkzone.c | 350 ++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 466 insertions(+) commit fc72f51e1f8ea824dc4565c844cc9119919950e9 Author: Karel Zak Date: Tue Feb 21 11:00:19 2017 +0100 build-sys: simplify UL_ENABLE_ALIAS() semantic Let's follow only $enable_ variables. In this case the MASTERNAME (e.g. [schedutils] for --enable-schedutils) has to be without UL_BUILD_INIT. Signed-off-by: Karel Zak configure.ac | 3 +-- m4/ul.m4 | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) commit 6f2eb03433bcb2d3c351efed848a1f8554a7ff78 Author: Karel Zak Date: Mon Feb 20 14:17:37 2017 +0100 build-sys: fix --disable-all-programs --enable-schedutils * add UL_ENABLE_ALIAS(NAME, MASTERNAME) to initialize $enable_ according to MASTERNAME. Note that we have to use $build_, the $enable_ is just AC_ARG_ENABLE() stuff only. The $build_ is evaluated and modified by our UL_...() functions. * add enable-schedutils.conf to have build-system regression test for this use-case Addresses: https://github.com/karelzak/util-linux/issues/415 Signed-off-by: Karel Zak configure.ac | 14 ++++++++------ m4/ul.m4 | 15 +++++++++++++++ tools/config-gen.d/enable-schedutils.conf | 3 +++ 3 files changed, 26 insertions(+), 6 deletions(-) commit 34f3469d18ed071f7857b690656c2f130093bbb1 Author: Karel Zak Date: Mon Feb 20 13:22:55 2017 +0100 tests: another improvement to the sfdisk wipe test Signed-off-by: Karel Zak tests/expected/sfdisk/wipe-partition | 2 ++ tests/ts/sfdisk/wipe | 18 +++++------------- 2 files changed, 7 insertions(+), 13 deletions(-) commit bf3e7a40ab931bd0ef9d2227ea96e2c7fad64454 Author: Karel Zak Date: Mon Feb 20 13:08:30 2017 +0100 libblkid: remove unnecessary 'static' keyword Signed-off-by: Karel Zak libblkid/src/topology/evms.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 79b915e8df2eaa060e157ed51b8c70fed177d34d Author: Sami Kerola Date: Sun Feb 12 20:42:49 2017 +0000 findmnt: fix couple memory leaks [cppcheck] In both cases FILE *f was leaked. Signed-off-by: Sami Kerola misc-utils/findmnt-verify.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit c5e3ebcedcc810d74faea7f2f70aa06ca47379b6 Author: Sami Kerola Date: Sun Feb 12 18:48:21 2017 +0000 libblkid: declare across file variables in blkidP.h [smatch scan] Else these variables will cause following warning: libblkid/src/superblocks/superblocks.c:165:29: warning: symbol 'superblocks_drv' was not declared. Should it be static? Signed-off-by: Sami Kerola libblkid/src/blkidP.h | 5 +++++ libblkid/src/probe.c | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) commit a2c8c533ce3bbc6a803e8f9e81cb22e7f52db8ef Author: Sami Kerola Date: Sun Feb 12 08:25:03 2017 +0000 lib/idcache: add void to function declaration [smatch scan] lib/idcache.c:29:29: warning: non-ANSI function declaration of function 'new_idcache' Signed-off-by: Sami Kerola lib/idcache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2ba641e5f3879593e36fa84872289872a4060d03 Author: Sami Kerola Date: Sun Feb 12 00:19:33 2017 +0000 misc: add static keyword to where needed [smatch scan] text-utils/rev.c:68:9: warning: symbol 'buf' was not declared. Should it be static? Signed-off-by: Sami Kerola disk-utils/cfdisk.c | 6 +- disk-utils/fdformat.c | 2 +- disk-utils/fdisk-menu.c | 16 ++--- disk-utils/fsck.c | 2 +- disk-utils/fsck.cramfs.c | 4 +- disk-utils/partx.c | 4 +- disk-utils/raw.c | 8 +-- disk-utils/sfdisk.c | 2 +- lib/colors.c | 2 +- lib/loopdev.c | 2 +- libblkid/src/superblocks/drbdmanage.c | 2 +- libblkid/src/topology/evms.c | 2 +- libfdisk/src/sun.c | 2 +- login-utils/sulogin.c | 10 ++-- login-utils/vipw.c | 6 +- misc-utils/blkid.c | 2 +- misc-utils/findmnt.c | 2 +- misc-utils/getopt.c | 4 +- misc-utils/kill.c | 2 +- misc-utils/look.c | 18 +++--- misc-utils/lsblk.c | 6 +- misc-utils/whereis.c | 2 +- schedutils/ionice.c | 2 +- sys-utils/hwclock-cmos.c | 26 ++++----- sys-utils/hwclock.c | 2 +- sys-utils/ipcs.c | 2 +- sys-utils/lscpu.c | 12 ++-- sys-utils/lsns.c | 4 +- sys-utils/prlimit.c | 2 +- sys-utils/renice.c | 2 +- sys-utils/swapon.c | 2 +- term-utils/script.c | 2 +- text-utils/col.c | 16 ++--- text-utils/column.c | 4 +- text-utils/more.c | 106 +++++++++++++++++----------------- text-utils/pg.c | 64 ++++++++++---------- text-utils/rev.c | 2 +- text-utils/ul.c | 45 +++++++-------- 38 files changed, 199 insertions(+), 200 deletions(-) commit 87918040658f2fa9b1bf78f1f8f4f5c065a2e3a3 Author: Sami Kerola Date: Sat Feb 11 20:23:26 2017 +0000 misc: do not use plain 0 as NULL [smatch scan] text-utils/tailf.c:69:21: warning: Using plain integer as NULL pointer Since many 'struct option' has used zero as NULL make them more readable in same go by reindenting, and using named argument requirements. Reference: https://lwn.net/Articles/93577/ Signed-off-by: Sami Kerola Documentation/boilerplate.c | 18 +++++----- disk-utils/addpart.c | 6 ++-- disk-utils/cfdisk.c | 2 +- disk-utils/delpart.c | 6 ++-- disk-utils/fsck.c | 24 ++++++------- disk-utils/fsck.cramfs.c | 18 +++++----- disk-utils/isosize.c | 10 +++--- disk-utils/mkfs.cramfs.c | 6 ++-- disk-utils/mkswap.c | 18 +++++----- disk-utils/raw.c | 10 +++--- disk-utils/resizepart.c | 6 ++-- disk-utils/sfdisk.c | 2 +- disk-utils/swaplabel.c | 10 +++--- include/pt-mbr-partnames.h | 2 +- lib/randutils.c | 4 +-- lib/timer.c | 2 +- libblkid/src/dev.c | 6 ++-- libblkid/src/devname.c | 12 +++---- libblkid/src/read.c | 6 ++-- libblkid/src/resolve.c | 2 +- libblkid/src/superblocks/vfat.c | 2 +- libblkid/src/tag.c | 12 +++---- libblkid/src/verify.c | 4 +-- libfdisk/src/bsd.c | 2 +- libmount/python/context.c | 46 ++++++++++++------------- libmount/python/fs.c | 46 ++++++++++++------------- libmount/python/pylibmount.c | 2 +- libmount/python/tab.c | 46 ++++++++++++------------- libuuid/src/gen_uuid.c | 10 +++--- login-utils/chfn.c | 14 ++++---- login-utils/chsh.c | 12 +++---- login-utils/nologin.c | 6 ++-- login-utils/su-common.c | 4 +-- login-utils/sulogin.c | 12 +++---- login-utils/utmpdump.c | 12 +++---- misc-utils/cal.c | 4 +-- misc-utils/findmnt.c | 76 ++++++++++++++++++++--------------------- misc-utils/lsblk.c | 58 +++++++++++++++---------------- misc-utils/namei.c | 18 +++++----- misc-utils/wipefs.c | 22 ++++++------ sys-utils/blkdiscard.c | 18 +++++----- sys-utils/chcpu.c | 18 +++++----- sys-utils/eject.c | 4 +-- sys-utils/fallocate.c | 26 +++++++------- sys-utils/flock.c | 2 +- sys-utils/fsfreeze.c | 10 +++--- sys-utils/fstrim.c | 16 ++++----- sys-utils/hwclock.c | 66 +++++++++++++++++------------------ sys-utils/losetup.c | 44 ++++++++++++------------ sys-utils/lscpu.c | 24 ++++++------- sys-utils/lsipc.c | 42 +++++++++++------------ sys-utils/mount.c | 68 ++++++++++++++++++------------------ sys-utils/mountpoint.c | 14 ++++---- sys-utils/readprofile.c | 6 ++-- sys-utils/rtcwake.c | 32 ++++++++--------- sys-utils/setpriv.c | 44 ++++++++++++------------ sys-utils/swapoff.c | 10 +++--- sys-utils/swapon.c | 32 ++++++++--------- sys-utils/tunelp.c | 22 ++++++------ sys-utils/umount.c | 34 +++++++++--------- sys-utils/unshare.c | 34 +++++++++--------- term-utils/agetty.c | 70 ++++++++++++++++++------------------- term-utils/mesg.c | 8 ++--- term-utils/setterm.c | 2 +- term-utils/wall.c | 12 +++---- text-utils/col.c | 18 +++++----- text-utils/colcrt.c | 2 +- text-utils/colrm.c | 6 ++-- text-utils/column.c | 18 +++++----- text-utils/more.c | 4 +-- text-utils/rev.c | 6 ++-- text-utils/tailf.c | 10 +++--- text-utils/ul.c | 10 +++--- 73 files changed, 655 insertions(+), 655 deletions(-) commit e948f4b616d02576032e8e9960d1241a77fe4e8d Author: Sami Kerola Date: Sat Feb 11 19:01:08 2017 +0000 cfdisk: avoid use of VLA in combination with sizeof() [smatch scan] disk-utils/cfdisk.c:1066:29: error: cannot size expression One should use sizeof() only when variable size can be known at time of compilation. That is not the case with variable length arrays. Signed-off-by: Sami Kerola disk-utils/cfdisk.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 1f519a90c15803fe262a569265bc0876b8726d4d Author: Karel Zak Date: Fri Feb 17 16:24:35 2017 +0100 tests: make sfdisk wipe partition optional Signed-off-by: Karel Zak tests/ts/sfdisk/wipe | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) commit 1c1d30c7501b264742f73b82338ce952f6709c20 Author: Karel Zak Date: Fri Feb 17 16:15:03 2017 +0100 libfdisk: add sample-fdisk-mkpart binary For example: # sample-fdisk-mkpart --device /dev/sdc 1M 2M 3M - 5M # fdisk -l /dev/sdc ... Device Boot Start End Sectors Size Id Type /dev/sdc1 2048 4095 2048 1M 83 Linux /dev/sdc2 4096 8191 4096 2M 83 Linux /dev/sdc3 8192 14335 6144 3M 83 Linux /dev/sdc4 14336 204799 190464 93M 5 Extended /dev/sdc5 16384 26623 10240 5M 83 Linux Addresses: https://github.com/karelzak/util-linux/issues/204 Signed-off-by: Karel Zak libfdisk/Makemodule.am | 1 + libfdisk/samples/Makemodule.am | 11 +++ libfdisk/samples/mkpart.c | 172 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 184 insertions(+) commit 8d03f4af49a7efe894cb7c68c84649fb889ba741 Author: Karel Zak Date: Fri Feb 17 16:11:37 2017 +0100 libfdisk: (dos) make it possible to create primary/logical by template Let's check partition partno if specified to create logical or primary partition. Addresses: https://github.com/karelzak/util-linux/issues/204 Signed-off-by: Karel Zak libfdisk/src/dos.c | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) commit 21f1206aac9a291e587c50037fc2b490d0f4c72d Author: Karel Zak Date: Fri Feb 17 14:47:00 2017 +0100 libfdisk: (gpt) make sure it's GPT in public API Signed-off-by: Karel Zak libfdisk/src/gpt.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit e1cfb3046608f9c4543d5e3e3d405c39995a1f86 Author: Karel Zak Date: Fri Feb 17 13:15:09 2017 +0100 libfdisk: verify partno from template * verify partno from template when create a new partition * remove unnecessary l->ext_offset check Signed-off-by: Karel Zak libfdisk/src/dos.c | 2 +- libfdisk/src/partition.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) commit 9dc56447177946aed26a1c71fd1667bf76ce01bd Author: Karel Zak Date: Fri Feb 17 10:28:53 2017 +0100 tests: (sfdisk) tell kernel about new partition Signed-off-by: Karel Zak tests/expected/sfdisk/wipe-partition | 2 ++ tests/ts/sfdisk/wipe | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) commit 99d944bb2dc428822c078ea20d25a670b4faf2ce Author: Karel Zak Date: Thu Feb 16 15:30:45 2017 +0100 tests: add udevadm settle to sfdisk wipe Signed-off-by: Karel Zak tests/ts/sfdisk/wipe | 1 + 1 file changed, 1 insertion(+) commit 8ad7f6b96a8fa6fbb96ca813d72709a6e1559731 Author: Karel Zak Date: Thu Feb 16 15:27:07 2017 +0100 build-sys: add missing file Signed-off-by: Karel Zak include/Makemodule.am | 1 + 1 file changed, 1 insertion(+) commit 74fe554a412dd55e9814d1072bc3d36f627d2b77 Author: Karel Zak Date: Thu Feb 16 14:14:54 2017 +0100 tests: add --show-diff Signed-off-by: Karel Zak .travis-functions.sh | 4 ++-- tests/functions.sh | 8 ++++++++ tests/run.sh | 2 ++ 3 files changed, 12 insertions(+), 2 deletions(-) commit 1854d6dfc66ee956d62e036f12fc9b84d0539b79 Author: Karel Zak Date: Thu Feb 16 13:47:34 2017 +0100 build-sys: add non-widechar.conf Signed-off-by: Karel Zak tools/config-gen.d/non-widechar.conf | 3 +++ 1 file changed, 3 insertions(+) commit 1b6d02fe8c92f8e20e1a1f26645aa93a590c6b0c Author: Karel Zak Date: Thu Feb 16 13:46:26 2017 +0100 cfdisk: use buffer editor for ui_get_string() Addresses: https://github.com/karelzak/util-linux/issues/403 Signed-off-by: Karel Zak disk-utils/cfdisk.c | 99 +++++++++++++++++++++++++---------------------------- 1 file changed, 46 insertions(+), 53 deletions(-) commit 299ef2c45756e7123167d291cc476ada25469e58 Author: Karel Zak Date: Thu Feb 16 13:04:26 2017 +0100 lib/mbsedit: add simple buffer editor Signed-off-by: Karel Zak include/mbsedit.h | 32 ++++++++ lib/Makemodule.am | 1 + lib/mbsedit.c | 222 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 255 insertions(+) commit ab3d8937843c07da8e4ea62a05032ccde0187ea5 Author: Karel Zak Date: Thu Feb 16 11:01:35 2017 +0100 tests: use swap in sfdisk wipe test and add "udevadm settle". Signed-off-by: Karel Zak tests/expected/sfdisk/wipe-partition | 2 +- tests/ts/sfdisk/wipe | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) commit d86dc714276980c6fb7af2869ae4bec031493627 Author: Karel Zak Date: Wed Feb 15 13:45:02 2017 +0100 rename: add --no-act to bash-completion Signed-off-by: Karel Zak bash-completion/rename | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 990bf1f04837d5010629b3e12925842d25dec9d4 Author: Alexander F Rødseth Date: Mon Feb 13 13:44:38 2017 +0100 rename: add --no-act option [kzak@redhat.com: - rename --dry-run to --no-act] Signed-off-by: Alexander F Rødseth Signed-off-by: Karel Zak misc-utils/rename.1 | 15 ++++++++++----- misc-utils/rename.c | 28 +++++++++++++++++----------- 2 files changed, 27 insertions(+), 16 deletions(-) commit f0c60dff1acae21b1729ed4963bd46be3bbaa83e Author: Karel Zak Date: Wed Feb 15 12:48:06 2017 +0100 tests: add sfdisk --wipe and --wipe-partition tests Addresses: https://github.com/karelzak/util-linux/issues/410 Addresses: https://github.com/karelzak/util-linux/issues/411 Signed-off-by: Karel Zak tests/expected/sfdisk/wipe-fs-to-dos | 31 +++++++++ tests/expected/sfdisk/wipe-gpt-to-dos | 51 +++++++++++++++ tests/expected/sfdisk/wipe-gpt-to-dos-auto | 58 +++++++++++++++++ tests/expected/sfdisk/wipe-partition | 52 +++++++++++++++ tests/functions.sh | 10 +++ tests/ts/sfdisk/wipe | 101 +++++++++++++++++++++++++++++ 6 files changed, 303 insertions(+) commit e9e88bb8e9678bf99e5474d8f2eed97cb9923253 Author: Karel Zak Date: Wed Feb 15 11:30:58 2017 +0100 libblkid: (gpt) fix force flag Signed-off-by: Karel Zak libblkid/src/partitions/gpt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5635d1955091ff7084b7cafc22b48cd5a5b17387 Author: Karel Zak Date: Tue Feb 14 15:11:35 2017 +0100 fdisk: improve --wipe functionality * always (except --wipe=never) wipe old partition tables * improve warn messages * improve man page Addresses: https://github.com/karelzak/util-linux/issues/410 Signed-off-by: Karel Zak disk-utils/fdisk-menu.c | 33 ++++++++++++++++++--------------- disk-utils/fdisk.8 | 11 ----------- disk-utils/fdisk.c | 45 +++++++++++++++++++++++++++------------------ disk-utils/fdisk.h | 2 ++ 4 files changed, 47 insertions(+), 44 deletions(-) commit bb88152764837a579cb7a2b3ba3e979963419bed Author: Karel Zak Date: Tue Feb 14 15:11:35 2017 +0100 sfdisk: improve --wipe functionality * always (except --wipe=never) wipe old partition tables * improve warn messages * improve man page Addresses: https://github.com/karelzak/util-linux/issues/410 Signed-off-by: Karel Zak disk-utils/sfdisk.8 | 8 +++++--- disk-utils/sfdisk.c | 54 ++++++++++++++++++++++++++++++++++------------------- 2 files changed, 40 insertions(+), 22 deletions(-) commit 74493d48d8c9c710ec5c9cbf9503ab082db64d4f Author: Karel Zak Date: Tue Feb 14 14:57:24 2017 +0100 libblkid: fix BLKID_PARTS_FORCE_GPT usage Now wipefs always inform about MBR as about PMBR. That's bug. Signed-off-by: Karel Zak libblkid/src/partitions/gpt.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit a1001292aeea4351abccf221dfc3af7a70b476f0 Author: Karel Zak Date: Tue Feb 14 14:46:19 2017 +0100 libfdisk: (dos) debug what we read from first sector Signed-off-by: Karel Zak libfdisk/src/dos.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 0cec78a3c467dfbda06bb846f3a8d861f313ccc3 Author: Karel Zak Date: Tue Feb 14 14:23:45 2017 +0100 libfdisk: classify collision type Signed-off-by: Karel Zak libfdisk/docs/libfdisk-sections.txt | 1 + libfdisk/src/context.c | 15 +++++++++++++++ libfdisk/src/fdiskP.h | 1 + libfdisk/src/libfdisk.h.in | 1 + libfdisk/src/libfdisk.sym | 1 + libfdisk/src/wipe.c | 15 +++++++++++---- 6 files changed, 30 insertions(+), 4 deletions(-) commit 37204dc60c048be91794e349fc41217aea7363b7 Author: Karel Zak Date: Tue Feb 14 13:07:54 2017 +0100 libfdisk: check for collisions when create new label We need to be sure that when create a new disklabel than the old label will be removed. Addresses: https://github.com/karelzak/util-linux/issues/410 Signed-off-by: Karel Zak libfdisk/src/context.c | 52 ++------------------------------------------------ libfdisk/src/fdiskP.h | 1 + libfdisk/src/label.c | 4 ++++ libfdisk/src/wipe.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 57 insertions(+), 50 deletions(-) commit b192dd6943e5bb5d2a3773b2c9b06cbd4eb28258 Author: Sami Kerola Date: Sat Feb 11 18:04:14 2017 +0000 lib/randutils: glibc 2.25 has getrandom(2) declaration Use correct header file to include the function. Reference: http://git.kernel.org/cgit/docs/man-pages/man-pages.git/commit/?id=2cbb6fb4e926e56dc3985b19ac02389321a0af5d Signed-off-by: Sami Kerola lib/randutils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d011b3dd66426135380f5f9fc13b942ddeb1b52f Author: Sami Kerola Date: Sat Feb 11 14:10:52 2017 +0000 bash-completion: add blkreset and blkreport completion Signed-off-by: Sami Kerola bash-completion/blkreset | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) commit fc724524732102b5c01c4973ea597e20683fbc05 Author: Sami Kerola Date: Sat Feb 11 14:10:51 2017 +0000 man: improve blkreport(8) and blkreset(8) manual pages Tell in manual page what ZAC and ZBC acronyms mean. Include explanation to blkreport output, so that users do not need to search source code to understand what the tool informed. And fix couple dot double space issues. Signed-off-by: Sami Kerola sys-utils/blkreport.8 | 29 ++++++++++++++++++++++++++++- sys-utils/blkreset.8 | 9 ++++----- 2 files changed, 32 insertions(+), 6 deletions(-) commit ee8268c2455182d62fb6533952607816e4197692 Author: Sami Kerola Date: Sat Feb 11 14:10:50 2017 +0000 blkreport, blkreset: small code clean ups Set variables read-only where possible. Fix few code style issues, mostly with spacing. Avoid initializing variables if they are never read before next update. Remove "ERR: %d -> %s" message that repeated system error three times, twice in that message and once at end of main that is the only of these three left in place. Signed-off-by: Sami Kerola sys-utils/blkreport.c | 43 +++++++++++++++++-------------------------- sys-utils/blkreset.c | 17 ++++++++--------- 2 files changed, 25 insertions(+), 35 deletions(-) commit a7349ee315a2f6b0d2d9d7d3446fc2baaca5e78b Author: Yuri Chornoivan Date: Fri Feb 10 13:05:04 2017 +0200 docs: Fix word repetitions Documentation/howto-pull-request.txt | 2 +- disk-utils/partx.c | 2 +- lib/sysfs.c | 2 +- libmount/src/cache.c | 2 +- libmount/src/fs.c | 2 +- libmount/src/tab.c | 2 +- libsmartcols/samples/fromfile.c | 2 +- login-utils/last.c | 2 +- misc-utils/blkid.c | 2 +- misc-utils/cal.c | 2 +- misc-utils/findmnt.c | 2 +- misc-utils/look.c | 2 +- misc-utils/lsblk.c | 2 +- misc-utils/test_uuidd.c | 2 +- misc-utils/wipefs.c | 2 +- sys-utils/chcpu.c | 2 +- sys-utils/dmesg.c | 2 +- sys-utils/fallocate.c | 2 +- sys-utils/fsfreeze.c | 2 +- sys-utils/hwclock.c | 4 ++-- sys-utils/mount.c | 2 +- sys-utils/swapon.c | 2 +- sys-utils/umount.c | 2 +- sys-utils/wdctl.c | 2 +- term-utils/agetty.c | 2 +- 25 files changed, 26 insertions(+), 26 deletions(-) commit 7ccc1643abdd0cb9780ca0304dfdcbc4c5b11eae Author: Karel Zak Date: Fri Feb 10 17:28:07 2017 +0100 findmnt: use line separator for --poll output Addresses: https://github.com/karelzak/util-linux/issues/409 Signed-off-by: Karel Zak misc-utils/findmnt.c | 2 ++ 1 file changed, 2 insertions(+) commit bd3457b8d956911167fe8739c220ad2dff6366a8 Author: Karel Zak Date: Fri Feb 10 16:45:18 2017 +0100 libfdisk: fix fdisk_set_wipe_area() calls The function expects size in sectors rather than in bytes. Addresses: https://github.com/karelzak/util-linux/issues/410 Signed-off-by: Karel Zak libfdisk/src/context.c | 12 ++++-------- libfdisk/src/wipe.c | 4 +++- 2 files changed, 7 insertions(+), 9 deletions(-) commit 91cce31a8ecba7f7bf7aa5edfac6d07eb5751030 Author: Karel Zak Date: Fri Feb 10 12:54:23 2017 +0100 sfdisk: --quiet fixes Addresses: https://github.com/karelzak/util-linux/issues/412 Signed-off-by: Karel Zak disk-utils/sfdisk.c | 10 ++++++---- libfdisk/src/alignment.c | 1 + 2 files changed, 7 insertions(+), 4 deletions(-) commit 6433fcad71fc0ab46a99cba3281c5461d0f05391 Author: Karel Zak Date: Fri Feb 10 11:46:37 2017 +0100 taskset: don't use zero PID in messages The pid 0 is technically correct, but very confusing for end users. Use getpid() in the messages. Addresses: https://github.com/karelzak/util-linux/issues/413 Signed-off-by: Karel Zak schedutils/taskset.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) commit 6153d2977d31f8b3710599f2e564a5e016dab355 Author: Karel Zak Date: Fri Feb 10 10:53:38 2017 +0100 blkreset: remove "LBA" from usage() * "LBA" sounds confusing Reported-by: Damien Le Moal Signed-off-by: Karel Zak sys-utils/blkreset.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 3e30dc82d83b42a738df10b9f1e7d6b1bbcab0af Author: Karel Zak Date: Fri Feb 10 10:53:38 2017 +0100 blkreport: remove "LBA" from usage() and unnecessary alignment check * "LBA" sounds confusing * alignment check is unnecessary for report ioctl Reported-by: Damien Le Moal Signed-off-by: Karel Zak sys-utils/blkreport.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 07fd79087597e8a65767700a9fd91034d1a16409 Author: Benno Schulenberg Date: Thu Feb 9 17:24:00 2017 +0100 blkreport: slice up option descriptions, fix typo, fix docstring Each option plus its description should be a separate translatable string. And, if all is well, blkreport should not discard anything -- that is: fix the cut-and-paste error from blkdiscard. Additionally, tweak some wordings. Signed-off-by: Benno Schulenberg sys-utils/blkreport.8 | 19 ++++++++----------- sys-utils/blkreport.c | 13 ++++++------- 2 files changed, 14 insertions(+), 18 deletions(-) commit 70bb534511f193a00ece0e4777ad2e318a62daa0 Author: Shaun Tancheff Date: Mon Jan 23 20:32:42 2017 +0700 blkzonecmd, blkreport: Add new commands for ZAC/ZBC drives This patch adds: - blkreset to issue Reset (Write Pointer) zone commands - blkreport to retrieve drive zone information [kzak@redhat.com: - cleanup man page and usage() - remove command line options aliases, - use strtosize_or_err() - remove unnecessary -ludev - use blkdev.h stuff] Signed-off-by: Shaun Tancheff Signed-off-by: Karel Zak .gitignore | 2 + configure.ac | 11 +++ sys-utils/Makemodule.am | 14 +++ sys-utils/blkreport.8 | 68 ++++++++++++++ sys-utils/blkreport.c | 240 ++++++++++++++++++++++++++++++++++++++++++++++++ sys-utils/blkreset.8 | 63 +++++++++++++ sys-utils/blkreset.c | 190 ++++++++++++++++++++++++++++++++++++++ 7 files changed, 588 insertions(+) commit a18f17ad2b6b6868a7bc977fabd89d6ce6b5b740 Author: Karel Zak Date: Thu Feb 9 11:42:01 2017 +0100 hwclock: remove if-if-condition sys-utils/hwclock.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 1dc2aaadba3c26beda23d2dcf76c166fac9a71d7 Merge: 4953018 92931ab Author: Karel Zak Date: Thu Feb 9 11:35:50 2017 +0100 Merge branch 'hwclock-jwp-reviewed' of git://github.com/kerolasa/lelux-utiliteetit * 'hwclock-jwp-reviewed' of git://github.com/kerolasa/lelux-utiliteetit: (25 commits) hwclock: remove --compare option hwclock: remove trailing dot from messages that include system error message hwclock: make --date=argument less prone to injection hwclock: fix rtc atexit registration hwclock: clarify cmos inb and outb preprocessor directives hwclock: try RTCGET and RTCSET only when normal rtc fails hwclock: stream line synchronize_to_clock_tick_rtc() hwclock: improve coding style hwclock: remove division by zero [asan] hwclock: add debugging to open_rtc() hwclock: remove magic constants from interpret_date_string() hwclock: use symbolic magic values passed in between functions hwclock: initialize struct adjtime members hwclock: alloate date_resp parsing buffer in interpret_date_string() hwclock: simplify save_adjtime() execution flow hwclock: remove dead code and other minor fixes hwclock: move error messages to determine_clock_access_method() hwclock: clarify set_cmos_epoch() code hwclock: move command-line options to control structure hwclock: remove unnecessary type casts ... commit 4953018e23ba125272d9bcfd61a1a3040d211bf0 Author: Carlos Santos Date: Wed Feb 8 13:27:36 2017 -0200 build-sys: improve detection of the "isnan" function in uClibc Since commit beceb14b450ded6560ed743634a5e80604a8edf3, MATH_LIBS is set to "-lm" when the isnan function is detected. In uClibc, however, isnan is a macro that calls __isnan, __isnanf, or __isnanl, depending on the size of the argument (double, float or long double). Fixes: http://autobuild.buildroot.net/results/2c2/2c29a78ed81ca844a87dcd076ab3e14ea080296d/ http://autobuild.buildroot.net/results/404/404b10f359b2ae8a7216729fa1bab37fed2d3d4c/ Signed-off-by: Carlos Santos configure.ac | 1 + 1 file changed, 1 insertion(+) commit 9e66fd30d7bfbd7279db6100830aa9045d0255ca Author: Karel Zak Date: Thu Feb 9 11:21:49 2017 +0100 umount: exclude selinuxfs from --all Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1417722 Signed-off-by: Karel Zak sys-utils/umount.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 92931ab28d2f9174b884b4373d6cdd1e0ef350d4 Author: Sami Kerola Date: Tue Jan 10 21:16:20 2017 +0000 hwclock: remove --compare option Compare functionality was printing nonsense values. There is no knowledge of anyone using this broken functionality. Instead of deprecating the code for months, and removing it after few release, it is removed immediately. Needless to say this is unusual removal. Reference: http://marc.info/?l=util-linux-ng&m=148396210506652&w=2 Signed-off-by: Karel Zak Signed-off-by: Sami Kerola Documentation/deprecated.txt | 5 +++ bash-completion/hwclock | 1 - sys-utils/hwclock.8.in | 6 ---- sys-utils/hwclock.c | 75 ++------------------------------------------ sys-utils/hwclock.h | 1 - 5 files changed, 8 insertions(+), 80 deletions(-) commit c9a86ff664a20a0c136f19e828cd7c9c9febaf34 Author: Sami Kerola Date: Sat Dec 31 21:29:27 2016 +0000 hwclock: remove trailing dot from messages that include system error message Signed-off-by: Sami Kerola sys-utils/hwclock-cmos.c | 2 +- sys-utils/hwclock-rtc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 9c65888e823a1d54b7198f6e75919e7a13867bca Author: Sami Kerola Date: Wed Jul 27 19:47:38 2016 +0100 hwclock: make --date=argument less prone to injection This change should not improve security much. One hopes hwclock --set is restricted for root only. Where hwclock is allowed to run via sudo, or has setuid setup, there is a pretty easy privilege escalation via subshell. $ sudo ./hwclock --set --date='2000-10-20$(touch /tmp/hwclock.inject)' Reviewed-by: J William Piggott Signed-off-by: Sami Kerola sys-utils/hwclock.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 926ffe745162c7d794ec69593dee09730a767539 Author: Sami Kerola Date: Tue Jul 26 14:34:30 2016 +0100 hwclock: fix rtc atexit registration Commit 27f9db17bd57b85947445c03e2cd9dda36ca377f missed a minus sign from comparison. Reviewed-by: J William Piggott Signed-off-by: Sami Kerola sys-utils/hwclock-rtc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6b06669e2a11c80fbf951b07126ca5d748df70bd Author: Sami Kerola Date: Tue Jul 26 08:33:32 2016 +0100 hwclock: clarify cmos inb and outb preprocessor directives The cmos only works when architecture is i386, x86_64, or alpha. Reviewed-by: J William Piggott Signed-off-by: Sami Kerola sys-utils/hwclock-cmos.c | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) commit fc35f2db798eb101d5a114304bae6131d6b50726 Author: Sami Kerola Date: Tue Jul 26 10:52:15 2016 +0100 hwclock: try RTCGET and RTCSET only when normal rtc fails The RTCGET and RTCSET are in use for sparcs with sbus, so try them as fallback rather than always. Reference: https://github.com/torvalds/linux/blob/master/fs/compat_ioctl.c#L967-L974 Reviewed-by: J William Piggott Signed-off-by: Sami Kerola sys-utils/hwclock-rtc.c | 44 +++++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 21 deletions(-) commit 4bfd519eeee1d0a8f47b33647011e36123d3ed4b Author: Sami Kerola Date: Tue Jul 26 08:54:00 2016 +0100 hwclock: stream line synchronize_to_clock_tick_rtc() Flip if clauses to hit common case first. This should be easier and quicker to read and run. Signed-off-by: Sami Kerola sys-utils/hwclock-rtc.c | 41 +++++++++++++++++++---------------------- 1 file changed, 19 insertions(+), 22 deletions(-) commit bd0786895d584644b47ef7e7ea923cda29e73fa6 Author: Sami Kerola Date: Sun Jul 24 22:33:01 2016 +0100 hwclock: improve coding style Make string constants to be symbolical declarations. Use longer variable name for rtc and cmos function pointer values. Exclude code that is architecture specific with preprocessor directives. And remove message duplication. Signed-off-by: Sami Kerola include/pathnames.h | 4 ++++ sys-utils/hwclock-cmos.c | 19 +++++++++---------- sys-utils/hwclock-rtc.c | 18 ++++++++++-------- 3 files changed, 23 insertions(+), 18 deletions(-) commit 85932da89ee633a8666c6f0191edd760bfac2501 Author: Sami Kerola Date: Sun Jul 17 22:04:32 2016 +0100 hwclock: remove division by zero [asan] Signed-off-by: Sami Kerola sys-utils/hwclock.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 067b60280a829a8db2bd19eeb5fde6ea630e99f3 Author: Sami Kerola Date: Sun Jul 17 17:10:48 2016 +0100 hwclock: add debugging to open_rtc() Earlier when open_rtc() returned -1 the char *rtc_dev_name end up having NULL that made it unsuitable to be used in error message. Now one can debug what paths the open_rtc() tries to use when one has to debug why 'cannot open rtc device' happen. Reviewed-by: J William Piggott Signed-off-by: Sami Kerola sys-utils/hwclock-rtc.c | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) commit 6b3cb186690438caa84bea336f9b380d8159d940 Author: Sami Kerola Date: Sun Jul 17 16:35:40 2016 +0100 hwclock: remove magic constants from interpret_date_string() The constants function returned were not used. In same go clean up execution flow a little bit. Reviewed-by: J William Piggott Signed-off-by: Sami Kerola sys-utils/hwclock.c | 65 ++++++++++++++++++++++------------------------------- 1 file changed, 27 insertions(+), 38 deletions(-) commit 0f32118e70c097f54fe706cb34adeaf9010a6a7a Author: Sami Kerola Date: Sun Jul 17 16:14:16 2016 +0100 hwclock: use symbolic magic values passed in between functions The manipulate_clock() is seeing return value from busywait_for_rtc_clock_tick(). And the get_permissions_cmos() can see i386_iopl() return value. Reviewed-by: J William Piggott Signed-off-by: Sami Kerola sys-utils/hwclock-cmos.c | 6 ++++-- sys-utils/hwclock-rtc.c | 8 ++++---- sys-utils/hwclock.c | 12 +++++------- sys-utils/hwclock.h | 6 ++++++ 4 files changed, 19 insertions(+), 13 deletions(-) commit a8775f4e7f3f7153120bba1f78211400f45b68c4 Author: Sami Kerola Date: Sun Jul 17 13:25:40 2016 +0100 hwclock: initialize struct adjtime members Avoid any chance of using uninitialized values. It looks like the earlier code did take care of that, but it was less obvious about the fact. Reviewed-by: J William Piggott Signed-off-by: Sami Kerola sys-utils/hwclock.c | 31 +++++-------------------------- 1 file changed, 5 insertions(+), 26 deletions(-) commit 710684e81d12520101f88e4be219d7d9914902a6 Author: Sami Kerola Date: Sun Jul 17 12:49:12 2016 +0100 hwclock: alloate date_resp parsing buffer in interpret_date_string() This makes overflowing the variable in question impossible. Reviewed-by: J William Piggott Signed-off-by: Sami Kerola sys-utils/hwclock.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit 4aca5fe247738d43920c6ea20030848d7864aba2 Author: Sami Kerola Date: Sun Jul 17 12:12:52 2016 +0100 hwclock: simplify save_adjtime() execution flow Return early to avoid excessive nesting. In same go remove any chance of overflow by using appropriate allocation. And update variable names to be easier to understand. Reviewed-by: J William Piggott Signed-off-by: Sami Kerola sys-utils/hwclock.c | 82 ++++++++++++++++++++++------------------------------- 1 file changed, 34 insertions(+), 48 deletions(-) commit c6ea9ef6cbe3a7ec38f550b18239fc1b27eb5e41 Author: Sami Kerola Date: Sun Jul 17 11:30:40 2016 +0100 hwclock: remove dead code and other minor fixes Use #ifdef rather than #if to avoid undefined preprocessor identifier warning. Remove dead code. The #if 0 ensured the code has not been used for long time, which is good because the linux/mc146818rtc.h is not been part of user-api for long time. Value of the adjtime_p->last_calib_time is checked if it has value of zero, so testing none-zero bit later is necessarily true, and therefore does not need to be checked. And at the and remove unnecessary boolean variable. Signed-off-by: Sami Kerola sys-utils/hwclock-cmos.c | 2 +- sys-utils/hwclock-rtc.c | 12 ------------ sys-utils/hwclock.c | 10 +++------- 3 files changed, 4 insertions(+), 20 deletions(-) commit 8f729d60fa6d0c84780b7af31adce599694869c8 Author: Sami Kerola Date: Sat Jul 16 22:15:54 2016 +0100 hwclock: move error messages to determine_clock_access_method() This makes main() a little bit shorter. Reviewed-by: J William Piggott Signed-off-by: Sami Kerola sys-utils/hwclock-rtc.c | 2 +- sys-utils/hwclock.c | 29 +++++++++++++---------------- 2 files changed, 14 insertions(+), 17 deletions(-) commit d0d3469139958b54dad57f979bc3162fbd3fa638 Author: Sami Kerola Date: Sat Jul 16 20:18:19 2016 +0100 hwclock: clarify set_cmos_epoch() code Variable set_epoc is unnecessary, and removal of it makes it obvious what is happening in this function. Reviewed-by: J William Piggott Signed-off-by: Sami Kerola sys-utils/hwclock-cmos.c | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) commit 336f7c5f684be96b4908cd3f02226964ed302e63 Author: Sami Kerola Date: Sat Jul 16 16:45:07 2016 +0100 hwclock: move command-line options to control structure The control structure is read-only everywhere else but in main(). Almost all changes are about how variables are referred, with one exception. Calls to read_adjtime() from manipulate_clock() and compare_clock() are moved to main(). This way it is possible to keep variable that tells if hwclock is using UTC-0 be part of control structure. Changes within #ifdef __alpha__ segments were tested by flipping the preprocessor directivive otherway around and getting good compilaton all the way to the point where linking on none-alpha system failed. Reviewed-by: J William Piggott Signed-off-by: Sami Kerola sys-utils/hwclock-cmos.c | 144 +++++++------ sys-utils/hwclock-rtc.c | 76 +++---- sys-utils/hwclock.c | 522 +++++++++++++++++++++-------------------------- sys-utils/hwclock.h | 60 +++++- 4 files changed, 402 insertions(+), 400 deletions(-) commit b68e1f44ab8ac5bd96d7f9222f570b60c116e25a Author: Sami Kerola Date: Sat Jul 16 13:43:35 2016 +0100 hwclock: remove unnecessary type casts Most of the casts did nothing, with exception of couple printouts where format specifier is updated to match with the variable type. Reviewed-by: J William Piggott Signed-off-by: Sami Kerola sys-utils/hwclock.c | 52 ++++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) commit 183a2715b115d889fac6b50677c6951f8b277cb5 Author: Sami Kerola Date: Sat Jul 16 13:23:28 2016 +0100 hwclock: do not hardcode date command magic string twice Variable 'magic' already contains string 'seconds-into-epoch'. Reviewed-by: J William Piggott Signed-off-by: Sami Kerola sys-utils/hwclock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 48e7ed5e3fec37307a3153b8082ca365083c68e7 Author: Sami Kerola Date: Sat Jul 16 12:57:25 2016 +0100 hwclock: remove hwclock_exit() indirection Reviewed-by: J William Piggott Signed-off-by: Sami Kerola sys-utils/hwclock.c | 10 +++------- sys-utils/hwclock.h | 7 +------ 2 files changed, 4 insertions(+), 13 deletions(-) commit 1030c325c05b79f70a199464b05c72d3d383a9bc Author: Sami Kerola Date: Sat Jul 16 12:50:53 2016 +0100 hwclock: remove FLOOR macro in favour of floor(3) Reviewed-by: J William Piggott Signed-off-by: Sami Kerola sys-utils/Makemodule.am | 2 +- sys-utils/hwclock.c | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) commit b72a75e993d60d50cb9ed067aaf83197b3b1c9e1 Author: Sami Kerola Date: Tue Jul 12 22:21:10 2016 +0100 lib: add timegm() portability function to lib/timeutils.c Local timegm() is a replacement function in cases it is missing from libc implementation. Hopefully the replacement is never, or very rarely, used. CC: Ruediger Meier Reviewed-by: J William Piggott Signed-off-by: Sami Kerola configure.ac | 1 + include/timeutils.h | 4 ++++ lib/timeutils.c | 19 +++++++++++++++++++ login-utils/utmpdump.c | 1 + 4 files changed, 25 insertions(+) commit 12f1cdda3d49ccb8bed8703247270b5d13d1b257 Author: Sami Kerola Date: Sun Jul 10 20:09:55 2016 +0100 hwclock: remove UTC-0 localization hack Use timegm(3) instead rather than re-implement same functionality with mktime(3) combined with removal of TZ localization. Reviewed-by: J William Piggott Signed-off-by: Sami Kerola sys-utils/hwclock.c | 34 +++++----------------------------- 1 file changed, 5 insertions(+), 29 deletions(-) commit e7e7697612029c3ae407735ab0fb2b56b867d894 Author: Karel Zak Date: Thu Feb 2 10:28:38 2017 +0100 cfdisk: add copyright to help ... to make it obvious this is a new cfdisk. Signed-off-by: Karel Zak disk-utils/cfdisk.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 1a3397906dc35bf017f5382001eaf60e717d0a8f Author: Karel Zak Date: Wed Feb 1 16:12:55 2017 +0100 libmount: make rootfs lookup by parent-id more robust The root FS id really does not have to be the smallest one. Reported-by: Michal Soltys Signed-off-by: Karel Zak libmount/src/tab.c | 34 +++++++++++++++++++++++--- tests/expected/findmnt/outputs-messy-mountinfo | 31 +++++++++++++++++++++++ tests/ts/findmnt/files/mountinfo-messy | 29 ++++++++++++++++++++++ tests/ts/findmnt/outputs | 5 ++++ 4 files changed, 95 insertions(+), 4 deletions(-) commit 2f4eb047e5e9c7da980c3edb9ff7419b697ba4b3 Author: Karel Zak Date: Wed Feb 1 15:34:57 2017 +0100 cfdisk: support UI refresh on ^L Addresses: https://github.com/karelzak/util-linux/issues/404 Signed-off-by: Karel Zak disk-utils/cfdisk.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit dffab154d29a288aa171ff50263ecc8f2e14a891 Author: Karel Zak Date: Wed Feb 1 11:58:09 2017 +0100 su: properly clear child PID Reported-by: Tobias Stöckmann Signed-off-by: Karel Zak login-utils/su-common.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit 904ffe1fd2ba6c2092e00b4b1b95fcc30be77b45 Author: Karel Zak Date: Tue Jan 31 20:55:07 2017 +0100 lscpu: don't use path_exist() before path_fopen() Signed-off-by: Karel Zak sys-utils/lscpu.c | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) commit 56cda4b7e388f111f46bc380cd48098856395f23 Author: Karel Zak Date: Tue Jan 31 16:18:11 2017 +0100 docs: add BUG REPORTING section to README Addresses: https://github.com/karelzak/util-linux/issues/405 Signed-off-by: Karel Zak README | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 4dfc54b6b17386d68a621d6c7f4e341e8736340f Author: Karel Zak Date: Tue Jan 31 13:44:43 2017 +0100 lscpu: make osrelease file optional Signed-off-by: Karel Zak sys-utils/lscpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f164c08dfa068b6429643ec8950b8c57298a7c51 Merge: 833f9a7 18efba1 Author: Karel Zak Date: Tue Jan 31 13:01:01 2017 +0100 Merge branch 'master' of https://github.com/Pedro-MC/util-linux * 'master' of https://github.com/Pedro-MC/util-linux: findmnt: flush stdout after each (un)(re)mount event, when polling. commit 833f9a7aae713278eec5f85266597482f18c7370 Author: Denis Chaplygin Date: Tue Jan 31 12:51:28 2017 +0100 fallocate: Added posix_fallocate() support. No all filesystems support Linux fallocate. The new option allow use posix implementation if necessary. Signed-off-by: Karel Zak AUTHORS | 1 + configure.ac | 28 ++++++++++++++++++++++++++++ sys-utils/fallocate.1 | 11 +++++++++++ sys-utils/fallocate.c | 28 +++++++++++++++++++++++++++- 4 files changed, 67 insertions(+), 1 deletion(-) commit 7572fb2b8cb69512ca230b7fcfa11577526843f4 Author: Stanislav Brabec Date: Mon Jan 30 17:01:50 2017 +0100 lscpu: Detect Windows Subsystem for Linux Windows 10 implements Windows Subsystem for Linux (WSL). WSL does not implement support for SIGSEGV handler, which is used inside is_vmware_platform(). As a result, lscpu crashes there. Implement WSL detection, and as a side effect, work around the crash. Note that none of existing virtualization types exactly matches. But the the closest would be "container". References: Provide a way to positively detect WSL from an app compiled on Linux. https://github.com/Microsoft/BashOnWindows/issues/423 missing support for SIGSEGV handler https://github.com/Microsoft/BashOnWindows/issues/1637 Signed-off-by: Stanislav Brabec sys-utils/lscpu.c | 20 +++++++++++++++++++- sys-utils/lscpu.h | 1 + 2 files changed, 20 insertions(+), 1 deletion(-) commit afa382f2e087b71c9e626144f2f313abc42ad594 Author: Stanislav Brabec Date: Wed Jan 25 18:30:26 2017 +0100 fstrim: de-duplicate btrfs sub-volumes There was a comparison of roots in uniq_fs_source_cmp(). As we care only on device names, comparing roots makes only a little sense, and it breaks on btrfs. As a result, FITRIM ioctl() is called for each subvolume. But by design, only one TRIM is needed for the whole btrfs volume. Remove it to be able to de-duplicate btrfs subvolumes. Fixes opensuse #1020077. Signed-off-by: Stanislav Brabec sys-utils/fstrim.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) commit 18efba189eb395a7d4ed30e443d7ee4d74ab65e9 Author: Pedro Miguel Carvalho Date: Sun Jan 29 12:03:23 2017 +0000 findmnt: flush stdout after each (un)(re)mount event, when polling. Addresses: karelzak#407 misc-utils/findmnt.c | 1 + 1 file changed, 1 insertion(+) commit 6d8a31f6db4006c6b9750b6381d0bd74ffc992c6 Author: Karel Zak Date: Sat Jan 28 12:39:52 2017 +0100 logger: support sub-trees in the ID for RFC5424 The current code supports @ only, but we also need @.[. ...] RFC5424: 7.2.2 enterpriseId: In general, only the IANA-assigned private enterprise number is needed (a single number). An enterprise might decide to use sub-identifiers below its private enterprise number. If sub- identifiers are used, they MUST be separated by periods and be represented as decimal numbers. An example for that would be "32473.1.2". Addresses: https://github.com/karelzak/util-linux/issues/406 Signed-off-by: Karel Zak misc-utils/logger.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit 61cbc8a3f5aa1b4acb4e5a6b7b251b8c5b8f05b5 Author: Karel Zak Date: Sat Jan 28 12:39:30 2017 +0100 lib/strutils: return end pointer by isdigit_string() Signed-off-by: Karel Zak include/strutils.h | 8 ++++++-- lib/strutils.c | 9 +++++++-- 2 files changed, 13 insertions(+), 4 deletions(-) commit f71b96bfa1b8ec77a26db38c7eb92fe5b7e97b47 Author: Karel Zak Date: Wed Jan 25 12:00:27 2017 +0100 libfdisk: (gpt) add check for entries array size Signed-off-by: Karel Zak libfdisk/src/gpt.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit a157a23f6d34f26da437a32a9bd764805c2d7d85 Author: Alden Tondettar Date: Mon Jan 23 23:28:01 2017 -0700 libblkid: Fix out of bounds reads in BEFS handling The BEFS prober is quite trusting of whatever data is fed to it and performs almost no bounds checks. There don't seem to be any out-of-bounds writes as far as I can tell, but there are many ways a corrupted image could cause libblkid to read OOB and segfault, or hang in an infinite loop. This fix makes a few sanity-checks of the superblock, add bounds checks wherever they seem needed, and crudely checks for cycles in the B+ tree. Signed-off-by: Alden Tondettar libblkid/src/superblocks/befs.c | 122 +++++++++++++++++++++++++++++----------- 1 file changed, 90 insertions(+), 32 deletions(-) commit dfb8d4ba929b6ec3f54b39037f2d6ef59a62ff08 Author: Alden Tondettar Date: Mon Jan 23 23:28:00 2017 -0700 libblkid: Fix out of bounds reads on bad GPT header If a GUID Partition Table claims to have more than 2**25 entries, or if the size of each entry is not exactly 128 bytes, libblkid can read out of bounds and segfault. Perform the appropriate checks. [kzak@redhat.com: - fix typo] Signed-off-by: Alden Tondettar Signed-off-by: Karel Zak libblkid/src/partitions/gpt.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit 999a2ffec92fdecbc1bc85f521057215bcc5ba84 Author: Alden Tondettar Date: Mon Jan 23 23:27:59 2017 -0700 libblkid: Fix out of bounds reads on bad NTFS Master File Table The NTFS prober does not validate certain fields in struct file_attribute, and could attempt to read the disk label from outside the space allocated for the Master File Table. Perform the appropriate checks. Note that one variable (attr_off) is now 64-bit, so a check for integer overflow has been removed as unneeded/confusing. Signed-off-by: Alden Tondettar libblkid/src/superblocks/ntfs.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit a7caeabadf49c4d81e53823e1dff340bca792fb9 Author: Alden Tondettar Date: Mon Jan 23 23:27:58 2017 -0700 libblkid: Fix out of bounds byte swaps in ZFS handling A corrupted ZFS filesystem can trigger 32-bit endian-conversions of unintended memory locations in zfs_extract_guid_name(), in several ways: * The variable "left" (number of bytes remaining in the buffer) does not account for the 12 bytes of the nvlist header. * The field nvp->nvp_namelen (name length in name/value pair) is rounded up to the nearest multiple of 4, but only the unrounded size is checked. * The fields nvs->nvs_type, nvs_strlen, etc. are modified _before_ checking if they are within bounds. * A negative value of nvp->nvp_namelen will bypass the check that nvp->nvp_namelen fits into nvp->nvp_size (size of name/value pair). This allows for mangling of locations up to 12 + 3 + 8 == 23 bytes beyond the end of stack-based buff[4096], and up to 2**31 bytes before its beginning. Furthermore some debugging messages are printed from unchecked memory locations, possibly resulting in OOB reads or setuid programs leaking sensitive data when LIBBLKID_DEBUG is set. This fix attempts to correct all of these problems. It also eliminates the stack-based buffer (in case anything else was missed) and refactors things a bit to (hopefully) make it easier to spot any mistakes. Signed-off-by: Alden Tondettar libblkid/src/superblocks/zfs.c | 159 +++++++++++++++++++++++------------------ 1 file changed, 90 insertions(+), 69 deletions(-) commit 344d861d836d014f0ea332c59cb08dcf8c61ca03 Merge: 9ea8ded 631a195 Author: Karel Zak Date: Fri Jan 20 13:12:57 2017 +0100 Merge branch 'shadow-man' of https://github.com/andhe/util-linux * 'shadow-man' of https://github.com/andhe/util-linux: chsh: use -h as shorthand for --help instead of -u man: chsh(1): add login.defs to SEE ALSO man: chfn(1): add chsh and login.defs to SEE ALSO commit 9ea8ded37b648bbd538cbf9c4d144b8b1a93c1b5 Author: Carlos Santos Date: Thu Jan 19 17:27:37 2017 -0200 build-sys: fix compilation with ncurses and uClibc or musl libc Compiling util-linux with musl and uClibc-ng toolchains when wide-char support is not enabled in ncurses results in compilation failures with the following message: error: two or more data types in declaration specifiers #define wchar_t char The problem occurs because util-linux #defines its own wchar_t (as char) when configured without widechar support. This conflicts with definition of wchar_t contained in stddef.h. This error can be reproduced running " #define wchar_t char #include int main() { return 0; } The only way to avoid the problem it to reorder the inclusion of headers in some files under the text-utils directory. Addresses: http://autobuild.buildroot.net/results/3a2f228e0fa7b5cc28a13d49f48f1a6aef8d9d7a http://autobuild.buildroot.net/results/99e96069f652d511c6212a5bb6be29e68fb1747c http://autobuild.buildroot.net/results/2dc5721aef93b7b410153bafad78248fac3db941 http://autobuild.buildroot.net/results/8a9e197ba7a292b18f8c0c36dca974685556a38a Signed-off-by: Carlos Santos text-utils/colcrt.c | 2 +- text-utils/colrm.c | 2 +- text-utils/column.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 37410713b2007e7069f081fdedd57a6fe513a48c Author: Karel Zak Date: Fri Jan 20 11:02:23 2017 +0100 su, runuser: fix typo in the /etc/default path Reported-by: Andreas Henriksson Signed-off-by: Karel Zak login-utils/su-common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 631a195412f53135179f761573a56e457911603f Author: Andreas Henriksson Date: Thu Jan 19 23:04:47 2017 +0100 chsh: use -h as shorthand for --help instead of -u The -u is still supported (but no longer documented). (This matches the switches used by shadow chsh.) login-utils/chsh.1 | 4 ++-- login-utils/chsh.c | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) commit d0f9990bfbe5b6c045eaf3ef8c12e6961e294218 Author: Andreas Henriksson Date: Thu Jan 19 22:50:31 2017 +0100 man: chsh(1): add login.defs to SEE ALSO (The shadow equivalent manpage lists it.) login-utils/chsh.1 | 1 + 1 file changed, 1 insertion(+) commit 4c49db948a4c8a58a6a78068563b5ab138a30a98 Author: Andreas Henriksson Date: Thu Jan 19 22:39:31 2017 +0100 man: chfn(1): add chsh and login.defs to SEE ALSO (The shadow version of the same manpage mentions these utils, but does not mention finger.) login-utils/chfn.1 | 2 ++ 1 file changed, 2 insertions(+) commit 281873b87461daaf25414345a92e8e33b36b8bbd Author: Karel Zak Date: Thu Jan 19 12:01:51 2017 +0100 runuser: add "--" to SYNOPSIS Signed-off-by: Karel Zak login-utils/runuser.1 | 2 +- login-utils/su-common.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit fde30380712dd34d8a2cdb727733f0719e512918 Merge: 932bbd9 8d6fdd2 Author: Karel Zak Date: Thu Jan 19 11:27:08 2017 +0100 Merge branch 'termutils-typo' of https://github.com/The-42/util-linux * 'termutils-typo' of https://github.com/The-42/util-linux: term-utils/script: fix typo leading to syntax error commit 932bbd990ca0605f3091c9b3d390d357518506bb Author: Karel Zak Date: Thu Jan 19 11:22:38 2017 +0100 build-sys: use MATH_LIBS for hwclock Reported-by: Bert van Hall Signed-off-by: Karel Zak sys-utils/Makemodule.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8d6fdd2f0c2a47db6b4fa697ff0b757f904318e7 Author: Bert van Hall Date: Wed Jan 18 16:41:36 2017 +0100 term-utils/script: fix typo leading to syntax error Introduced in edc7e42, this typo is actually invalid C. Fix this. Signed-off-by: Bert van Hall term-utils/script.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit feda4342df1ced25df3d200ed23469e740196c86 Author: Karel Zak Date: Wed Jan 18 13:17:21 2017 +0100 build-sys: use -lm for scriptreplay if necessary Reported-by: Bert van Hall Addresses: https://github.com/karelzak/util-linux/pull/397 Signed-off-by: Karel Zak configure.ac | 7 +++++++ term-utils/Makemodule.am | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) commit d7a3bf949bee912a9bb0a1cf8542eeeb6a69aa46 Author: Karel Zak Date: Tue Jan 17 13:11:27 2017 +0100 column: rename --columns to --output-width * rename to use less confusing option name * cleanup usage() * update man page Addresses: https://github.com/karelzak/util-linux/pull/327 Signed-off-by: Karel Zak Documentation/deprecated.txt | 5 +++++ text-utils/column.1 | 7 ++++--- text-utils/column.c | 23 ++++++++++++----------- 3 files changed, 21 insertions(+), 14 deletions(-) commit 78acfddd1df9e571dbe3bdc351b56bb0e53ca5e8 Author: Sami Kerola Date: Mon Jan 16 22:31:36 2017 +0000 last: use --time-format instruction when printing wtmp creation time This makes --time-format=iso timestamp to look the same as login/logout times. When --time-format=noformat is used the file creation time not printed. There is no change to default format. Signed-off-by: Sami Kerola login-utils/last.c | 17 +++++++++++++---- tests/expected/utmp/last-nodns | 4 +--- 2 files changed, 14 insertions(+), 7 deletions(-) commit 5eaeb5858fc8c0d906ec53d219c43162c82aed7a Author: Karel Zak Date: Mon Jan 16 14:57:02 2017 +0100 libfdisk: (gpt) make calculations more robust Signed-off-by: Karel Zak libfdisk/src/gpt.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) commit db5729ebf7fd380147ce71cb827821ff3d5391f0 Merge: 8758343 26c9102 Author: Karel Zak Date: Mon Jan 16 12:33:56 2017 +0100 Merge branch 'col' of git://github.com/kerolasa/lelux-utiliteetit * 'col' of git://github.com/kerolasa/lelux-utiliteetit: col: backspacing widechars commit 875834381ddbe8c08fdada759f08d6d6ad83b749 Author: Sami Kerola Date: Thu Jan 5 22:33:40 2017 +0000 newgrp: use libc explicit_bzero() when it is available This currently new function will be part of glibc 2.25. Reference: https://sourceware.org/git/?p=glibc.git;a=commit;h=ea1bd74defcf9d5291d14972e63105168ca9eb4f Signed-off-by: Sami Kerola configure.ac | 1 + login-utils/newgrp.c | 6 ++++++ 2 files changed, 7 insertions(+) commit 2edb85255e678c3dba22671790d47dec3014c529 Author: Stanislav Brabec Date: Thu Jan 12 15:45:56 2017 +0100 tests: Introduce libmount/loop Add libmount/loop test that tests various loop mount options. Signed-off-by: Stanislav Brabec tests/expected/libmount/loop | 1 + tests/expected/libmount/loop-conflict | 2 + tests/expected/libmount/loop-dev-loop | 1 + tests/expected/libmount/loop-file | 1 + tests/expected/libmount/loop-file-o-loop | 1 + tests/expected/libmount/loop-o-loop-val | 1 + tests/expected/libmount/loop-o-loop-val-conflict | 2 + .../expected/libmount/loop-o-loop-val-initialized | 2 + tests/expected/libmount/loop-reuse | 1 + tests/ts/libmount/loop | 133 +++++++++++++++++++++ tests/ts/losetup/losetup-loop | 2 +- 11 files changed, 146 insertions(+), 1 deletion(-) commit 7b46647df4d7d568de91fa8da1c2342acd960e8e Author: Stanislav Brabec Date: Thu Jan 12 15:45:42 2017 +0100 libmount: Fix incorrect detach of reused loop device If -oloop is used and the loop device is reused, the loop device is detached after umount. It is incorrect as it could break the another task using the loop device. This is caused by mnt_context_enable_loopdel(,TRUE) that is called from mnt_context_prepare_umount() whenever "loop" option is used, independently on AUTOCLEAR flag. Remove the "loop" option for reused devices to prevent detaching of reused loop device. Signed-off-by: Stanislav Brabec libmount/src/context_loopdev.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 3789806db21dea8e009ceea8f6158bc778151afe Author: Stanislav Brabec Date: Thu Jan 12 15:45:27 2017 +0100 libmount: fix mount -oloop=/dev/loopX regression If mount option "loop" is used with an argument, it should be respected. Commit 8efad715 introduced a regression. Even with an argument, overlaying loop device is searched and argument is ignored. It could have unexpected side effects. If argument is set, never allocate a new loop device. How to reproduce: mkdir -p cdrom mkisofs -o cdrom.iso cdrom/ 2>/dev/null losetup /dev/loop0 cdrom.iso strace mount -t auto -o ro,loop=/dev/loop1 cdrom.iso /mnt 2>&1 | grep ^mount cat /proc/self/mountinfo | grep /mnt umount /mnt losetup -d /dev/loop0 mount("/dev/loop0", "/mnt", "iso9660", MS_MGC_VAL|MS_RDONLY, NULL) = 0 327 60 7:0 / /mnt ro,relatime shared:241 - iso9660 /dev/loop0 ro losetup: /dev/loop0: detach failed: No such device or address Signed-off-by: Stanislav Brabec libmount/src/context_loopdev.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit b2140d2f24e046d57f9c653aad2f21732f04a51e Author: Karel Zak Date: Mon Jan 16 11:20:32 2017 +0100 libfdisk: apply label alignment properties This fix changes from the previous patches. Signed-off-by: Karel Zak libfdisk/src/alignment.c | 17 +++++++++++++++-- libfdisk/src/context.c | 2 ++ libfdisk/src/fdiskP.h | 1 + 3 files changed, 18 insertions(+), 2 deletions(-) commit f8a4a0d4f2fd569252029bd004e24ee433b43fe8 Author: Karel Zak Date: Fri Jan 13 13:30:22 2017 +0100 partx: add --sector-size option /dev/sdc is 4K disk: # fdisk -l /dev/sdc Disk /dev/sdc: 100 MiB, 104857600 bytes, 25600 sectors ... Device Boot Start End Sectors Size Id Type /dev/sdc1 1024 25599 24576 96M 83 Linux let's use it as disk image: # dd if=/dev/sdc of=~/sdc.img # losetup -f ~/sdc.img old version: # partx --show /dev/loop0 NR START END SECTORS SIZE NAME UUID 1 1024 25599 24576 12M 6a4ba75b-01 new version: # partx --show /dev/loop0 --sector-size 4096 NR START END SECTORS SIZE NAME UUID 1 8192 204799 196608 96M 6a4ba75b-01 Addresses: https://github.com/karelzak/util-linux/issues/396 Signed-off-by: Karel Zak disk-utils/partx.8 | 3 +++ disk-utils/partx.c | 14 ++++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) commit 76fab513b8f2c128a29c36cbc622d1a624b0be19 Author: Karel Zak Date: Fri Jan 13 13:26:37 2017 +0100 libblkid: add blkid_probe_set_sectorsize() The usual way is to use ioctl to ask block device for sector size, but this is useless for disk images (regular files). And the default (512-bytes) may be pretty wrong for disk images from 4K disks. Let's support a way how to specify proper sector size. Signed-off-by: Karel Zak libblkid/docs/libblkid-sections.txt | 1 + libblkid/src/blkid.h.in | 2 ++ libblkid/src/libblkid.sym | 4 ++++ libblkid/src/probe.c | 16 ++++++++++++++++ 4 files changed, 23 insertions(+) commit 502dd53c864c26124146eb42eb9bbf5bb7b587b9 Author: Karel Zak Date: Fri Jan 13 12:44:35 2017 +0100 libfdisk: change the way how apply user device properties The current code calls fdisk_apply_user_device_properties() after label probing, because we want to overwrite label geometry by user settings (e.g. -C -H -S fdisk options). Unfortunately, this way does not work if we need to use a different sector size, because label probing depends on sector size... So, the right way is to apply user setting to the fdisk context before we start to read from device, and overwrite geometry again after label is already read. Fortunately, this shit is necessary only rarely and for SUN and SGI disk labels. Addresses: https://github.com/karelzak/util-linux/issues/396 Signed-off-by: Karel Zak libfdisk/src/alignment.c | 12 +++++++----- libfdisk/src/bsd.c | 3 +++ libfdisk/src/context.c | 8 ++------ libfdisk/src/dos.c | 3 +++ libfdisk/src/fdiskP.h | 1 + libfdisk/src/sun.c | 4 ++++ 6 files changed, 20 insertions(+), 11 deletions(-) commit e86c73164fccf600802612bc033128bcef305341 Author: Karel Zak Date: Fri Jan 13 12:16:06 2017 +0100 libfdisk: recount size when apply user device properties Signed-off-by: Karel Zak libfdisk/src/alignment.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 7526c305b459f1387dad72d1543308246fc12877 Author: Karel Zak Date: Fri Jan 13 11:23:23 2017 +0100 libfdisk: don't use blkdev ioctls for regular files $ fdisk open("sdc.img", O_RDONLY|O_CLOEXEC) = 3 ioctl(3, BLKSSZGET, 0x7ffcf51357c4) = -1 ENOTTY (Inappropriate ioctl for device) ioctl(3, BLKGETSIZE64, 0x7ffcf51357b0) = -1 ENOTTY (Inappropriate ioctl for device) ioctl(3, BLKGETSIZE, 0x7ffcf51356c8) = -1 ENOTTY (Inappropriate ioctl for device) ioctl(3, FDGETPRM, 0x7ffcf51356d0) = -1 ENOTTY (Inappropriate ioctl for device) ioctl(3, HDIO_GETGEO, 0x7ffcf5135790) = -1 ENOTTY (Inappropriate ioctl for device) Signed-off-by: Karel Zak libfdisk/docs/libfdisk-sections.txt | 1 + libfdisk/src/alignment.c | 27 +++++++++++++++++++-------- libfdisk/src/context.c | 18 +++++++++++++++++- libfdisk/src/fdiskP.h | 4 ++++ libfdisk/src/libfdisk.h.in | 1 + libfdisk/src/libfdisk.sym | 1 + 6 files changed, 43 insertions(+), 9 deletions(-) commit 89958178f6d6ebe0944d423feaea66be521fff43 Author: Stanislav Brabec Date: Tue Jan 10 13:54:17 2017 +0100 If mtab support is disabled, disable ro/rw mtab checks Commit f9906424 introduced a check that should prevent different information in mtab and /proc/mounts. The check can require significant amount of time, and for systems without mtab support it has no sense. Execute this code only on systems with mtab. When a systems with large number of nodes (thousands) mount the filesystems simultaneously, the time required for serialization causes the utimensat() to take a large amount of time (tens of minutes) when a large number of nodes are simultaneously updating the timestamp. Signed-off-by: Stanislav Brabec libmount/src/context_mount.c | 2 ++ 1 file changed, 2 insertions(+) commit 12d69ae8bb4364869a4d1ed292cf0393d3ff44f6 Author: Sami Kerola Date: Fri Jan 6 23:54:34 2017 +0000 man: fix couple tools/checkmans.sh warnings :407: warning: macro `fi.' not defined (possibly missing space after `fi') From: cat ./disk-utils/fsck.8 | troff -mandoc -ww -z :71: warning: escape character ignored before `1' From: cat ./disk-utils/partx.8 | troff -mandoc -ww -z Signed-off-by: Sami Kerola disk-utils/fsck.8 | 2 +- disk-utils/partx.8 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 6ffbd28359104c75015c260b84c804fb893b8620 Author: Karel Zak Date: Mon Jan 9 13:28:24 2017 +0100 libsmartcols: add scols_cell_get_alignment() Just to hide that we use cell flags (bitwise operations) to define cell content alignment. The patch also more explicitly specifies the flags in the header file. The alignment is evaluated in the order: right, center, left. The default is left. Note that SCOLS_CELL_FL_* are used for for table title only. Signed-off-by: Karel Zak libsmartcols/docs/libsmartcols-sections.txt | 1 + libsmartcols/src/cell.c | 16 ++++++++++++++++ libsmartcols/src/libsmartcols.h.in | 8 +++++--- libsmartcols/src/libsmartcols.sym | 6 ++++++ libsmartcols/src/table_print.c | 17 +++++++++++------ 5 files changed, 39 insertions(+), 9 deletions(-) commit efc07958110c6c2cac15e5c4c9c80cc1361924cf Merge: a3c455a 16e64b6 Author: Karel Zak Date: Mon Jan 9 13:07:37 2017 +0100 Merge branch 'ignatenko/libsmartcols-dead' of https://github.com/ignatenkobrain/util-linux * 'ignatenko/libsmartcols-dead' of https://github.com/ignatenkobrain/util-linux: libsmartcols: remove dead checks commit a3c455ac9b492b633b10e824ac496c1029c6eba2 Author: Karel Zak Date: Mon Jan 9 13:01:39 2017 +0100 lscpu: add aarch64 specific names It seems that aarch64 uses a different names for some /proc/cpuinfo fields (e.g. intel: bogomips, flags, and aarch64: BogoMIPS, features, ...) Addresses: https://github.com/karelzak/util-linux/issues/392 Signed-off-by: Karel Zak sys-utils/lscpu.c | 3 +++ tests/expected/lscpu/lscpu-armv7 | 3 +++ 2 files changed, 6 insertions(+) commit b5672517fdf37df8f2e3fbf13065723d0486ca56 Author: Karel Zak Date: Mon Jan 9 12:48:14 2017 +0100 unshare: fix SYNOPSIS and usage() The "program" is optional and $SHELL is executed by default. Addresses: https://github.com/karelzak/util-linux/issues/389 Signed-off-by: Karel Zak sys-utils/unshare.1 | 7 ++++--- sys-utils/unshare.c | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) commit 0f0b5823a68c78e4ef62efd1f03cfcb6d549060d Author: Karel Zak Date: Mon Jan 9 12:48:14 2017 +0100 nsenter: fix usage() and improve man page The "program" is optional and $SHELL is executed by default. Addresses: https://github.com/karelzak/util-linux/issues/389 Signed-off-by: Karel Zak sys-utils/nsenter.1 | 7 +++---- sys-utils/nsenter.c | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) commit f1a1a47198b5d0f3249c97283a3470112f6e107a Merge: 11e88c8 892553b Author: Karel Zak Date: Fri Jan 6 11:09:01 2017 +0100 Merge branch 'betterMinixChecks' of https://github.com/n3world/util-linux * 'betterMinixChecks' of https://github.com/n3world/util-linux: libblkid/minix: Sanity check superblock s_state for v 1 and 2 libblkid/minix: Use same checks for version 3 libblkid/minix: Match minix superblock types commit 11e88c86991b9cac57850856cef9fdad9a4c1e53 Author: Karel Zak Date: Thu Jan 5 12:04:22 2017 +0100 wipefs: unused parameter [-Wunused-parameter] Signed-off-by: Karel Zak misc-utils/wipefs.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit e213a8e5a39fbe19082e16b2616f1b02cf673d32 Author: Karel Zak Date: Thu Jan 5 12:36:08 2017 +0100 libfdisk: (sun) use self_label() Signed-off-by: Karel Zak libfdisk/src/sun.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1f408f0220cf87c00d23f38569f99915f739cd0c Author: Karel Zak Date: Thu Jan 5 12:04:22 2017 +0100 libsmartcols: unused parameter [-Wunused-parameter] Signed-off-by: Karel Zak libsmartcols/src/table_print.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 59dee89d5bdf69d09dc745b7d9273beaff861bdb Author: Karel Zak Date: Thu Jan 5 12:04:22 2017 +0100 libuuid: unused parameter [-Wunused-parameter] Signed-off-by: Karel Zak libuuid/src/gen_uuid.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 5d74cf0092b132bf224024548e46566033c84937 Author: Karel Zak Date: Thu Jan 5 11:54:59 2017 +0100 lib/list: remove LIST_HEAD macro * the variable definition with hidden type is always horrible, for example: int func() { LIST_HEAD(foo); ... } the more readable is: int func() { struct list_head foo; INIT_LIST_HEAD(&foo); ... } * the name LIST_HEAD conflict with /usr/include/sys/queue.h * we use it only on two places in sulogin Signed-off-by: Karel Zak include/list.h | 5 ----- login-utils/sulogin-consoles.c | 4 ++-- login-utils/sulogin.c | 5 +++-- 3 files changed, 5 insertions(+), 9 deletions(-) commit 11e1097e6c6d499228c84609523d8d1976be21a3 Author: Karel Zak Date: Thu Jan 5 11:53:56 2017 +0100 sfdisk: unused parameter 'sf' [-Wunused-parameter] Signed-off-by: Karel Zak disk-utils/sfdisk.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 1459613e9a68cd2639a0a924a132d13f945644c2 Merge: 63dc575 b7b2694 Author: Karel Zak Date: Thu Jan 5 11:34:29 2017 +0100 Merge branch 'fixMinixMkfs' of https://github.com/n3world/util-linux * 'fixMinixMkfs' of https://github.com/n3world/util-linux: disk-utils/mkfs.minix: Set ninodes after checking max commit 26c91027b2a67c8c3548a8009df157fee9b156ba Author: Grady Martin Date: Wed Jan 4 22:01:40 2017 +0000 col: backspacing widechars Until now, backspace characters have not accounted for characters of widths other than one. This single line amends that. Requsted-by: Grady Martin Signed-off-by: Sami Kerola text-utils/col.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 892553b1a41b449f58462f123eca2bf2c6c56b33 Author: Nate Clark Date: Wed Jan 4 15:21:17 2017 -0500 libblkid/minix: Sanity check superblock s_state for v 1 and 2 Swap devices with specific values in the uuid can look like minix devices to blkid. Add an extra check to make sure the state of the filesystem has valid state flags. A couple of offending swap uuids include: 35f1f264-137f-471a-bc85-acc9f4bc04a3 35f1f264-7f13-471a-bc85-acc9f4bc04a3 35f1f264-138f-471a-bc85-acc9f4bc04a3 35f1f264-8f13-471a-bc85-acc9f4bc04a3 Without this change a swap device with any of those uuids would be detected as minix and swap by blkid. Signed-off-by: Nate Clark libblkid/src/superblocks/minix.c | 4 ++++ 1 file changed, 4 insertions(+) commit f82c804869bb8613fa0924e3111b7eb55bb04fcd Author: Nate Clark Date: Wed Jan 4 15:24:32 2017 -0500 libblkid/minix: Use same checks for version 3 fsck.minix performs the same sanity checks on all versions of the superblock. Update the probe to perform the same sanity checks so it is less likely a different type of filesystem will be identified as minix. Signed-off-by: Nate Clark libblkid/src/superblocks/minix.c | 37 +++++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 14 deletions(-) commit a9975c1072c4975ec2df958188a80d89cabc6171 Author: Nate Clark Date: Wed Jan 4 15:24:22 2017 -0500 libblkid/minix: Match minix superblock types All of the types in the minix super block are unsigned but in probe_minix they were being treated as signed. This would cause some of the extra sanity checks to pass on a non minix device. The types were updated to match the return types of the helper functions in disk-utils/minix_programs.h This can be checked by creating a swap partition with one of these UUIDs 35f1f264-2468-471a-bc85-acc9f4bc04a3 35f1f264-6824-471a-bc85-acc9f4bc04a3 35f1f264-2478-471a-bc85-acc9f4bc04a3 35f1f264-7824-471a-bc85-acc9f4bc04a3 Prior to this change they would all be considered minix and swap by blkid. Signed-off-by: Nate Clark libblkid/src/superblocks/minix.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b7b26945d1e4491934111d65ac49091daefbdda8 Author: Nate Clark Date: Wed Jan 4 12:31:37 2017 -0500 disk-utils/mkfs.minix: Set ninodes after checking max ninodes in the superblock needs to be set after inodes is checked against MINIX_MAX_INODES otherwise a value larger than MINIX_MAX_INODES can be attempted to be stored in the superblock. Without this change the command "mkfs.minix -2 -i 65530 " would write a minix superblock with ninodes set to 0. Signed-off-by: Nate Clark disk-utils/mkfs.minix.c | 2 +- tests/expected/minix/mkfs-v2i65535 | 9 +++++++++ tests/ts/minix/mkfs | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) commit 63dc575be3f956b3383d8be248b945b5b8fb2e28 Author: Karel Zak Date: Wed Jan 4 15:44:51 2017 +0100 build-sys: test_linux_version is Linux only Signed-off-by: Karel Zak lib/Makemodule.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e33da967ef86a08087a42477485bcf72dca0acd8 Author: Karel Zak Date: Wed Jan 4 15:42:02 2017 +0100 lib/linux_version: fix code indention Signed-off-by: Karel Zak lib/linux_version.c | 70 ++++++++++++++++++++++++++--------------------------- 1 file changed, 35 insertions(+), 35 deletions(-) commit 912885d012362bfc7c4a43d8e7f85b6f0b2684d1 Merge: e8f7acb 5d79599 Author: Karel Zak Date: Wed Jan 4 12:27:27 2017 +0100 Merge branch 'setterm' of git://github.com/kerolasa/lelux-utiliteetit * 'setterm' of git://github.com/kerolasa/lelux-utiliteetit: setterm: add --resize option commit e8f7acb0d34ed0eeb4262dcf6c54208979616b06 Author: Karel Zak Date: Wed Jan 4 11:44:37 2017 +0100 lib: use unique ifdefs for tests Let's use unique TEST_PROGRAM_ ifdefs to make build system more robust. Signed-off-by: Karel Zak lib/Makemodule.am | 22 +++++++++++----------- lib/blkdev.c | 2 +- lib/colors.c | 4 ++-- lib/cpuset.c | 2 +- lib/fileutils.c | 2 +- lib/ismounted.c | 2 +- lib/linux_version.c | 2 +- lib/mangle.c | 4 ++-- lib/pager.c | 4 ++-- lib/procutils.c | 4 ++-- lib/randutils.c | 4 ++-- lib/strutils.c | 4 ++-- lib/sysfs.c | 2 +- lib/timeutils.c | 2 +- lib/ttyutils.c | 4 ++-- 15 files changed, 32 insertions(+), 32 deletions(-) commit b8ef01a8957e8b815672d7360009a4554025ade6 Merge: 5b9403a c43cd8f Author: Karel Zak Date: Tue Jan 3 12:16:43 2017 +0100 Merge branch 'fixes' of https://github.com/rudimeier/util-linux * 'fixes' of https://github.com/rudimeier/util-linux: agetty: fix ifdef typo commit 5b9403a68f5e48312265cdc5d34c703a5cc7bd73 Author: Karel Zak Date: Mon Jan 2 11:36:53 2017 +0100 lib/linux_version: add test for manual testing Signed-off-by: Karel Zak lib/Makemodule.am | 4 ++++ lib/linux_version.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) commit 6b95593d79defd89146af11e248e97a7d22f5d95 Author: Karel Zak Date: Mon Jan 2 11:32:24 2017 +0100 lib/linux_version: fix stupid typo ... introduced by commit d404065a. Sorry. Signed-off-by: Karel Zak lib/linux_version.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5d795999511adc455d223be8281948796bd7d087 Author: Sami Kerola Date: Thu Dec 29 10:28:54 2016 +0000 setterm: add --resize option Reset terminal size by assessing maximum row and column. This is useful when actual geometry and kernel terminal driver are not in sync. Addresses: http://bugs.debian.org/835636 Based-on-work-by: Adam Borowski Signed-off-by: Sami Kerola term-utils/setterm.1 | 7 ++++ term-utils/setterm.c | 112 ++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 118 insertions(+), 1 deletion(-) commit 963f7dfb82d44661d76c6fb61fda309b846726ce Merge: 8d42631 cc01c2d Author: Karel Zak Date: Thu Dec 22 15:27:25 2016 +0100 Merge branch 'getrandom' of git://github.com/kerolasa/lelux-utiliteetit * 'getrandom' of git://github.com/kerolasa/lelux-utiliteetit: lib/randutils: use getrandom(2) when it is available commit 8d42631e31dfba5421ff09976520f10f769b3fea Author: Sami Kerola Date: Sun Dec 18 18:32:41 2016 +0000 fsfreeze: move filesystem support info to manual page Include btrfs, f2fs, and nilfs to list of supported filesystems, with note the list can be incomplete. Signed-off-by: Sami Kerola sys-utils/fsfreeze.8 | 14 ++++++++++++++ sys-utils/fsfreeze.c | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) commit 6690ceed64841dc72aa3f904e9c437f36730b5bc Author: Sami Kerola Date: Sun Dec 18 18:32:40 2016 +0000 fsfreeze: remove unnecessary functions Signed-off-by: Sami Kerola sys-utils/fsfreeze.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) commit eac414038e03971141971e8dfa43471a92ca6d96 Author: Karel Zak Date: Thu Dec 22 11:52:22 2016 +0100 tests: add findmnt output tests Signed-off-by: Karel Zak tests/expected/findmnt/outputs-default | 35 ++++++++++++++++++++++++ tests/expected/findmnt/outputs-force-tree | 35 ++++++++++++++++++++++++ tests/expected/findmnt/outputs-kernel | 35 ++++++++++++++++++++++++ tests/expected/findmnt/outputs-submounts | 17 ++++++++++++ tests/ts/findmnt/outputs | 44 +++++++++++++++++++++++++++++++ 5 files changed, 166 insertions(+) commit c43cd8f513917b4837069b4992f478203cc1a8d4 Author: Ruediger Meier Date: Wed Dec 21 22:39:17 2016 +0100 agetty: fix ifdef typo introduced in 77835be2 Signed-off-by: Ruediger Meier term-utils/agetty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 131af5109f661d2821b82ac03a9e38de0ac31206 Author: Karel Zak Date: Tue Dec 20 16:05:29 2016 +0100 tests: add new findmnt --options tests Signed-off-by: Karel Zak tests/expected/findmnt/filter-options-name | 7 +++++ tests/expected/findmnt/filter-options-nameval | 3 ++ .../expected/findmnt/filter-options-nameval-multi | 3 ++ tests/expected/findmnt/filter-options-nameval-neg | 34 ++++++++++++++++++++++ tests/ts/findmnt/filter | 25 ++++++++++++---- 5 files changed, 67 insertions(+), 5 deletions(-) commit 7d395c75d1b7df677c26ef20628698247e3f216e Author: Karel Zak Date: Tue Dec 20 16:01:22 2016 +0100 libmount: support name=value for mnt_match_options() $ findmnt --options mode=755 TARGET SOURCE FSTYPE OPTIONS /sys/fs/cgroup tmpfs tmpfs rw,nosuid,nodev,noexec,relatime,mode=755 /dev udev devtmpfs rw,relatime,size=1983516k,nr_inodes=495879,mode=755 Signed-off-by: Karel Zak libmount/src/optstr.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) commit db17f201b88903267175be4671efc6b7f71d9b88 Author: Karel Zak Date: Tue Dec 20 15:31:33 2016 +0100 libmount: reimplement mnt_match_options() Let's use optstr.c functions to parse pattern and options strings. It's more robust that the old original mount(8) code and it supports quotes in the options strings. Signed-off-by: Karel Zak libmount/docs/libmount-sections.txt | 2 +- libmount/src/optstr.c | 79 +++++++++++++++++++++++++++++++ libmount/src/utils.c | 92 ------------------------------------- 3 files changed, 80 insertions(+), 93 deletions(-) commit 421cfd356514005bf1e71b0d64c925e971b3a9aa Author: Karel Zak Date: Tue Dec 20 12:14:17 2016 +0100 tests: add findmnt tests Signed-off-by: Karel Zak tests/expected/findmnt/filter-options | 32 +++++++++++++ tests/expected/findmnt/filter-options-neg | 5 ++ tests/expected/findmnt/filter-options-no | 5 ++ tests/expected/findmnt/filter-options-no-multi | 3 ++ tests/expected/findmnt/filter-types | 4 ++ tests/expected/findmnt/filter-types-multi | 5 ++ tests/expected/findmnt/filter-types-neg | 32 +++++++++++++ tests/expected/findmnt/target-non-root | 1 + tests/expected/findmnt/target-root | 3 ++ tests/ts/findmnt/files/mountinfo | 33 +++++++++++++ tests/ts/findmnt/files/mountinfo-nonroot | 32 +++++++++++++ tests/ts/findmnt/filter | 64 ++++++++++++++++++++++++++ tests/ts/findmnt/target | 35 ++++++++++++++ 13 files changed, 254 insertions(+) commit 16e64b6822052c84f9b00e646fefa79989a23787 Author: Igor Gnatenko Date: Mon Dec 19 23:36:48 2016 +0100 libsmartcols: remove dead checks We initialize them before. Signed-off-by: Igor Gnatenko libsmartcols/src/table_print.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 193b3239c147233b6d79c46f3b4dcb699922a10b Author: Karel Zak Date: Mon Dec 19 13:30:56 2016 +0100 lsblk: use errtryhelp() Signed-off-by: Karel Zak misc-utils/lsblk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 677ec86cef983a106c6e5d175f44b125858c3016 Author: Karel Zak Date: Mon Dec 19 13:13:34 2016 +0100 Use --help suggestion on invalid option The current default is to print all usage() output. This is overkill in many case. Addresses: https://github.com/karelzak/util-linux/issues/338 Signed-off-by: Karel Zak Documentation/boilerplate.c | 2 +- disk-utils/addpart.c | 2 +- disk-utils/cfdisk.c | 2 ++ disk-utils/delpart.c | 2 +- disk-utils/fdformat.c | 2 +- disk-utils/fdisk.c | 2 +- disk-utils/fsck.cramfs.c | 2 +- disk-utils/fsck.minix.c | 2 +- disk-utils/isosize.c | 2 +- disk-utils/mkfs.bfs.c | 2 +- disk-utils/mkfs.cramfs.c | 2 +- disk-utils/mkfs.minix.c | 2 +- disk-utils/mkswap.c | 2 +- disk-utils/partx.c | 3 +-- disk-utils/raw.c | 2 +- disk-utils/resizepart.c | 2 +- disk-utils/sfdisk.c | 2 +- disk-utils/swaplabel.c | 3 +-- include/c.h | 6 ++++++ login-utils/chfn.c | 2 +- login-utils/chsh.c | 2 +- login-utils/last.c | 3 +-- login-utils/lslogins.c | 2 +- login-utils/newgrp.c | 2 +- login-utils/nologin.c | 3 +-- login-utils/su-common.c | 2 +- login-utils/utmpdump.c | 2 +- misc-utils/blkid.c | 6 +++--- misc-utils/cal.c | 3 +-- misc-utils/findmnt.c | 3 +-- misc-utils/logger.c | 3 +-- misc-utils/look.c | 3 +-- misc-utils/lslocks.c | 3 +-- misc-utils/mcookie.c | 2 +- misc-utils/namei.c | 2 +- misc-utils/rename.c | 2 +- misc-utils/test_uuidd.c | 4 ++-- misc-utils/uuidd.c | 2 +- misc-utils/uuidgen.c | 2 +- misc-utils/wipefs.c | 3 +-- schedutils/chrt.c | 7 ++----- schedutils/ionice.c | 2 +- schedutils/taskset.c | 3 +-- sys-utils/blkdiscard.c | 3 +-- sys-utils/chcpu.c | 2 +- sys-utils/chmem.c | 2 ++ sys-utils/ctrlaltdel.c | 2 +- sys-utils/dmesg.c | 3 +-- sys-utils/eject.c | 3 +-- sys-utils/fallocate.c | 3 +-- sys-utils/flock.c | 8 +++----- sys-utils/fsfreeze.c | 3 +-- sys-utils/fstrim.c | 2 +- sys-utils/hwclock.c | 4 ++-- sys-utils/ipcmk.c | 3 +-- sys-utils/ipcrm.c | 4 ++-- sys-utils/ipcs.c | 2 +- sys-utils/ldattach.c | 3 +-- sys-utils/losetup.c | 2 +- sys-utils/lscpu.c | 2 +- sys-utils/lsmem.c | 2 +- sys-utils/lsns.c | 3 +-- sys-utils/mount.c | 3 +-- sys-utils/mountpoint.c | 3 +-- sys-utils/nsenter.c | 2 +- sys-utils/pivot_root.c | 2 +- sys-utils/prlimit.c | 3 +-- sys-utils/readprofile.c | 2 +- sys-utils/setarch.c | 2 +- sys-utils/setpriv.c | 4 +--- sys-utils/setsid.c | 2 +- sys-utils/swapoff.c | 3 +-- sys-utils/swapon.c | 3 +-- sys-utils/tunelp.c | 2 +- sys-utils/umount.c | 3 +-- sys-utils/unshare.c | 2 +- sys-utils/wdctl.c | 4 +--- sys-utils/zramctl.c | 2 +- term-utils/mesg.c | 2 +- term-utils/script.c | 2 +- term-utils/scriptreplay.c | 4 ++-- term-utils/setterm.c | 2 +- term-utils/wall.c | 2 +- term-utils/write.c | 2 +- text-utils/col.c | 2 +- text-utils/colcrt.c | 2 +- text-utils/colrm.c | 2 +- text-utils/column.c | 2 +- text-utils/hexdump.c | 2 +- text-utils/line.c | 2 +- text-utils/rev.c | 2 +- text-utils/tailf.c | 2 +- text-utils/ul.c | 2 +- 93 files changed, 109 insertions(+), 133 deletions(-) commit 3077b37101c0c7b89368eafb043adc95eb8db45c Author: Karel Zak Date: Mon Dec 19 11:33:40 2016 +0100 include/c.h: add errtryhelp() Add code to print: Try ' --help' for more information. and exit. Signed-off-by: Karel Zak include/c.h | 9 +++++++++ 1 file changed, 9 insertions(+) commit d673b74e9d8f484f361ab7c1e8c7e527d7d1753d Author: Sébastien Helleu Date: Sat Dec 17 09:06:57 2016 +0100 docs: replace FTP by HTTPS in kernel.org URLs The links to ftp://ftp.kernel.org/ are replaced by https://www.kernel.org/. Signed-off-by: Karel Zak Documentation/howto-man-page.txt | 2 +- Documentation/releases/v2.13-ReleaseNotes | 2 +- Documentation/releases/v2.14-ReleaseNotes | 10 +-- Documentation/releases/v2.15-ReleaseNotes | 10 +-- Documentation/releases/v2.16-ReleaseNotes | 6 +- Documentation/releases/v2.17-ReleaseNotes | 10 +-- Documentation/releases/v2.18-ReleaseNotes | 10 +-- Documentation/releases/v2.19-ReleaseNotes | 2 +- Documentation/releases/v2.20-ReleaseNotes | 6 +- Documentation/releases/v2.21-ReleaseNotes | 6 +- Documentation/releases/v2.22-ReleaseNotes | 10 +-- Documentation/releases/v2.23-ReleaseNotes | 10 +-- Documentation/releases/v2.24-ReleaseNotes | 10 +-- Documentation/releases/v2.25-ReleaseNotes | 10 +-- Documentation/releases/v2.26-ReleaseNotes | 10 +-- Documentation/releases/v2.27-ReleaseNotes | 10 +-- Documentation/releases/v2.28-ReleaseNotes | 4 +- Documentation/releases/v2.29-ReleaseNotes | 8 +-- NEWS | 110 +++++++++++++++--------------- README | 2 +- disk-utils/addpart.8 | 2 +- disk-utils/blockdev.8 | 2 +- disk-utils/cfdisk.8 | 2 +- disk-utils/delpart.8 | 2 +- disk-utils/fdformat.8 | 2 +- disk-utils/fdisk.8 | 2 +- disk-utils/fsck.8 | 2 +- disk-utils/fsck.cramfs.8 | 2 +- disk-utils/fsck.minix.8 | 2 +- disk-utils/isosize.8 | 2 +- disk-utils/mkfs.8 | 2 +- disk-utils/mkfs.bfs.8 | 2 +- disk-utils/mkfs.cramfs.8 | 2 +- disk-utils/mkfs.minix.8 | 2 +- disk-utils/mkswap.8 | 2 +- disk-utils/partx.8 | 2 +- disk-utils/raw.8 | 2 +- disk-utils/resizepart.8 | 2 +- disk-utils/sfdisk.8 | 2 +- disk-utils/swaplabel.8 | 2 +- lib/terminal-colors.d.5 | 2 +- libblkid/docs/libblkid-docs.xml | 2 +- libblkid/libblkid.3 | 2 +- libfdisk/docs/libfdisk-docs.xml | 2 +- libmount/docs/libmount-docs.xml | 2 +- libsmartcols/docs/libsmartcols-docs.xml | 2 +- libuuid/man/uuid.3 | 2 +- libuuid/man/uuid_clear.3 | 2 +- libuuid/man/uuid_compare.3 | 2 +- libuuid/man/uuid_copy.3 | 2 +- libuuid/man/uuid_generate.3 | 2 +- libuuid/man/uuid_is_null.3 | 2 +- libuuid/man/uuid_parse.3 | 2 +- libuuid/man/uuid_time.3 | 2 +- libuuid/man/uuid_unparse.3 | 2 +- login-utils/chfn.1 | 2 +- login-utils/chsh.1 | 2 +- login-utils/last.1 | 2 +- login-utils/login.1 | 2 +- login-utils/lslogins.1 | 2 +- login-utils/newgrp.1 | 2 +- login-utils/nologin.8 | 2 +- login-utils/runuser.1 | 2 +- login-utils/su.1 | 2 +- login-utils/sulogin.8 | 2 +- login-utils/utmpdump.1 | 2 +- login-utils/vipw.8 | 2 +- misc-utils/blkid.8 | 2 +- misc-utils/cal.1 | 2 +- misc-utils/findfs.8 | 2 +- misc-utils/findmnt.8 | 2 +- misc-utils/getopt.1 | 2 +- misc-utils/kill.1 | 2 +- misc-utils/logger.1 | 2 +- misc-utils/look.1 | 2 +- misc-utils/lsblk.8 | 2 +- misc-utils/lslocks.8 | 2 +- misc-utils/mcookie.1 | 2 +- misc-utils/namei.1 | 2 +- misc-utils/rename.1 | 2 +- misc-utils/uuidd.8.in | 2 +- misc-utils/uuidgen.1 | 2 +- misc-utils/whereis.1 | 2 +- misc-utils/wipefs.8 | 2 +- schedutils/chrt.1 | 2 +- schedutils/ionice.1 | 2 +- schedutils/taskset.1 | 2 +- sys-utils/blkdiscard.8 | 2 +- sys-utils/chcpu.8 | 2 +- sys-utils/chmem.8 | 2 +- sys-utils/ctrlaltdel.8 | 2 +- sys-utils/dmesg.1 | 2 +- sys-utils/eject.1 | 2 +- sys-utils/fallocate.1 | 2 +- sys-utils/flock.1 | 2 +- sys-utils/fsfreeze.8 | 2 +- sys-utils/fstab.5 | 2 +- sys-utils/fstrim.8 | 2 +- sys-utils/hwclock.8.in | 2 +- sys-utils/ipcmk.1 | 2 +- sys-utils/ipcrm.1 | 2 +- sys-utils/ipcs.1 | 2 +- sys-utils/ldattach.8 | 2 +- sys-utils/losetup.8 | 2 +- sys-utils/lscpu.1 | 2 +- sys-utils/lsipc.1 | 2 +- sys-utils/lsmem.1 | 2 +- sys-utils/lsns.8 | 2 +- sys-utils/mount.8 | 2 +- sys-utils/mountpoint.1 | 2 +- sys-utils/nsenter.1 | 2 +- sys-utils/pivot_root.8 | 2 +- sys-utils/prlimit.1 | 2 +- sys-utils/readprofile.8 | 2 +- sys-utils/renice.1 | 2 +- sys-utils/rtcwake.8.in | 2 +- sys-utils/setarch.8 | 2 +- sys-utils/setpriv.1 | 2 +- sys-utils/setsid.1 | 2 +- sys-utils/swapon.8 | 2 +- sys-utils/switch_root.8 | 2 +- sys-utils/tunelp.8 | 2 +- sys-utils/umount.8 | 2 +- sys-utils/unshare.1 | 2 +- sys-utils/wdctl.8 | 2 +- sys-utils/zramctl.8 | 2 +- term-utils/agetty.8 | 2 +- term-utils/mesg.1 | 2 +- term-utils/reset.1 | 2 +- term-utils/script.1 | 2 +- term-utils/scriptreplay.1 | 2 +- term-utils/setterm.1 | 2 +- term-utils/wall.1 | 2 +- term-utils/write.1 | 2 +- text-utils/col.1 | 2 +- text-utils/colcrt.1 | 2 +- text-utils/colrm.1 | 2 +- text-utils/column.1 | 2 +- text-utils/hexdump.1 | 2 +- text-utils/line.1 | 2 +- text-utils/more.1 | 2 +- text-utils/pg.1 | 2 +- text-utils/rev.1 | 2 +- text-utils/tailf.1 | 2 +- text-utils/ul.1 | 2 +- util-linux.doap | 2 +- 146 files changed, 250 insertions(+), 250 deletions(-) commit 80c31a0b596125b387c6b27c899e8bad4e46680b Author: Karel Zak Date: Fri Dec 16 12:46:45 2016 +0100 findmnt: error on --target /non-exist The original --target implementation (< v2.27) has been based on stat(), so it was usable for valid paths only. The new implementation is based on search in the mountinfo file, so it works for arbitrary crazy path. This is not backwardly compatible and if the path does not exist then it still returns at least root directory mount entry. This patch forces mnt_table_find_mountpoint() to check if the path is valid before we search in the mountinfo file. Signed-off-by: Karel Zak libmount/src/tab.c | 4 ++++ 1 file changed, 4 insertions(+) commit 0ed2a954714992938b35893b70197090a61b3b2e Author: Karel Zak Date: Thu Dec 15 14:40:26 2016 +0100 more: avoid double free() on exit On 'q' command more(1) calls end_it() function with _exit(). The _exit() may suspend program execution due to pending I/O on very loaded server. In this time SIGINT may be delivered due to impatient user who will press ^C. And then end_it() cleanup function may be executed by signal handler too. The result is double free()... Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1403971 Signed-off-by: Karel Zak text-utils/more.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 06e204889f38fa9c231b9744f2ed7f9c8cbfbb7b Author: Karel Zak Date: Tue Dec 13 15:00:51 2016 +0100 tests: add missing file Signed-off-by: Karel Zak tests/expected/libmount/context-X-mount.mkdir | 1 + 1 file changed, 1 insertion(+) commit 974cc006f122f36e2187cedb9d3e58dc2d24814c Author: Karel Zak Date: Tue Dec 13 14:44:33 2016 +0100 nsenter: add --all option Let's make it easy for users to enter target process namespaces. Addresses: https://github.com/karelzak/util-linux/issues/382 Signed-off-by: Karel Zak sys-utils/nsenter.1 | 12 ++++++++++++ sys-utils/nsenter.c | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 65 insertions(+), 1 deletion(-) commit 862326451184bb0fe9c2b2b110fcfc986f9b1734 Author: Karel Zak Date: Tue Dec 13 12:41:18 2016 +0100 build-sys: cleanup UL_NCURSES_CHECK * use SUFFIX for upper-case suffix * use AC_CHECK_TOOL() to search for ncurses-config (thanks to Mike Frysinger) * separate checks by AS_IF() Signed-off-by: Karel Zak m4/ul.m4 | 54 +++++++++++++++++++++++++++++++++--------------------- 1 file changed, 33 insertions(+), 21 deletions(-) commit 8fdd483c5331671b3ab31a1a240aeb1e2c2840c6 Author: Karel Zak Date: Tue Dec 13 12:11:18 2016 +0100 fdisk: don't be silent when list non-existing device Addresses: https://github.com/karelzak/util-linux/issues/376 Signed-off-by: Karel Zak disk-utils/fdisk.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 3f7429fd2d539c7f948f72bd829404b55ac19d9f Author: Karel Zak Date: Mon Dec 12 15:23:53 2016 +0100 build-sys: prefer pkg-config for ncurses and use ncurses{5,6}-config as fallback only. Signed-off-by: Karel Zak m4/ul.m4 | 48 ++++++++++++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 20 deletions(-) commit cc01c2dca4f62e36505570d5cb15f868aa44bf54 Author: Sami Kerola Date: Sun Dec 11 11:43:37 2016 +0000 lib/randutils: use getrandom(2) when it is available System call getrandom(2) is relatively new, available since kernel 3.17 but not supported by glibc 2.24. That in mind autotools is made to check availability of this function and keep old code as fallback. It is reasonable assume it will take years before the syscall(2) and fallback are unproblematic to remove. One might ask why bother using getrandom(2). Main reason is to avoid unnecessary system calls to achieve exactly same end result. That demonstrated with 'strace -c ./mcookie' showing 36 calls before, and 32 after this change. Secondly the getrandom(2) function got to kernel with promise it can be used to avoid file descriptor run down, and since uuidd uses random_get_bytes() it should fulfill it's promise here. Reference: http://man7.org/linux/man-pages/man2/getrandom.2.html Reference: https://lwn.net/Articles/606141/ Reviewed-by: Karel Zak Signed-off-by: Sami Kerola configure.ac | 1 + lib/randutils.c | 69 ++++++++++++++++++++++++++++++++++++++++++++------------- 2 files changed, 54 insertions(+), 16 deletions(-) commit 8048a826cc182831efb3a718d86ff3efa39c832c Merge: 0a14cc8 38f75eb Author: Karel Zak Date: Fri Dec 9 15:37:09 2016 +0100 Merge branch 'build-fixes' of https://github.com/rudimeier/util-linux * 'build-fixes' of https://github.com/rudimeier/util-linux: build-sys: don't clean *.img files commit 0a14cc8bcc151e03c8979ed1ff4a3bee9672365b Author: Karel Zak Date: Fri Dec 9 15:11:31 2016 +0100 libmount: revert X-* and x-* meaning Let's hope this is last change necessary to cleanup x-* usage: x-* persistent option, stored in utab, available for umount, etc. X-* fstab comment only mount(8) supports x-mount.mkdir= as well as newly recommended X-mount.mkdir= Advantages: * less invasive * does not require exception for x-systemd * does not require rename x-initrd to X-initrd The systemd and dracut users will get the new (=fixed) functionality without a change in fstab configuration. This is the primary goal. Disadvantages: * not 100% compatible libmount behavior, x-* options have not been previously stored in utab. The API is the same, options will be still available, but on x-* libmount will write to /run/mount/utab. For now it seems only systemd uses x-*, and they like this behavior, so... Addresses: https://github.com/systemd/systemd/pull/4515 Signed-off-by: Karel Zak configure.ac | 1 - libmount/src/context.c | 11 ++++++++--- libmount/src/libmount.h.in | 2 +- libmount/src/optmap.c | 11 ++--------- sys-utils/mount.8 | 30 ++++++++++++++++-------------- tests/ts/libmount/context | 19 ++++++++++++++++--- 6 files changed, 43 insertions(+), 31 deletions(-) commit 38f75ebe1eea78850d66089d4287d91774ced57a Author: Ruediger Meier Date: Wed Dec 7 20:39:02 2016 +0100 build-sys: don't clean *.img files Don't know why this was added in d78df0ac but it can't be right that libmount/python removes these files in the toplevel builddir. Moreover I've never seen such *.img files appearing during build at all. Signed-off-by: Ruediger Meier libmount/python/Makemodule.am | 2 -- 1 file changed, 2 deletions(-) commit 08595712f3b6c96944987b82ec85e295dc924850 Merge: 2acd68e c0cf01b Author: Karel Zak Date: Fri Dec 9 13:48:34 2016 +0100 Merge branch doc_fixes Rebase from http://git.kernel.org/pub/scm/linux/kernel/git/mtk/util-linux.git doc_fixes docs: renice(1): Add credentials(7) to SEE ALSO docs: renice(1): Add SEE ALSO entry for sched(7) docs: mount(8): Wording fix docs: ionice(1): SEE ALSO: add ioprio_set(2) docs: lsns(8): SEE ALSO: add namespaces(7) docs: last(1): Eliminate oddball formatting docs: last(1): SEE ALSO: add reference to wtmp(5) docs: taskset(1): Wording fix docs: namei(1): SEE ALSO: add symlink(7) docs: kill(1): Wording fix docs: various pages: Use 'UID" and "GID", not "uid" and "gid" in man pages docs: various pages: Use "PID" not "pid" in man-pages docs: various pages: Use "ID" not "id" in man pages docs: various pages: Use consistent terminology (set-user-ID and set-group-ID) docs: various pages: Format pathnames as italic (.I) commit c0cf01b5e8b5476f49abc127dcd1d69922368956 Author: Michael Kerrisk Date: Mon Dec 5 07:49:42 2016 +0100 docs: renice(1): Add credentials(7) to SEE ALSO credentials(7) explains concepts such as "process group". Signed-off-by: Michael Kerrisk sys-utils/renice.1 | 1 + 1 file changed, 1 insertion(+) commit 248874b1ac3891adddcc5983ad149106ca406953 Author: Michael Kerrisk Date: Mon Dec 5 07:28:09 2016 +0100 docs: renice(1): Add SEE ALSO entry for sched(7) The sched(7) page as of the most recent release contains detailed information on the 'nice' value, including a discussion of autogrouping, which has surprising interactions with the process nice value. Signed-off-by: sys-utils/renice.1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f3af8329bad7f935b7035316f0516d7ff5a68d48 Author: Michael Kerrisk Date: Sun Dec 4 21:00:34 2016 +0100 docs: mount(8): Wording fix The correct word here is "practice"; "manner" would not be well understood by most English speakers. Signed-off-by: Michael Kerrisk sys-utils/mount.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 82b3c4c29198d9802a5f4fc4c283eedaf73b282e Author: Michael Kerrisk Date: Sat Dec 3 20:39:35 2016 +0100 docs: ionice(1): SEE ALSO: add ioprio_set(2) ioprio_set(2) is the system call that underlies this command. Signed-off-by: Michael Kerrisk schedutils/ionice.1 | 2 ++ 1 file changed, 2 insertions(+) commit d628c0d7a0fcb500657fa657300eb4823534ad8b Author: Michael Kerrisk Date: Sat Dec 3 20:38:52 2016 +0100 docs: lsns(8): SEE ALSO: add namespaces(7) Signed-off-by: Michael Kerrisk sys-utils/lsns.8 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit fd17733fcb7a04474c8a25d6a6e43313ed2174ae Author: Michael Kerrisk Date: Sun Dec 4 20:23:54 2016 +0100 docs: last(1): Eliminate oddball formatting \s-2...\s0 is unused anywhere else. Remove it. Signed-off-by: Michael Kerrisk login-utils/last.1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 22a1c10ba1b4356fa46267ef6336a9a309867f94 Author: Michael Kerrisk Date: Sat Dec 3 20:37:10 2016 +0100 docs: last(1): SEE ALSO: add reference to wtmp(5) Signed-off-by: Michael Kerrisk login-utils/last.1 | 1 + 1 file changed, 1 insertion(+) commit cef04ac8da8dbe5b51e1819f5701decb8da718e7 Author: Michael Kerrisk Date: Mon Dec 5 12:39:22 2016 +0100 docs: taskset(1): Wording fix Signed-off-by: Michael Kerrisk schedutils/taskset.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9a1f476c7c554f0208c1134b3563a1a22dbbbf30 Author: Michael Kerrisk Date: Mon Dec 5 12:36:50 2016 +0100 docs: namei(1): SEE ALSO: add symlink(7) Signed-off-by: Michael Kerrisk misc-utils/namei.1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8419465d2dbb65877cad68cd43b8038d17cf277a Author: Michael Kerrisk Date: Wed Dec 7 14:04:17 2016 +0100 docs: kill(1): Wording fix Fix a wording error introduced in one of my recent commits. Signed-off-by: Michael Kerrisk misc-utils/kill.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a72fa61a7781a576cbb24673dacf23fb8306471b Author: Michael Kerrisk Date: Sun Dec 4 20:51:32 2016 +0100 docs: various pages: Use 'UID" and "GID", not "uid" and "gid" in man pages Signed-off-by: Michael Kerrisk misc-utils/kill.1 | 2 +- sys-utils/mount.8 | 16 ++++++++-------- sys-utils/setpriv.1 | 4 ++-- term-utils/wall.1 | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) commit 2085ba6cf682225ccf3d9850255a1bb56dabf443 Author: Michael Kerrisk Date: Sun Dec 4 20:44:04 2016 +0100 docs: various pages: Use "PID" not "pid" in man-pages Signed-off-by: Michael Kerrisk misc-utils/kill.1 | 12 ++++++------ sys-utils/unshare.1 | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) commit 9184323a59077431fc350a410fcc8e0ca74dd04b Author: Michael Kerrisk Date: Sun Dec 4 20:40:01 2016 +0100 docs: various pages: Use "ID" not "id" in man pages The correct abbreviation of identifier is is "ID" (as used in many pages), not "id" (as used in a few pages). Signed-off-by: Michael Kerrisk misc-utils/kill.1 | 2 +- sys-utils/mount.8 | 4 ++-- sys-utils/prlimit.1 | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit aedd46f66ed5462c0e0193faa977a6dfef4fd0de Author: Michael Kerrisk Date: Sun Dec 4 20:34:54 2016 +0100 docs: various pages: Use consistent terminology (set-user-ID and set-group-ID) Use consistent terminology for set-user-ID and set-group-ID bits. There's much inconsistency in the pages. "suid", "set-user-identifier", "setuid". Stick with one terminology, "set-user-ID" and set-grout-ID, as suggested in man-pages(7). Signed-off-by: login-utils/runuser.1 | 2 +- login-utils/su.1 | 3 ++- sys-utils/mount.8 | 10 +++++----- sys-utils/readprofile.8 | 2 +- sys-utils/setpriv.1 | 6 ++++-- term-utils/wall.1 | 3 ++- 6 files changed, 15 insertions(+), 11 deletions(-) commit 46f057ed37e06d74df3e2d4471cab935f9671edf Author: Michael Kerrisk Date: Sat Dec 3 21:13:59 2016 +0100 docs: various pages: Format pathnames as italic (.I) In the majority of pages, pathnames are formatted as Italic, which is the norm. However, there are several cases where they are formatted as bold. This patch fixes a number of those exceptions. Signed-off-by: Michael Kerrisk disk-utils/cfdisk.8 | 2 +- disk-utils/fsck.8 | 12 ++++++------ lib/terminal-colors.d.5 | 6 +++--- login-utils/chfn.1 | 2 +- login-utils/last.1 | 6 +++--- login-utils/login.1 | 6 +++--- login-utils/sulogin.8 | 2 +- misc-utils/getopt.1 | 4 ++-- misc-utils/lsblk.8 | 2 +- misc-utils/whereis.1 | 6 +++--- sys-utils/fstab.5 | 2 +- sys-utils/mount.8 | 10 ++++++---- sys-utils/readprofile.8 | 12 ++++++------ sys-utils/renice.1 | 2 +- sys-utils/umount.8 | 6 +++--- term-utils/agetty.8 | 10 +++++----- 16 files changed, 46 insertions(+), 44 deletions(-) commit 2acd68e32ae494081440704dda820f79b26cd022 Author: Michael Kerrisk Date: Fri Dec 9 13:32:34 2016 +0100 docs: renice(1): Remove obsolete BUGS text Already at least as far back as util-linux 2.2, renice uses getpriority(2) to fetch the process's old nice value. Thus, the "problem" discussed in this BUGS note disappeared long ago. This is trivially demonstrable: $ sleep 100 & [1] 24322 $ renice -n 5 24322 24322 (process ID) old priority 0, new priority 5 $ renice -n 10 24322 24322 (process ID) old priority 5, new priority 10 Rather than trying to explain the ancient problem (20 years old?), just kill this text. Signed-off-by: Michael Kerrisk Signed-off-by: Karel Zak sys-utils/renice.1 | 5 ----- 1 file changed, 5 deletions(-) commit f0742932126a5a8c222776c4a924a02a034f7764 Author: Michael Kerrisk Date: Fri Dec 9 13:25:20 2016 +0100 docs: renice(1): Rework discussion of unprivileged users, The BUGS section describing the limitations on what an unprivileged user may do to the nice value is outdated, given the kernel changes that added RLIMIT_NICE in Linux 2.6.12. So, remove that text. The revised details for modern Linux were partially covered in NOTES, but there were also inaccuracies there (and the use of the word "monotonically" was unneeded). In particular, the point is that unprivileged users can only increase the nice value. There is no restriction particular to the range 0..+19. So, for example, the following scenario is possible: 1. Superuser sets the nice value of an unprivileged user's process to -20. 2. The unprivileged user can now renice that process to (say) -10. Signed-off-by: Michael Kerrisk Signed-off-by: Karel Zak sys-utils/renice.1 | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit f4e61504a457395018c02bafcf17d1e3f8644b78 Author: Karel Zak Date: Fri Dec 9 09:47:33 2016 +0100 hwclock: don't check for permissions The right place to verify user permissions is kernel. The current situation is too strict (due to previous attempts to use hwclock as suid that has never been supported). Signed-off-by: Karel Zak sys-utils/hwclock.c | 5 ----- 1 file changed, 5 deletions(-) commit 63d41c0ac0e8c77a74e216a2cbfae86c4cef8138 Author: Karel Zak Date: Thu Dec 8 16:09:15 2016 +0100 wall: remove unnecessary include Signed-off-by: Karel Zak term-utils/wall.c | 1 - 1 file changed, 1 deletion(-) commit 5c493bd92f1a6858e9cb5c98d667b0aabd945b28 Author: Karel Zak Date: Thu Dec 8 14:29:44 2016 +0100 libmount: use x-systemd options as X-* The previous patch introduces X-* options namespace for options that have to be maintained in user space. Unfortunately, systemd users already use mount options that are necessary by umount or another operations. The conclusion from discussion with systemd guys is to store all the systemd options in userspace. It seems better to add one line exception to libmount than force all fstab users to rename x-systemd to X-systemd. Addresses: https://github.com/systemd/systemd/pull/3904 Signed-off-by: Karel Zak configure.ac | 1 + libmount/src/optmap.c | 7 +++++++ sys-utils/mount.8 | 4 ++++ 3 files changed, 12 insertions(+) commit 83601b1af924a666d86ad956d78e222ad222bea2 Author: Karel Zak Date: Thu Dec 8 14:55:02 2016 +0100 libmount: introduce X-* comments x-* are fstab only and not stored in userspace (utab). In some cases it's not optional solution because the option is also necessary for umount or another operations. The X-* is exactly the same as x-*, but stored to utab (or mtab on old systems). It's usually bad idea to store mount options in userspace, but it's better to provide any solution that force users to bypass mount(8) (and friends) and implement 3rd-party incompatible solutions. Signed-off-by: Karel Zak libmount/src/libmount.h.in | 1 + libmount/src/optmap.c | 4 +++- sys-utils/mount.8 | 13 ++++++++++--- 3 files changed, 14 insertions(+), 4 deletions(-) commit 3ebe5477db75f372f2926d3d70599bcdeb7b5a17 Author: Karel Zak Date: Thu Dec 8 14:24:41 2016 +0100 findmnt: add --tree to allow to enable tree output for --mtab The --mtab output is merge from kernel and utab on all modern systems (without classic /etc/mtab). It means we have all necessary information to generate tree output. For the backward compatibility --mtab is the list by default, the new option --tree allows to override the default and enable tree always when the table contains child-parent relations. Signed-off-by: Karel Zak bash-completion/findmnt | 1 + misc-utils/findmnt.8 | 6 +++++- misc-utils/findmnt.c | 15 +++++++++++++-- 3 files changed, 19 insertions(+), 3 deletions(-) commit de22cb2b12709126ddea855989391f4bfe2f6a20 Author: Karel Zak Date: Thu Dec 8 14:11:02 2016 +0100 findmnt: add note about mount options Signed-off-by: Karel Zak misc-utils/findmnt.8 | 6 ++++-- misc-utils/findmnt.c | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) commit 1c4b2d43926e2a7032310cd18b411d8d872cb4ed Author: Andreas Henriksson Date: Mon Nov 28 17:24:50 2016 +0100 sulogin: bail out from getpasswd(...) on timeout If timeout happens while waiting in prompt, bail out instead of retrying. Reported-by: Bjørn Mork Addresses: http://bugs.debian.org/846107 Signed-off-by: Andreas Henriksson login-utils/sulogin.c | 4 ++++ 1 file changed, 4 insertions(+) commit 60dea9d187caa700e42f37c7955116f71be912d5 Author: Andreas Henriksson Date: Mon Nov 28 17:24:49 2016 +0100 sulogin: make getpasswd(...) return NULL on ^D This makes the caller bail out early instead of evaluating the input as a password. Reported-by: Bjørn Mork Addresses: http://bugs.debian.org/846112 Signed-off-by: Andreas Henriksson login-utils/sulogin.c | 1 + 1 file changed, 1 insertion(+) commit 809869ca8c3d5d548adac9648dbcea2f641a878b Author: Ruediger Meier Date: Mon Dec 5 14:24:55 2016 +0100 build-sys: disable tailf by default It's deprecated since 3f8478a7, so we shouldn't build it by default. Signed-off-by: Ruediger Meier configure.ac | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 77835be2737305c395b0aa18728464b075673555 Author: Ruediger Meier Date: Thu Dec 1 09:57:51 2016 +0100 agetty: re-add utmp.h for Debian GNU/kFreeBSD It's needed there to get login_tty(). On normal FreeBSD we would need libutil.h. Signed-off-by: Ruediger Meier configure.ac | 2 ++ term-utils/agetty.c | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) commit 85d846b88a1ca34a252d14130c6541a82f68ad83 Author: Ruediger Meier Date: Thu Dec 1 09:57:50 2016 +0100 travis: let OSX auto-skip utmpx tools It will disable all these programs automatically except wall(1) which is now non-Linux compatible. Signed-off-by: Ruediger Meier .travis-functions.sh | 8 -------- 1 file changed, 8 deletions(-) commit 227ebea75ca12214b59a58b7477c5cb3e34c3f13 Author: Ruediger Meier Date: Thu Dec 1 09:52:12 2016 +0100 build-sys: check for POSIX utmpx usage We simply check for utmpxname and updwtmpx functions to disable all programs which are not POSIX utmpx compatible, even though last(1) and utmpdump(1) does not use them, see below. utmpx.h is used in: login agetty write lslogins last runuser su utmpdump wall Non-Posix utmpx usage: utmpxname -> login agetty write lslogins updwtmpx -> login agetty runuser su _PATH_.TMP -> login agetty write lslogins last runuser su utmpx.ut_addr_v6 -> login last utmpdump POSIX utmpx usage: wall Signed-off-by: Ruediger Meier configure.ac | 9 +++++++++ 1 file changed, 9 insertions(+) commit b4b919fe5e1fc1d346fa6315748d0e0709d02096 Author: Ruediger Meier Date: Thu Dec 1 09:52:11 2016 +0100 login-utils: switch to utmpx.h Now the build will fail on many non-Linux systems because utmpx.h is available everywhere but we still use non-POSIX features. We'll fix this next commit. Signed-off-by: Ruediger Meier configure.ac | 22 +++++++++++----------- login-utils/last.c | 32 +++++++++++++++++--------------- login-utils/login.c | 30 +++++++++++++++--------------- login-utils/lslogins.c | 26 +++++++++++++------------- login-utils/su-common.c | 6 +++--- login-utils/utmpdump.c | 10 +++++----- term-utils/agetty.c | 26 +++++++++++++------------- term-utils/wall.c | 8 ++++---- term-utils/write.c | 22 +++++++++++----------- 9 files changed, 92 insertions(+), 90 deletions(-) commit 81580f79fa4b96b24a7db67815e7ffa7d3e2d42c Author: Ruediger Meier Date: Thu Dec 1 09:52:10 2016 +0100 agetty: remove obsolete HAVE_UPDWTMP fallback Signed-off-by: Ruediger Meier configure.ac | 1 - include/pathnames.h | 2 -- term-utils/agetty.c | 21 +-------------------- tests/expected/paths/built-in | 1 - tests/helpers/test_pathnames.c | 1 - 5 files changed, 1 insertion(+), 25 deletions(-) commit 6578ced75c1314b7b49644bd0324194e9849d935 Author: Ruediger Meier Date: Thu Dec 1 09:52:09 2016 +0100 login: re-add lastlog.h header This include was removed in a365953a but we will need it again when we move from utmp.h to utmpx.h. On Linux (glibc, musl) the struct lastlog is defined in utmp.h and lastlog.h just includes utmp.h. Signed-off-by: Ruediger Meier Conflicts: login-utils/login.c Signed-off-by: Ruediger Meier configure.ac | 1 + login-utils/login.c | 3 +++ 2 files changed, 4 insertions(+) commit a924b4004c154d6f75afd9e172e2595194cb60cc Author: Ruediger Meier Date: Thu Dec 1 09:52:08 2016 +0100 login-utils: avoid using the defined utmp sizes. Signed-off-by: Ruediger Meier login-utils/last.c | 18 +++++++++--------- term-utils/write.c | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) commit f718c2fc7f7f144c3a41baabf1ebdbcd3f074e4d Author: Ruediger Meier Date: Thu Dec 1 09:52:07 2016 +0100 utmpdump: code formatting for readability BTW avoid using the defined sizes. Signed-off-by: Ruediger Meier login-utils/utmpdump.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 77f5a945868e9a2bf9fe71bfdbe8bf54a2441699 Author: Ruediger Meier Date: Thu Dec 1 09:52:06 2016 +0100 lslogins: remove useless strlen() strlen() is not smarter than strncpy(). Bytes that follow a null byte are not compared anyway. BTW avoid using the defined sizes. CC: Ondrej Oprala Signed-off-by: Ruediger Meier login-utils/lslogins.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 55771f54096eec064d8284a54a119f0b371cd7fb Author: Ruediger Meier Date: Thu Dec 1 09:52:05 2016 +0100 login-utils: remove _HAVE_UT_TV fallback _HAVE_UT_TV is glibc only. Moreover we want to move to utmpx where timeval is standard. Now utmp/subsecond (1173d0a6) should work on all supported systems. CC: Sami Kerola Signed-off-by: Ruediger Meier login-utils/last.c | 32 +++++++++++++------------------- login-utils/login.c | 19 ------------------- login-utils/su-common.c | 8 -------- login-utils/utmpdump.c | 8 ++------ term-utils/agetty.c | 4 ---- 5 files changed, 15 insertions(+), 56 deletions(-) commit c6ba16c6a45eb3ad7a8b7390416ddb7b5eec3a31 Author: Ruediger Meier Date: Thu Dec 1 09:52:04 2016 +0100 last: include libgen.h for basename(3p) Signed-off-by: Ruediger Meier login-utils/last.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 85c928caede29d8ac380182a34c81cd804cf3b6a Author: Michael Kerrisk Date: Mon Dec 5 10:46:48 2016 +0100 docs: kill(1): Wording fix Signed-off-by: Michael Kerrisk misc-utils/kill.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d9818c9b7983aef785db59f093f724ce275b0a5c Author: Michael Kerrisk Date: Mon Dec 5 10:43:53 2016 +0100 docs: kill(1): Formatting fixes Formatting fixes for constants and structure/field names, as per man-pages(7). Signed-off-by: Michael Kerrisk misc-utils/kill.1 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit f793f8bc91eb39179cd9f010aaf3069ba58742a7 Author: Michael Kerrisk Date: Mon Dec 5 10:38:53 2016 +0100 docs: kill(1): Rework notes on thread groups The points in the NOTES can be expressed more compactly (there is some redundancy in the two existing paragraphs). Also, add a reference to signal(7), since this provides much more detail on the topic. Signed-off-by: Michael Kerrisk misc-utils/kill.1 | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-) commit 3d463c677e773373d2dd59f52d9109b05b36bb08 Author: Michael Kerrisk Date: Mon Dec 5 10:24:54 2016 +0100 docs: kill(1): Add more detail on use of SIGTERM vs SIGKILL It's worth adding a recommendation here to use SIGTERM rather than SIGKILL, and explain why. Signed-off-by: Michael Kerrisk misc-utils/kill.1 | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit b79cc53b43ca7cc3fefbb8dd725c8e3eb811ad09 Author: Michael Kerrisk Date: Sat Dec 3 20:37:51 2016 +0100 docs: kill(1): Fix section reference for sigqueue(3) and add to SEE ALSO Signed-off-by: Michael Kerrisk misc-utils/kill.1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3be5d9772fcc49607cc12e47e3f0666cdb19713d Author: Michael Kerrisk Date: Sun Dec 4 17:44:55 2016 +0100 docs: various pages: Use "system call" not "syscall" A minor wording fix... Signed-off-by: Michael Kerrisk misc-utils/kill.1 | 4 ++-- sys-utils/mount.8 | 7 ++++--- sys-utils/setpriv.1 | 2 +- sys-utils/umount.8 | 2 +- sys-utils/unshare.1 | 2 +- 5 files changed, 9 insertions(+), 8 deletions(-) commit c7adc2f204f19167f781fa2ee739e0ca386fc4f5 Author: Andreas Henriksson Date: Fri Dec 2 15:10:18 2016 +0100 chrt: default to SCHED_RR policy This fixes a regression introduced in: commit 7a4ea5664edba98bff28adec3a9c3cfb5763a495 "chrt: add control struct" Previously (and as documented in the manpage) the default policy was SCHED_RR. Now it's implicitly SCHED_OTHER (0) as the value is not initialized explicitly anymore. Test-command: chrt 90 echo hello Reported-by: Patrick Pelissier Addresses: http://bugs.debian.org/846572 Signed-off-by: Andreas Henriksson schedutils/chrt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 91f20582e7af0d58dcf7544693742ad8caf42478 Author: Karel Zak Date: Mon Dec 5 13:05:34 2016 +0100 docs: nsenter(1): add missing 'see also' for --user Signed-off-by: Karel Zak sys-utils/nsenter.1 | 1 + 1 file changed, 1 insertion(+) commit ff88fc3ba553d14c7b05fb6702e10e1c5c591257 Author: Michael Kerrisk Date: Mon Dec 5 10:55:41 2016 +0100 docs: nsenter(1): Formatting fix Add formatting for 'file' argument used by various options. Signed-off-by: Michael Kerrisk sys-utils/nsenter.1 | 50 ++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 36 insertions(+), 14 deletions(-) commit 4b298f61878daf31857597bf3eac8be1153d4839 Author: Michael Kerrisk Date: Mon Dec 5 10:52:09 2016 +0100 docs: nsenter(1): Describe the 'file' argument used by namespace options Signed-off-by: Michael Kerrisk sys-utils/nsenter.1 | 7 +++++++ 1 file changed, 7 insertions(+) commit e0383e3e88f4d80454bb67b4e8920126c667d258 Author: Karel Zak Date: Fri Dec 2 14:11:20 2016 +0100 wall: check -g GID Based on comments from Sami Kerola. Signed-off-by: Karel Zak bash-completion/wall | 2 +- term-utils/wall.c | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) commit b439065634e693dda385a6e5269e1d9258d6d471 Author: Fabian Frederick Date: Tue Nov 15 19:52:26 2016 +0100 fallocate: add insert range support Based on patch 83cc932d7412 ("fallocate: introduce an option -c to support COLLAPSE_RANGE") This patch includes FALLOC_FL_INSERT_RANGE flag added to Linux kernel v4.1 Thanks to Pádraig Brady for insert range definition Signed-off-by: Fabian Frederick sys-utils/fallocate.1 | 3 +++ sys-utils/fallocate.c | 14 ++++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) commit 01544c52f86166a4a5dc81835027e412580396b2 Author: Jim Patterson Date: Wed Nov 16 12:22:14 2016 -0500 wall: add --group option The wall command on AIX supports a "-g" option to limit the message to a group of users by gid. Add compatibility to the Linux version. Thanks to Sami Kerola for an initial skeleton implementation. [kzak@redhat.com: - rename max to ngroups - add free_group_workspace() - some cosmetic changes] Reference: http://www.ibm.com/support/knowledgecenter/ssw_aix_61/com.ibm.aix.cmds6/wall.htm Signed-off-by: Jim Patterson Signed-off-by: Karel Zak bash-completion/wall | 4 +++ term-utils/wall.1 | 7 +++++ term-utils/wall.c | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 86 insertions(+), 1 deletion(-) commit 3fcbd7978980dc1a29c626b701333e27599e506d Author: OGAWA Hirofumi Date: Wed Nov 23 14:13:34 2016 +0900 lsns: Fix parser for /proc//stat which is including space in comm For example, child process of spamd has 32031 (spamd child) S 32026 32026 32026 0 -1 4210752 338 0 0 0 ... fscanf("%d %*s %c %d*[^\n]") in read_process() can't parse above as we expected, because %s only skips non-whitespace. I.e. it parses like following, 32031 (spamd child) S 32026 32026 32026 0 -1 4210752 338 0 0 0 ... +---+ +----+ + %d %*s %c and returns 2 (pid=32031, state=c). This fixes it by skipping task->comm part manually. Signed-off-by: OGAWA Hirofumi sys-utils/lsns.c | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) commit 12f17a23dfdf51b2cad3dfa48868b385aa19c4af Author: Ruediger Meier Date: Wed Nov 30 15:16:45 2016 +0100 misc: fix typos using codespell # command used was: $ ~/src/codespell/codespell \ -w -D /home/rudi/src/codespell/build/lib/codespell_lib/data/dictionary.txt \ $(git ls-files | grep -v "^po/\|\.xz$\|\.gz$\|\.bz2$\|\.img$\|^Documentation/releases/") BTW some manually grammer fixes: s/uses/used/ s/begin/beginning/ Signed-off-by: Ruediger Meier libsmartcols/src/table.c | 4 ++-- libsmartcols/src/table_print.c | 2 +- misc-utils/cal.c | 2 +- sys-utils/lsmem.1 | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) commit 223939d95b086ee56b780e34d7abf1fe59afbeb2 Author: Ruediger Meier Date: Tue Nov 1 19:40:33 2016 +0100 misc: spelling, always use "cannot" instead of "can not" Just to be consistent ... Signed-off-by: Ruediger Meier disk-utils/fsck.8 | 2 +- lib/plymouth-ctrl.c | 6 +++--- libblkid/src/tag.c | 2 +- libfdisk/src/dos.c | 2 +- login-utils/login.1 | 2 +- login-utils/sulogin-consoles.c | 2 +- login-utils/sulogin.c | 4 ++-- misc-utils/getopt.1 | 2 +- sys-utils/lscpu.c | 4 ++-- term-utils/agetty.8 | 2 +- term-utils/setterm.c | 2 +- 11 files changed, 15 insertions(+), 15 deletions(-) commit a99c0eb09faabc5ef0892ea0e621e4582e1ef05a Author: Karel Zak Date: Wed Nov 30 13:02:01 2016 +0100 tests: update sfdisk output The output of the "New situation:" contains Disklabel type: Disk identifier: lines now. Signed-off-by: Karel Zak tests/expected/libfdisk/gpt-all-defaults | 2 ++ tests/expected/libfdisk/gpt-all-defaults-with-typo | 2 ++ tests/expected/sfdisk/dos-dump-gaps | 2 ++ tests/expected/sfdisk/dos-dump-old | 2 ++ tests/expected/sfdisk/dos-explicit-size | 2 ++ tests/expected/sfdisk/dos-read-dump | 2 ++ tests/expected/sfdisk/dos-read-dump-case | 2 ++ tests/expected/sfdisk/dos-resize | 2 ++ tests/expected/sfdisk/dos-simple-commas | 2 ++ tests/expected/sfdisk/dos-simple-space | 2 ++ tests/expected/sfdisk/gpt-all-defaults | 2 ++ tests/expected/sfdisk/gpt-read-dump | 2 ++ tests/expected/sfdisk/gpt-reorder | 2 ++ tests/expected/sfdisk/gpt-resize | 2 ++ tests/expected/sfdisk/movedata-down | 2 ++ tests/expected/sfdisk/movedata-non-overlay | 2 ++ tests/expected/sfdisk/movedata-up | 2 ++ tests/expected/sfdisk/resize-dos-0-move-up-absolute | 2 ++ tests/expected/sfdisk/resize-dos-1-move-down-absolute | 2 ++ tests/expected/sfdisk/resize-dos-10-down-enlarge | 2 ++ tests/expected/sfdisk/resize-dos-11-absolute-move-resize | 2 ++ tests/expected/sfdisk/resize-dos-12-reduce-midle | 2 ++ tests/expected/sfdisk/resize-dos-13-max-last | 2 ++ tests/expected/sfdisk/resize-dos-2-move-up-relative | 2 ++ tests/expected/sfdisk/resize-dos-3-move-down-relative | 2 ++ tests/expected/sfdisk/resize-dos-4-enlarge-absolute | 2 ++ tests/expected/sfdisk/resize-dos-5-reduce-absolute | 2 ++ tests/expected/sfdisk/resize-dos-6-enlarge-relative | 2 ++ tests/expected/sfdisk/resize-dos-7-reduce-relative | 2 ++ tests/expected/sfdisk/resize-dos-8-enlarge-all | 2 ++ tests/expected/sfdisk/resize-dos-9-up-preduce | 2 ++ tests/expected/sfdisk/resize-gpt-0-move-up-absolute | 2 ++ tests/expected/sfdisk/resize-gpt-1-move-down-absolute | 2 ++ tests/expected/sfdisk/resize-gpt-10-down-enlarge | 2 ++ tests/expected/sfdisk/resize-gpt-11-absolute-move-resize | 2 ++ tests/expected/sfdisk/resize-gpt-12-reduce-midle | 2 ++ tests/expected/sfdisk/resize-gpt-13-max-last | 2 ++ tests/expected/sfdisk/resize-gpt-2-move-up-relative | 2 ++ tests/expected/sfdisk/resize-gpt-3-move-down-relative | 2 ++ tests/expected/sfdisk/resize-gpt-4-enlarge-absolute | 2 ++ tests/expected/sfdisk/resize-gpt-5-reduce-absolute | 2 ++ tests/expected/sfdisk/resize-gpt-6-enlarge-relative | 2 ++ tests/expected/sfdisk/resize-gpt-7-reduce-relative | 2 ++ tests/expected/sfdisk/resize-gpt-8-enlarge-all | 2 ++ tests/expected/sfdisk/resize-gpt-9-up-preduce | 2 ++ tests/expected/sfdisk/script-quotes | 2 ++ tests/expected/sfdisk/script-separator | 2 ++ tests/expected/sfdisk/script-type-and-id | 2 ++ 48 files changed, 96 insertions(+) commit 35ca51182782193f555fbdcb06bb10766550d017 Author: Karel Zak Date: Wed Nov 30 12:43:10 2016 +0100 sfdisk: support empty label use-case By default sfdisk creates partition table when a first partition is specified, otherwise the device is not modified. This force users to create at least one partition. This commit allows to create empty label without partitions if "label: " header line is specified by script. The commit also modifies "New situation:" output to list label name and label identifier. Addresses: https://github.com/karelzak/util-linux/issues/374 Signed-off-by: Karel Zak disk-utils/fdisk-list.c | 23 +++++++++++++++-------- disk-utils/fdisk-list.h | 1 + disk-utils/sfdisk.8 | 18 +++++++++++++++++- disk-utils/sfdisk.c | 17 +++++++++++++++++ libfdisk/src/libfdisk.h.in | 1 + libfdisk/src/libfdisk.sym | 5 +++++ libfdisk/src/script.c | 20 +++++++++++++++++++- 7 files changed, 75 insertions(+), 10 deletions(-) commit c49b765a6e9031642e2bb846e93dddc6827e4b28 Author: Karel Zak Date: Wed Nov 30 10:53:56 2016 +0100 sfdisk: cleanup --dump error messages old: # truncate -s 1G empty && ./sfdisk --dump empty sfdisk: failed to dump partition table: Success new: # truncate -s 1G empty && ./sfdisk --dump empty sfdisk: empty: does not contain a recognized partition table. Addresses: https://github.com/karelzak/util-linux/issues/375 Signed-off-by: Karel Zak disk-utils/sfdisk.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 96ccf9478d5d77b73c3436292b320866a8e2c3c0 Author: Karel Zak Date: Wed Nov 30 10:47:41 2016 +0100 tests: update lsmem tests The commit 4c0e1eaf34fe604118afcd792291419e1d4ff661 modifies the alignment of the STATE column. Signed-off-by: Karel Zak tests/expected/lsmem/lsmem-s390-zvm-6g | 64 +++++++++++++++++----------------- tests/expected/lsmem/lsmem-x86_64-16g | 6 ++-- 2 files changed, 35 insertions(+), 35 deletions(-) commit 1c4284c19b11a8ba44870c8081b40c23a582d5cb Merge: fed3048 a341a5e Author: Karel Zak Date: Tue Nov 29 17:08:23 2016 +0100 Merge branch 'master' of https://github.com/rudimeier/util-linux commit fed304837f60b626f6198663990e76e506f89063 Author: Karel Zak Date: Tue Nov 29 15:58:18 2016 +0100 sfdisk: don't be silent when list non-existing device Addresses: https://github.com/karelzak/util-linux/issues/376 Signed-off-by: Karel Zak disk-utils/sfdisk.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit e1a0fd98cd17088c2cce25f9105fa7ba8342a844 Author: Karel Zak Date: Tue Nov 29 14:25:12 2016 +0100 build-sys: use sed to substitute Travis CI: tools/git-version-gen: 116: tools/git-version-gen: Bad substitution Signed-off-by: Karel Zak tools/git-version-gen | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a341a5e2e439fd035e94da3036068e7cc1153d4a Author: Ruediger Meier Date: Tue Nov 29 12:34:33 2016 +0100 build-sys: cosmetics, avoid useless m4 quotes Signed-off-by: Ruediger Meier configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3f5dfa2978d4e506354a30bb89df23ccde848db1 Author: Ruediger Meier Date: Tue Nov 29 12:24:19 2016 +0100 build-sys: fix bashism, introduced in 85004b14 Signed-off-by: Ruediger Meier tools/git-version-gen | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 85004b142a3a358cfa9630e0d5cafc07af3e4da1 Author: Ruediger Meier Date: Thu Nov 17 03:10:02 2016 +0100 build-sys: fix "remove the g in git describe" The "g" was not always removed and "-rc*" follow-ups were handled incorrectly. So now after last commits we have these versions: git describe -> blkid -V -------------------------------------------------------------- v2.29-rc4 -> 2.29-rc4 (libblkid 2.29.0) v2.29-rc4-3-g4c8928d -> 2.29-rc4-3-4c89 (libblkid 2.29.0) v2.29 -> 2.29 (libblkid 2.29.0) v2.29-78-g4c8928d -> 2.29.78-4c89 (libblkid 2.29.78) v2.29.1 -> 2.29.1 (libblkid 2.29.1) v2.29.1-4-g4c8928d -> 2.29.1.4-4c89 (libblkid 2.29.1) v2.29.1-rc2 -> 2.29.1-rc2 (libblkid 2.29.1) v2.29.1-rc2-3-g4c8928d -> 2.29.1-rc2-3-4c89 (libblkid 2.29.1) Signed-off-by: Ruediger Meier tools/git-version-gen | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 6ac59b5bd556ce3dd8411ddb1c1850c52d438d86 Author: Ruediger Meier Date: Thu Nov 17 03:10:01 2016 +0100 build-sys: remove old git fallback from git-version-gen Just make the script more readable. Nobody is using 10 years old git. Signed-off-by: Ruediger Meier tools/git-version-gen | 21 --------------------- 1 file changed, 21 deletions(-) commit 0f0972ac6bab5856e26d7def29f80c5ce424efbd Author: Ruediger Meier Date: Thu Nov 17 03:10:00 2016 +0100 build-sys: cosmetics PACKAGE_VERSION_MINOR This should changes nothing. Signed-off-by: Ruediger Meier configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b5511797f2421d8600ed3761b964a1ab7f7629cc Author: Ruediger Meier Date: Thu Nov 17 03:09:59 2016 +0100 build-sys: update package release number during development Now we use v2.29-5-g8ffab30 -> 2.29.5-8ffa (libblkid 2.29.5) instead of v2.29-5-g8ffab30 -> 2.29.5-8ffa (libblkid 2.29.0) otherwise the bugfix releases (2.29.1) would look newer that latest HEAD. Signed-off-by: Ruediger Meier configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c42a6d4d340b2f829369eae19ec2d888d33cb433 Author: Ruediger Meier Date: Thu Nov 17 03:09:58 2016 +0100 build-sys: fix empty package release number Was broken for major releases since b0e6b25e: $ blkid -V blkid from util-linux 2.28 (libblkid 2.28., 12-Apr-2016) Now we also set 0 in this case, like: $ blkid -V blkid from util-linux 2.30 (libblkid 2.30.0, 12-Apr-2016) Signed-off-by: Ruediger Meier configure.ac | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 170a8e4ad5c7d95dc4318339990ab8e7ccb22458 Author: Michael Kerrisk (man-pages) Date: Thu Nov 10 12:00:09 2016 +0100 IPC namespaces also isolate POSIX message queues As described in pid_namespaces(7), IPC namespaces also isolate POSIX message queues. Update the unshare(1) and nsenter(1) pages to clarify that. Signed-off-by: Michael Kerrisk sys-utils/nsenter.1 | 3 ++- sys-utils/unshare.1 | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit 894efece9eb8948fd0811a6d8f3de07a082a3604 Author: Michael Kerrisk (man-pages) Date: Thu Nov 10 12:00:05 2016 +0100 Provide better cross references for namespace concepts For each namespace that is discussed, add more explicit references to the corresponding clone(2) flags and add references to relevant section 7 namespace pages. Signed-off-by: Michael Kerrisk sys-utils/nsenter.1 | 59 +++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 44 insertions(+), 15 deletions(-) commit f85b9777c2965671cdf8cc09eccd6e492d0c11e0 Author: Michael Kerrisk (man-pages) Date: Thu Nov 10 12:00:00 2016 +0100 Provide better cross references for namespace concepts For each namespace that is discussed, add more explicit references to the corresponding clone(2) flags and add references to relevant section 7 namespace pages. Signed-off-by: Michael Kerrisk sys-utils/unshare.1 | 57 +++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 47 insertions(+), 10 deletions(-) commit 4a3f07352bafe746a7e0dea263f63873c45e2382 Author: Michael Kerrisk (man-pages) Date: Thu Nov 10 11:59:57 2016 +0100 SEE ALSO: add cross reference to namespaces(7) Rationale: both of these pages are about namespaces. Signed-off-by: Michael Kerrisk sys-utils/nsenter.1 | 3 ++- sys-utils/unshare.1 | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) commit f76c7478a0809803077023f4d9de24bc230541c5 Author: Michael Kerrisk (man-pages) Date: Thu Nov 10 11:59:53 2016 +0100 Replace reference to sigvec(2) with sigaction(2) The sigvec(3) (not sigvec(2)) page documents ancient BSD APIs. The right page to cross reference here is sigaction(2), which documents the modern POSIX APIs. Signed-off-by: Michael Kerrisk misc-utils/kill.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b2cc2a7fc6f453e72b76dadae3500855cc899a4e Author: Michael Kerrisk (man-pages) Date: Thu Nov 10 11:59:49 2016 +0100 Fix formatting errors in page cross references These pages had errors such as .BR page (x) . which should be .BR page (x). Signed-off-by: Michael Kerrisk disk-utils/swaplabel.8 | 2 +- misc-utils/findmnt.8 | 2 +- sys-utils/blkdiscard.8 | 2 +- sys-utils/dmesg.1 | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 154aede1fba0c10ef0cb0bd35d88fa1f6057399b Author: Michael Kerrisk (man-pages) Date: Thu Nov 10 11:59:45 2016 +0100 Fix reference for scheduling discussion Some time back, I moved the discussion of scheduling from sched_setscheduler(2) to a new sched(7) page. Adjust the cross reference in the taskset(1) page accordingly. Signed-off-by: Michael Kerrisk schedutils/taskset.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f00218ffb88dcf3c319d2291c68da064bb190b7b Author: Michael Kerrisk (man-pages) Date: Thu Nov 10 11:59:40 2016 +0100 Fix section number in lockf() page xref lockf() is in section 3, not 2. Signed-off-by: Michael Kerrisk misc-utils/lslocks.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a7bbc2f36c9c9da7f5e6d6e714129e43dfa6f62d Author: Michael Kerrisk (man-pages) Date: Thu Nov 10 11:59:37 2016 +0100 Fix page cross references * Add a section number to page cross reference * Format cross references in bold Signed-off-by: Michael Kerrisk sys-utils/ipcs.1 | 10 +++++----- sys-utils/lsipc.1 | 10 +++++----- sys-utils/tunelp.8 | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) commit 42632a90c1be41c64720b299a6cb4a4b042765a5 Author: Michael Kerrisk (man-pages) Date: Thu Nov 10 11:59:30 2016 +0100 Correctly format page cross references Most pages in util-linux follow the standard convention of formatting page cross references in bold. Fix the few exceptions that use italic. Signed-off-by: Michael Kerrisk login-utils/chfn.1 | 2 +- login-utils/login.1 | 2 +- sys-utils/mount.8 | 2 +- text-utils/pg.1 | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) commit f053ff1e3a30c7ceb10e7e4fb977810f16344453 Author: Michael Kerrisk (man-pages) Date: Thu Nov 10 11:59:27 2016 +0100 Place SEE ALSO entries in order This patch does only the following: * Order SEE ALSO entries first by section name, then alphabetically within section * Adds one or two missing commas in SEE ALSO lists * Removes one or two periods that were (inconsistently) used at the end of SEE ALSO lists. Signed-off-by: Michael Kerrisk disk-utils/cfdisk.8 | 4 ++-- disk-utils/fdformat.8 | 4 ++-- disk-utils/fdisk.8 | 4 ++-- disk-utils/fsck.8 | 6 +++--- disk-utils/fsck.minix.8 | 2 +- disk-utils/mkfs.cramfs.8 | 4 ++-- disk-utils/mkfs.minix.8 | 2 +- disk-utils/swaplabel.8 | 4 ++-- libuuid/man/uuid_generate.3 | 6 +++--- login-utils/last.1 | 4 ++-- login-utils/login.1 | 4 ++-- login-utils/runuser.1 | 8 ++++---- login-utils/su.1 | 6 +++--- login-utils/vipw.8 | 2 +- misc-utils/blkid.8 | 2 +- misc-utils/findmnt.8 | 4 ++-- misc-utils/getopt.1 | 4 ++-- misc-utils/kill.1 | 2 +- misc-utils/logger.1 | 2 +- misc-utils/lsblk.8 | 4 ++-- misc-utils/mcookie.1 | 2 +- schedutils/chrt.1 | 2 +- schedutils/taskset.1 | 4 ++-- sys-utils/dmesg.1 | 2 +- sys-utils/eject.1 | 2 +- sys-utils/fallocate.1 | 4 ++-- sys-utils/fstab.5 | 6 +++--- sys-utils/fstrim.8 | 4 ++-- sys-utils/ipcrm.1 | 2 +- sys-utils/ipcs.1 | 2 +- sys-utils/lsipc.1 | 2 +- sys-utils/lsns.8 | 2 +- sys-utils/mount.8 | 14 +++++++------- sys-utils/nsenter.1 | 4 ++-- sys-utils/pivot_root.8 | 2 +- sys-utils/prlimit.1 | 4 ++-- sys-utils/setpriv.1 | 2 +- sys-utils/swapon.8 | 6 +++--- sys-utils/switch_root.8 | 4 ++-- sys-utils/umount.8 | 4 ++-- sys-utils/unshare.1 | 2 +- term-utils/mesg.1 | 2 +- term-utils/script.1 | 2 +- term-utils/setterm.1 | 6 +++--- text-utils/colcrt.1 | 4 ++-- text-utils/more.1 | 4 ++-- text-utils/tailf.1 | 4 ++-- 47 files changed, 88 insertions(+), 88 deletions(-) commit 4a2ec98bf155f73fc92bdeec20cef43b51788a35 Author: Michael Kerrisk (man-pages) Date: Thu Nov 10 11:59:14 2016 +0100 Fix typo in page cross reference (capabilities(7), not, capability(7)) Signed-off-by: Michael Kerrisk sys-utils/setpriv.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 51a90159dd3ee1121b87a34f6c892315633b8edb Author: Heiko Carstens Date: Fri Nov 4 13:10:06 2016 +0100 lsmem: improve node lookup Break the loop as soon as we found the node a memory block belongs to, it doesn't make sense to continue scanning. Signed-off-by: Heiko Carstens sys-utils/lsmem.c | 1 + 1 file changed, 1 insertion(+) commit 1b0af4ba1719adba196ea897b4c0447148223676 Author: Karel Zak Date: Wed Nov 9 09:58:21 2016 +0100 lsmem: (man page) recommend use --output Signed-off-by: Karel Zak sys-utils/lsmem.1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 4c0e1eaf34fe604118afcd792291419e1d4ff661 Author: Karel Zak Date: Wed Nov 9 09:58:14 2016 +0100 lsmem: align STATE to the right Signed-off-by: Karel Zak sys-utils/lsmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a5c4535b0df9e122025d804b27831dc1d38c73a9 Author: Karel Zak Date: Mon Nov 7 11:43:12 2016 +0100 lsmem: add Copyright Signed-off-by: Karel Zak sys-utils/chmem.c | 3 ++- sys-utils/lsmem.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) commit 6ca268eca7d5300614b9b115ddd0d807c7d633c5 Author: Karel Zak Date: Fri Nov 4 11:32:51 2016 +0100 tests: add x86_64-16g lsmem test Signed-off-by: Karel Zak tests/expected/lsmem/lsmem-x86_64-16g | 271 ++++++++++++++++++++++++++++++++ tests/ts/lsmem/dumps/x86_64-16g.tar.bz2 | Bin 0 -> 8660 bytes tests/ts/lsmem/mk-input.sh | 2 +- 3 files changed, 272 insertions(+), 1 deletion(-) commit 2b68dc7d0dcb84efb5a0c976665569752171d055 Author: Karel Zak Date: Fri Nov 4 11:23:39 2016 +0100 tests: cleanup and update lsmem Signed-off-by: Karel Zak tests/expected/lsmem/lsmem-s390-zvm-6g | 199 ++++++++++++++++++--------------- tests/ts/lsmem/lsmem | 32 +++--- 2 files changed, 126 insertions(+), 105 deletions(-) commit 3845c7302d3fbb452f915703ac628b3466272446 Author: Karel Zak Date: Fri Nov 4 10:55:50 2016 +0100 lsmem: add missing placeholders Signed-off-by: Karel Zak sys-utils/lsmem.c | 4 ++++ 1 file changed, 4 insertions(+) commit d4625442c7f0974b32a81f56c2e96dd71c2be184 Author: Karel Zak Date: Fri Nov 4 10:50:06 2016 +0100 lsmem: cleanup for --summary=only * don't fill scols table * check for collision with raw,pairs and json options Signed-off-by: Karel Zak sys-utils/lsmem.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 4775cc69a7c20a905b368291370530ce329b8203 Author: Karel Zak Date: Fri Nov 4 10:36:25 2016 +0100 lsmem: cleanup man page * add missing new options * remove columns description (for ls-like utils we maintains columns description only in the --help output) Signed-off-by: Karel Zak sys-utils/lsmem.1 | 97 +++++++++++++++++++++++-------------------------------- sys-utils/lsmem.c | 10 +++--- 2 files changed, 45 insertions(+), 62 deletions(-) commit 019ad6c1c2392baf8514dcd23d986fc4ba8f6fcb Author: Karel Zak Date: Thu Nov 3 17:24:18 2016 +0100 lsmem: disable summary for JSONm, raw and export output Signed-off-by: Karel Zak sys-utils/lsmem.c | 3 +++ 1 file changed, 3 insertions(+) commit c5332fbbcd501c1b5bec6b3a2c2418fae029a39c Author: Karel Zak Date: Thu Nov 3 17:20:37 2016 +0100 lsmem: add --summary[=] option Signed-off-by: Karel Zak sys-utils/lsmem.c | 60 ++++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 48 insertions(+), 12 deletions(-) commit 0cf0710aed83e01f8c540f406f48672854b839c9 Author: Karel Zak Date: Thu Nov 3 16:53:53 2016 +0100 lsmem: rename control struct Signed-off-by: Karel Zak sys-utils/lsmem.c | 134 +++++++++++++++++++++++++++--------------------------- 1 file changed, 67 insertions(+), 67 deletions(-) commit 0a1ed6dffb303ce950620558c9509f8f3ce9043e Author: Karel Zak Date: Thu Nov 3 16:47:07 2016 +0100 lsmem: cleanup, use libsmartcols for all output * add --pairs, --raw a --json outputs * add --noheadings to disable header * add --bytes * add --output Signed-off-by: Karel Zak sys-utils/lsmem.c | 401 +++++++++++++++++++++++++++++------------------------- 1 file changed, 213 insertions(+), 188 deletions(-) commit bdfe4601c337ab6352f486c1ac27ba79866362c3 Author: Karel Zak Date: Thu Nov 3 13:09:19 2016 +0100 build-sys: mark lsmem and chmem as Linux only Signed-off-by: Karel Zak configure.ac | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 2ae9a58e0dc9041eabe1217da226a1ced70f73f1 Author: Heiko Carstens Date: Wed Oct 12 14:00:47 2016 +0200 lsmem: add testcase Add a single s390 specific test case to verify that the contents of various output formats do not change in incompatible way if the lsmem code is changed. This is based on a patch from Clemens von Mann. Signed-off-by: Heiko Carstens tests/commands.sh | 1 + tests/expected/lsmem/lsmem-s390-zvm-6g | 91 +++++++++++++++++++++++++++++++ tests/ts/lsmem/dumps/s390-zvm-6g.tar.bz2 | Bin 0 -> 2459 bytes tests/ts/lsmem/lsmem | 52 ++++++++++++++++++ tests/ts/lsmem/mk-input.sh | 22 ++++++++ 5 files changed, 166 insertions(+) commit 30e1ea8ba1984488fdb16506ebafe4dc23280e5a Author: Heiko Carstens Date: Wed Oct 12 14:00:46 2016 +0200 chmem: new tool Move the s390 specific chmem tool to util-linux. The chmem tool was originally written in perl and is part of the s390-tools package which can be found here: https://www.ibm.com/developerworks/linux/linux390/s390-tools.html Given that the tool is architecture independent, there is no reason to keep it in an s390 specific repository. It seems to be useful for other architectures as well. This patch converts the tool to C and adds it to util-linux, while the command line options stay compatible. The only exception is the option "-v" which used to be the short form of "--version". That got changed to "-V" so it behaves like most other tools contained within util-linux. The chmem tool can be used to set memory online or offline. This can be achieved by specifying a memory range: Memory Block 19 (0x0000000130000000-0x000000013fffffff) disabled or by specifying a size where chmem will automatically select memory blocks: Memory Block 21 (0x0000000150000000-0x000000015fffffff) disable failed Memory Block 18 (0x0000000120000000-0x000000012fffffff) disabled Memory Block 17 (0x0000000110000000-0x000000011fffffff) disabled Memory Block 16 (0x0000000100000000-0x000000010fffffff) disabled Memory Block 15 (0x00000000f0000000-0x00000000ffffffff) disabled or by specifying memory block numbers instead of address ranges: Memory Block 15 (0x00000000f0000000-0x00000000ffffffff) disabled Memory Block 16 (0x0000000100000000-0x000000010fffffff) disabled Memory Block 17 (0x0000000110000000-0x000000011fffffff) disabled Memory Block 18 (0x0000000120000000-0x000000012fffffff) disabled This is based on a patch from Clemens von Mann. Signed-off-by: Heiko Carstens .gitignore | 1 + configure.ac | 7 ++ sys-utils/Makemodule.am | 7 ++ sys-utils/chmem.8 | 95 ++++++++++++++ sys-utils/chmem.c | 325 ++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 435 insertions(+) commit cad2d1ac9291112bd9199b36a12335f6770356f3 Author: Heiko Carstens Date: Wed Oct 12 14:00:45 2016 +0200 lsmem: new tool Move the s390 specific lsmem tool to util-linux. The lsmem tool was originally written in perl and is part of the s390-tools package which can be found here: https://www.ibm.com/developerworks/linux/linux390/s390-tools.html Given that the tool is architecture independent, there is no reason to keep it in an s390 specific repository. It seems to be useful for other architectures as well. This patch converts the tool to C and adds it to util-linux, while the command line options stay compatible. The only exception is the option "-v" which used to be the short form of "--version". That got changed to "-V" so it behaves like most other tools contained within util-linux. The lsmem tool inspect the contents of /sys/devices/system/memory and prints a summary output similar to what lscpu does: RANGE SIZE STATE REMOVABLE BLOCK 0x0000000000000000-0x000000005fffffff 1,5G online yes 0-5 0x0000000060000000-0x000000007fffffff 512M online no 6-7 0x0000000080000000-0x000000013fffffff 3G online yes 8-19 0x0000000140000000-0x000000014fffffff 256M offline - 20 0x0000000150000000-0x000000017fffffff 768M online no 21-23 Memory block size : 256M Total online memory : 5,8G Total offline memory: 256M In order to keep the output small the tool merges subsequent address ranges where the attributes are identical. To avoid merging of line the "-a" option can be used. The lsmem tool also has "--extendend" and "--parsable" option which can be used to customize the output, e.g. limit the output to specified columns. This is quite similar to what the lscpu tool does. This is based on a patch from Clemens von Mann. Signed-off-by: Heiko Carstens .gitignore | 1 + configure.ac | 7 + sys-utils/Makemodule.am | 8 + sys-utils/lsmem.1 | 95 ++++++++++ sys-utils/lsmem.c | 494 ++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 605 insertions(+) commit 54394eab03d57ff7d4ffbd333c1955112bc70c5d Author: Heiko Carstens Date: Wed Oct 12 14:00:44 2016 +0200 lib,strutils: add strtoux[16|32|64]_or_err functions Add helper functions which allow to parse hexadecimal numbers. Based on a patch from Clemens von Mann. Signed-off-by: Heiko Carstens include/strutils.h | 3 +++ lib/strutils.c | 44 ++++++++++++++++++++++++++++++++++++++------ 2 files changed, 41 insertions(+), 6 deletions(-)