Changes between v2.26.2 and v2.27-rc1 -------------------------------------------- commit 55ebd014b099738df7d1bbee74f094406f399e92 Author: Karel Zak Date: Fri Jul 31 12:08:18 2015 +0200 build-sys: release++ (v2.27-rc1) Signed-off-by: Karel Zak NEWS | 4 ++++ configure.ac | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) commit 5eb470aa7fdfe4d49bee4284b009534ab2e8e972 Author: Karel Zak Date: Fri Jul 31 12:06:38 2015 +0200 docs: add v2.27-ReleaseNotes Signed-off-by: Karel Zak Documentation/releases/v2.27-ReleaseNotes | 634 ++++++++++++++++++++++++++++++ 1 file changed, 634 insertions(+) commit c37b3314c7e02642b2b65daffa758aea7a87a5fb Author: Karel Zak Date: Fri Jul 31 11:02:35 2015 +0200 docs: update AUTHORS file Signed-off-by: Karel Zak AUTHORS | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) commit d3cac66d6641cf488357ec9a858cc06be2ec6996 Author: Karel Zak Date: Fri Jul 31 10:56:34 2015 +0200 po: merge changes Signed-off-by: Karel Zak po/ca.po | 6148 ++++++++++++++++++++++++++++++---------------------- po/cs.po | 6235 ++++++++++++++++++++++++++++++---------------------- po/da.po | 6060 ++++++++++++++++++++++++++++++--------------------- po/de.po | 6046 ++++++++++++++++++++++++++++++--------------------- po/es.po | 6248 ++++++++++++++++++++++++++++++---------------------- po/et.po | 6071 +++++++++++++++++++++++++++++---------------------- po/eu.po | 6065 +++++++++++++++++++++++++++++---------------------- po/fi.po | 6131 +++++++++++++++++++++++++++++---------------------- po/fr.po | 6227 ++++++++++++++++++++++++++++++---------------------- po/gl.po | 6029 +++++++++++++++++++++++++++++---------------------- po/hr.po | 5720 +++++++++++++++++++++++++++--------------------- po/hu.po | 6109 +++++++++++++++++++++++++++++---------------------- po/id.po | 6124 +++++++++++++++++++++++++++++---------------------- po/it.po | 6163 ++++++++++++++++++++++++++++++---------------------- po/ja.po | 6184 ++++++++++++++++++++++++++++++---------------------- po/nl.po | 6227 ++++++++++++++++++++++++++++++---------------------- po/pl.po | 6062 ++++++++++++++++++++++++++++++--------------------- po/pt_BR.po | 6209 ++++++++++++++++++++++++++++++---------------------- po/ru.po | 6133 ++++++++++++++++++++++++++++++---------------------- po/sl.po | 6163 ++++++++++++++++++++++++++++++---------------------- po/sv.po | 6171 ++++++++++++++++++++++++++++++---------------------- po/tr.po | 6159 ++++++++++++++++++++++++++++++---------------------- po/uk.po | 6252 +++++++++++++++++++++++++++++++---------------------- po/util-linux.pot | 5552 ++++++++++++++++++++++++++--------------------- po/vi.po | 6206 ++++++++++++++++++++++++++++++---------------------- po/zh_CN.po | 6193 ++++++++++++++++++++++++++++++---------------------- po/zh_TW.po | 6159 ++++++++++++++++++++++++++++++---------------------- 27 files changed, 95644 insertions(+), 69402 deletions(-) commit c49ff158aa21a16b94cf19bc8527cfdd67963082 Author: Milan Broz Date: Thu Jul 30 16:18:28 2015 +0200 lsblk: Display mountpoint even for top-level device If a filesystem is mounted on top-level block device with existing partitions, the mountpoint is not displayed in the lsblk output. This situation can happen by a configuration mistake and lsblk could be used to detect such a mistake. This patch allows searching for a mountpoint for all displayed devices, not only for leaf nodes. (It should be pretty cheap operation, mtab is parsed only once.) For example: lsblk /dev/loop1 NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT loop1 7:1 0 128M 0 loop /mnt/tst └─loop1p1 259:0 0 127M 0 loop Signed-off-by: Milan Broz misc-utils/lsblk.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 901f85fe546572a35bba5cb79479ce549377179f Author: Karel Zak Date: Thu Jul 30 13:22:35 2015 +0200 sfdisk: don't print extra linebreaks on --quiet Signed-off-by: Karel Zak disk-utils/fdisk-list.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit df15fb3d053716d03055df755911d66814054b4b Author: Karel Zak Date: Thu Jul 30 12:55:56 2015 +0200 libfdisk: allow to change partition type for extended partitions Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1248115 Signed-off-by: Karel Zak libfdisk/src/dos.c | 61 +++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 51 insertions(+), 10 deletions(-) commit 35d8592cd405f16e459fd6f2d2327e1b0b16b2fa Author: Karel Zak Date: Thu Jul 30 11:49:15 2015 +0200 hexdump: fix man page (-x vs. default output) Reported-by: Reuti Signed-off-by: Karel Zak po/da.po | 821 ++++++++++++++++++++++++++------------------------- po/fr.po | 821 ++++++++++++++++++++++++++------------------------- text-utils/hexdump.1 | 7 +- 3 files changed, 835 insertions(+), 814 deletions(-) commit e87a6ee0f54c858a828a1ff4f9e03fd46ee9d76b Author: Sami Kerola Date: Wed Jun 24 09:15:19 2015 +0100 docs: make fsck.minix(8) more pretty Use real table to device list, add missing new paragraph markers, remove braces that cause reader to wonder if test is meant or not, squeeze error code list, move references to bottom of the manual, and use mail or web address macro when possible. Signed-off-by: Sami Kerola disk-utils/fsck.minix.8 | 130 +++++++++++++++++++++++++++++------------------- 1 file changed, 80 insertions(+), 50 deletions(-) commit 158b8d691897f5a52ad82bdbab4b44e1cc42338d Author: Sami Kerola Date: Wed Jun 24 09:15:18 2015 +0100 fsck.minix: introduce long options to the command Signed-off-by: Sami Kerola bash-completion/fsck.minix | 12 ++-- disk-utils/fsck.minix.8 | 29 +++++---- disk-utils/fsck.minix.c | 150 ++++++++++++++++++++++----------------------- 3 files changed, 96 insertions(+), 95 deletions(-) commit 86a9f3dad58addb50eca9daa9d233827a005dad7 Author: Sami Kerola Date: Wed Jun 24 09:15:17 2015 +0100 fsck.minix: add minix v3 support Relates-to: a2657ae3ffb56616ac9c921886bcca8ef242499f Signed-off-by: Sami Kerola disk-utils/fsck.minix.c | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) commit e1df9d4cd6ff82cb3d07b6dcf9b9a7d3e05a6968 Author: Sami Kerola Date: Wed Jun 24 09:15:16 2015 +0100 fsck.minix: rename device file descriptor variable Signed-off-by: Sami Kerola disk-utils/fsck.minix.c | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) commit ed7f9c5d9694d29df32a2766e5a3fd79aec83332 Author: Sami Kerola Date: Wed Jun 24 09:15:15 2015 +0100 mkfs.minix: refactor root block content creation This does not belong to main() function. Signed-off-by: Sami Kerola disk-utils/mkfs.minix.c | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) commit a232cfdc0a3d40239e0f0a3bbfda0a9a92c880b6 Author: Sami Kerola Date: Wed Jun 24 09:15:14 2015 +0100 mkfs.minix: check requested blocks will not exceed available on device Earlier user could define more blocks than device, or backing file for loopback file system, had available. That lead to a system crash with following commands; fallocate --length 64KiB test-file mkfs.minix -3 -i 842160 test-file 104882174 mkdir test-file.d mount test-file test-file.d cp /etc/service test-file.d Killed sudo umount test-file.d The minix driver should probably not hang the whole kernel, but the least that mkfs.minix ought to do is not to let users to get that condition quite as easily. Signed-off-by: Sami Kerola disk-utils/mkfs.minix.c | 64 ++++++++++++++++++++++++++----------------------- 1 file changed, 34 insertions(+), 30 deletions(-) commit 2159dbf365e47d7db9961c1aec95549be75c5759 Author: Sami Kerola Date: Wed Jun 24 09:15:13 2015 +0100 mkfs.minix: check user input carefully File name lenght and version input needs to be checked against each other, which will determine what version of file system is in question. Signed-off-by: Sami Kerola disk-utils/mkfs.minix.8 | 9 +++--- disk-utils/mkfs.minix.c | 79 +++++++++++++++++++++++++++++++++---------------- 2 files changed, 57 insertions(+), 31 deletions(-) commit 77799d7c38eea621b52cefb2141ed4bf3e3fba11 Author: Sami Kerola Date: Wed Jun 24 09:15:12 2015 +0100 mkfs.minix: add fs_control structure, and remove most global variables This allows better code structure in future. Signed-off-by: Sami Kerola disk-utils/mkfs.minix.c | 380 ++++++++++++++++++++++++------------------------ 1 file changed, 190 insertions(+), 190 deletions(-) commit 3bb74a3ada4f3afcad2e33db238e12c592e0d400 Author: Sami Kerola Date: Wed Jun 24 09:15:11 2015 +0100 mkfs.minix: remove unuseful code Checks about inodes vs block sizes does not add much robustness. Both values are derived at compilation time from struct minix_inode size, and they form full definition circle. Bad block check for none-block devices should not be supressed, user requested it so let him have it. Check for st_rdev == 0x0300 || st_rdev == 0x0340 was unreachable. Signed-off-by: Sami Kerola disk-utils/mkfs.minix.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit c99128bcf5eb183f70c717d67a3c259af82b910b Author: Sami Kerola Date: Wed Jun 24 09:15:10 2015 +0100 mkfs.minix: use is_mounted() from libcommon Signed-off-by: Sami Kerola disk-utils/mkfs.minix.c | 27 ++++----------------------- 1 file changed, 4 insertions(+), 23 deletions(-) commit b59c5925cea2094325f256828e97dc5c20364b9f Author: Sami Kerola Date: Wed Jun 24 09:15:09 2015 +0100 mkfs.minix: introduce long options to the command Signed-off-by: Sami Kerola bash-completion/mkfs.minix | 16 +++---- disk-utils/mkfs.minix.8 | 28 +++++++----- disk-utils/mkfs.minix.c | 107 +++++++++++++++++++++++---------------------- 3 files changed, 78 insertions(+), 73 deletions(-) commit da41ff553a5cde7caa1b36f3e64e77ff6e8da33d Author: Joshua Hudson Date: Wed Jun 24 09:15:08 2015 +0100 mkfs.minix: increase maximum minix v2 and v3 file system sizes mkfs.minix misbehaves when attempting to create a large v2 or v3 filesystem. I finally traced it down to attempting to create too many inodes so that the first zone is past 65535 blocks in. This obviously doesn't work as the on-disk superblock says this is a 16 bit integer. I wrote a patch that catches this, clamps to the absolute v2/v3 limit (like it already does for v1), and sets the blocks per inode to a more reasonable ratio when exceeding half a gigabyte. Having a half-gig filesystem with most files being smaller than 3k isn't really reasonable. I suppose if you don't want to adjust inode sizes automatically you could take that part out, and it will just crab sooner. Given the non-attention in the code, I suspect nobody ever had cause to try such a big minix filesystem. Well I have my reasons involving some deeply embedded work where ext2 would place too much strain on the hardware. Reviewed-by: Sami Kerola Signed-off-by: Joshua Hudson disk-utils/mkfs.minix.c | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) commit 6b9784b442aea0b1c454d80bfabb17d0d5eee111 Author: Karel Zak Date: Thu Jul 30 09:28:19 2015 +0200 libmount: make mnt_get_filesystems() more robust [clang analyze] The mnt_free_filesystems() relies on NULL as the last item in the filesystems array. It's necessary to keep NULL there after failed strdup() too, because we call mnt_free_filesystems() to deallocate after error. Signed-off-by: Karel Zak libmount/src/utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d8461c4e4d8046fb8bd1da8c57383854159d48d1 Author: Karel Zak Date: Thu Jul 30 09:18:33 2015 +0200 lsipc: cleanup {user,group}name usage Signed-off-by: Karel Zak sys-utils/lsipc.c | 53 +++++++++++++++++++++++++++-------------------------- 1 file changed, 27 insertions(+), 26 deletions(-) commit dd8dac1914e7e51c0855c57c8f515608c0c8179f Author: Karel Zak Date: Wed Jul 29 14:59:56 2015 +0200 mcookie: fix -f usage [clang analyze] Signed-off-by: Karel Zak misc-utils/mcookie.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit fdd68e25b5d7193bd93653afde60e1ebc07768ca Author: Karel Zak Date: Wed Jul 29 14:44:27 2015 +0200 libsmartcols: make child-parent reference more robust [clang analyze] Signed-off-by: Karel Zak libsmartcols/src/line.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit a172badb03c22d3ad1b00ff16f458b071063db18 Author: Karel Zak Date: Wed Jul 29 14:15:14 2015 +0200 hwclock: make static analyzes more happy Signed-off-by: Karel Zak sys-utils/hwclock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 129fe4f31b234c8acb4e9eeb2e09fcc11ffab2b7 Author: Karel Zak Date: Wed Jul 29 14:04:17 2015 +0200 libfdisk: result of operation is garbage or undefined [clang analyze] Signed-off-by: Karel Zak libfdisk/src/script.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 30ca5e70ceb7a0eb5ea04f30bcfee40c54fb671b Author: Karel Zak Date: Wed Jul 29 14:01:40 2015 +0200 libfdisk: undefined or garbage value returned to caller [clang analyze] Signed-off-by: Karel Zak libfdisk/src/partition.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4df892812b7098aae0551d1ae7b1eb20a07b73ab Author: Karel Zak Date: Wed Jul 29 13:59:19 2015 +0200 fdisk: value is never read [clang analyze] Signed-off-by: Karel Zak disk-utils/fdisk-menu.c | 1 - 1 file changed, 1 deletion(-) commit e5161deefbf73f3c37637f943918c2a77efbe2b2 Author: Karel Zak Date: Wed Jul 29 13:57:28 2015 +0200 fdisk: value is never read [clang analyze] Signed-off-by: Karel Zak disk-utils/fdisk-menu.c | 1 - 1 file changed, 1 deletion(-) commit 9380fbefa617212c1f4ee8941e14f763ee24d919 Author: Karel Zak Date: Wed Jul 29 13:54:54 2015 +0200 lsipc: value is never read [clang analyze] Signed-off-by: Karel Zak sys-utils/lsipc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit f45f5c83f9438889b3fa5107ffb7702e99ccca96 Author: Karel Zak Date: Wed Jul 29 13:51:05 2015 +0200 fdisk: value is never read [clang analyze] Signed-off-by: Karel Zak disk-utils/fdisk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9bf0b518208e2dc8eb46e00fe2d3c37222a93e1c Author: David Prévot Date: Wed Jul 29 13:42:01 2015 +0200 po: update fr.po (from translationproject.org) po/fr.po | 827 +++++++++++++++++++++++++++++++-------------------------------- 1 file changed, 408 insertions(+), 419 deletions(-) commit 5d1756fb4fa9f5aa918f63feabd4553e46f204c5 Author: Joe Hansen Date: Wed Jul 29 13:42:01 2015 +0200 po: update da.po (from translationproject.org) po/da.po | 998 +++++++++++++++++++++++++++++++++------------------------------ 1 file changed, 530 insertions(+), 468 deletions(-) commit ca155f53c35dd6770156c89355c28b38920452ae Author: Karel Zak Date: Wed Jul 29 12:58:06 2015 +0200 unshare: remove duplicate [make checkincludes] Signed-off-by: Karel Zak sys-utils/unshare.c | 2 -- 1 file changed, 2 deletions(-) commit f686b9980aa3a24e34e4c5e0a610f98ea2c86fdc Author: Karel Zak Date: Wed Jul 29 12:57:22 2015 +0200 lslogins: remove duplicate [make checkincludes] Signed-off-by: Karel Zak login-utils/lslogins.c | 1 - 1 file changed, 1 deletion(-) commit 462a5703406bb29dff8909a3f33fd1584d8238ef Author: Karel Zak Date: Wed Jul 29 12:43:45 2015 +0200 libmount: sort pseudo filesystems by LC_COLLATE=C Addresses: https://github.com/karelzak/util-linux/issues/212 Signed-off-by: Karel Zak libmount/src/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fa9ccce2d4ea7ba7c2a14be2db77a6906cc07437 Author: Karel Zak Date: Wed Jul 29 10:41:50 2015 +0200 tasts: add logger octet counting test Signed-off-by: Karel Zak tests/expected/logger/formats-octet_counting | 2 ++ tests/ts/logger/formats | 4 ++++ 2 files changed, 6 insertions(+) commit b6b67955ef31ff4f26a05c2de8bf1679a20d64ba Author: Alex Bligh Date: Wed Jul 15 19:01:48 2015 +0100 logger: Add support to logger for RFC6587 octet counting This patch adds support to logger for RFC6587 octet counting. RFC6587 provides support for two sorts of framing: 1. Octet counting (at RFC6587 s3.4.1) In essence each frame is preceded by a decimal length and a space. 2. Non-transparent framing (at RFC6587 s3.4.2), also called 'octet stuffing' In essence each frame is terminated by a `\n` Prior to this patch, logger used option 2 (non-transparent framing) on TCP, and used no framing on UDP. After this patch, the default behaviour is unchanged, but if the '--octet-count' option is supplied, option 1 is used for both TCP and UDP. Arguably octet count framing makes little sense on UDP, but some servers provide it and this allows testing of those servers. Signed-off-by: Alex Bligh misc-utils/logger.1 | 5 +++++ misc-utils/logger.c | 24 +++++++++++++++++------- 2 files changed, 22 insertions(+), 7 deletions(-) commit 8abdb91211895355b4f8ae9422f03927cacf5ef9 Author: Karel Zak Date: Tue Jul 28 15:54:07 2015 +0200 sfdisk: add --list-free Signed-off-by: Karel Zak bash-completion/sfdisk | 1 + disk-utils/sfdisk.8 | 3 +++ disk-utils/sfdisk.c | 34 +++++++++++++++++++++++++++++++++- 3 files changed, 37 insertions(+), 1 deletion(-) commit 0efd951c8000b349112fbf7ea17e55c2c5e0c1ab Author: Karel Zak Date: Tue Jul 28 15:53:42 2015 +0200 fdisk: add 'F' command to list free unpartitioned space Signed-off-by: Karel Zak disk-utils/fdisk-list.c | 122 ++++++++++++++++++++++++++++++++++++++++++++++++ disk-utils/fdisk-list.h | 4 ++ disk-utils/fdisk-menu.c | 4 ++ 3 files changed, 130 insertions(+) commit 8eb0ce370261c6f5e26b53691fe005345d0b7990 Merge: 5860c45 bd84241 Author: Karel Zak Date: Tue Jul 28 12:15:56 2015 +0200 Merge branch 'test-fixes' of https://github.com/rudimeier/util-linux commit bd84241de3f20afef5446ab3f3bbb0245a520faa Author: Ruediger Meier Date: Sat Jul 4 11:51:06 2015 +0200 Revert "tests: start script/race test only when --force specified" This reverts commit 8ba3f35e07f736a0165669ac787b016b4311eb29. This test is not too slow anymore and BTW since last script refactoring it does work now even on slow/heavy-loaded systems. Signed-off-by: Ruediger Meier tests/ts/script/race | 3 --- 1 file changed, 3 deletions(-) commit 5860c45eed4e60fc2c8cbf5231feaa35c2447c17 Author: Karel Zak Date: Tue Jul 28 10:36:29 2015 +0200 script: improve SIG{TERM,QUIT,KILL} sensitivity Signed-off-by: Karel Zak term-utils/script.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) commit 1b2e9dd01d31e84ba628c2e731c68a1a59ea0355 Author: Karel Zak Date: Mon Jul 27 15:49:14 2015 +0200 cfdisk: don't print obsolete CHS addresses Signed-off-by: Karel Zak disk-utils/cfdisk.c | 10 ---------- 1 file changed, 10 deletions(-) commit ed99eac0e2a83a315c7cf5d8a461df16b3106596 Author: Karel Zak Date: Mon Jul 27 15:29:37 2015 +0200 cfdisk: make sure that output fits to terminal width Reported-by: Benno Schulenberg Signed-off-by: Karel Zak disk-utils/cfdisk.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit 5627fcec0e3944f431f98eb411fc1ea5a559fd3c Author: Karel Zak Date: Mon Jul 27 14:29:38 2015 +0200 libsmartcols: reduce relative columns more aggressively Signed-off-by: Karel Zak libsmartcols/src/table_print.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 053939a45ad89ac1e2bbd79a0c8b4aab17da8229 Author: Karel Zak Date: Mon Jul 27 13:33:09 2015 +0200 fdisk: init libsmartcols debug Signed-off-by: Karel Zak disk-utils/fdisk.c | 1 + disk-utils/sfdisk.c | 2 ++ 2 files changed, 3 insertions(+) commit 6e07b904e7417efe1bf35dd81df585d3cba88569 Author: Karel Zak Date: Mon Jul 27 12:35:53 2015 +0200 cfdisk: remove extra line between menu and info line Reported-by: Benno Schulenberg Signed-off-by: Karel Zak disk-utils/cfdisk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d48fc38307125fe94f2df4ece048571d9c4713ac Author: Benno Schulenberg Date: Sat Jul 25 17:18:15 2015 +0200 cfdisk: spell "label" in lower case To be less shouty. It is not an abbreviation like "UUID". Signed-off-by: Benno Schulenberg disk-utils/cfdisk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 80351b1f4aafde2fc892f1eb333a6879a4607e44 Author: Benno Schulenberg Date: Sat Jul 25 17:18:14 2015 +0200 cfdisk: allow an uppercase X to toggle the extra info To make true the help text line that says that all commands can be entered with either upper or lower case. Signed-off-by: Benno Schulenberg disk-utils/cfdisk.c | 1 + 1 file changed, 1 insertion(+) commit 328eb4455b1dc8de16223702b5771a928cbcf86d Author: Karel Zak Date: Mon Jul 27 11:49:29 2015 +0200 build-sys: add --disable-cal Signed-off-by: Karel Zak configure.ac | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit f9ffaac0d20a3c3204637c61e7c4dcc4ce7f22fe Author: Karel Zak Date: Fri Jul 24 14:33:25 2015 +0200 build-sys: fix test_colors build Signed-off-by: Karel Zak lib/Makemodule.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a5f3263967a47483c2e2dea6395a597bdb696971 Author: Karel Zak Date: Fri Jul 24 13:15:04 2015 +0200 tests: update build-sys tests Signed-off-by: Karel Zak tests/expected/build-sys/config-all | 45 ++++++++++---------- tests/expected/build-sys/config-all-non-nls | 45 ++++++++++---------- tests/expected/build-sys/config-audit | 45 ++++++++++---------- tests/expected/build-sys/config-chfnsh-libuser | 47 ++++++++++----------- tests/expected/build-sys/config-chfnsh-no-password | 47 ++++++++++----------- tests/expected/build-sys/config-chfnsh-pam | 47 ++++++++++----------- tests/expected/build-sys/config-core | 45 ++++++++++---------- tests/expected/build-sys/config-devel | 47 ++++++++++----------- tests/expected/build-sys/config-devel-non-docs | 47 ++++++++++----------- tests/expected/build-sys/config-non-libblkid | 17 ++++---- tests/expected/build-sys/config-non-libmount | 17 ++++---- tests/expected/build-sys/config-non-libs | 12 +++--- tests/expected/build-sys/config-non-libsmartcols | 28 ++++++------- tests/expected/build-sys/config-non-libuuid | 39 +++++++++--------- tests/expected/build-sys/config-non-nls | 45 ++++++++++---------- tests/expected/build-sys/config-selinux | 47 ++++++++++----------- tests/expected/build-sys/config-slang | 45 ++++++++++---------- tests/expected/build-sys/config-static | 48 +++++++++++----------- 18 files changed, 364 insertions(+), 349 deletions(-) commit 0bef6f759beb87d743c6dfb2a95d3e0b7075a462 Author: Karel Zak Date: Fri Jul 24 12:57:46 2015 +0200 libsmartcols: don't link with tinfo Let's move color names to sequence translation to separate file to make it usable without all the stuff in lib/colors.c. Signed-off-by: Karel Zak include/Makemodule.am | 1 + include/color-names.h | 40 ++++++++++++++++++++++++++++++++ include/colors.h | 33 +-------------------------- lib/Makemodule.am | 3 ++- lib/color-names.c | 52 ++++++++++++++++++++++++++++++++++++++++++ lib/colors.c | 35 ---------------------------- libsmartcols/src/Makemodule.am | 3 +-- libsmartcols/src/smartcolsP.h | 2 +- 8 files changed, 98 insertions(+), 71 deletions(-) commit 5404421866bf46ce3505929f5e4ba7f3165dd0b1 Author: Karel Zak Date: Fri Jul 24 12:21:42 2015 +0200 tests: add udevadm settle Signed-off-by: Karel Zak tests/ts/sfdisk/resize | 2 ++ 1 file changed, 2 insertions(+) commit 8c14a7434c2692a2750e276b9aff152f19740362 Author: Karel Zak Date: Fri Jul 24 11:18:11 2015 +0200 libfdisk: add comment to the header file Signed-off-by: Karel Zak libfdisk/src/libfdisk.h.in | 62 +++++++++++++++++++++++----------------------- 1 file changed, 31 insertions(+), 31 deletions(-) commit 2916afa3f510182987f88c17bade5dffb4aaf0b8 Author: Karel Zak Date: Thu Jul 23 11:09:49 2015 +0200 lsipc: make --id usable with all output formats and with -o This patch allows to use things like: # lsipc -m --id 47611910 -o COMMAND,SIZE,KEY --json or # lsipc -m --id 47611910 -o SIZE --bytes --noheadings --raw to get just one value for the resource. Signed-off-by: Karel Zak sys-utils/lsipc.1 | 11 +++++------ sys-utils/lsipc.c | 28 ++++++++++++++++++---------- 2 files changed, 23 insertions(+), 16 deletions(-) commit 8f405a5bed6c78080c6a54e389edcb11471d1794 Author: Karel Zak Date: Thu Jul 23 10:36:02 2015 +0200 lsipc: the default --global is mutually exclusive with -c --id and -t Signed-off-by: Karel Zak sys-utils/lsipc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 2a7150ac2e57418f471cca0aae259b7bcd0b90db Author: Karel Zak Date: Thu Jul 23 10:28:32 2015 +0200 lsipc: remove --print0 and -colon-separate These options have been originally designed for lslogins for compatibility another passwd-like tools. It does not make sense for IPC. Signed-off-by: Karel Zak sys-utils/lsipc.c | 36 ++++++++---------------------------- 1 file changed, 8 insertions(+), 28 deletions(-) commit cdedcbe603c1589360e7f286407ca8f91a1e0461 Author: Karel Zak Date: Thu Jul 23 10:20:06 2015 +0200 lsipc: remove duplicate "Usage:" Signed-off-by: Karel Zak sys-utils/lsipc.c | 1 - 1 file changed, 1 deletion(-) commit cbcafba2bbfad34efff3c4e0b80038f1dd6646b3 Author: Karel Zak Date: Wed Jul 22 14:28:33 2015 +0200 cfdisk: make sure that extra info is refreshed/removed For example when you move from a Partition to the FreeSapce then we need to remove old extra info and draw nothing. Signed-off-by: Karel Zak disk-utils/cfdisk.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit a2d0dbb4333a70510a7c9f68b118fd32f80ef0f3 Author: Karel Zak Date: Wed Jul 22 14:11:27 2015 +0200 cfdisk: properly toggle extra info window, make it more robust Signed-off-by: Karel Zak disk-utils/cfdisk.c | 40 +++++++++++++++++++++++++++++++--------- 1 file changed, 31 insertions(+), 9 deletions(-) commit 65607d4bc750329d282a9889ad5cf1e04fb9d6f5 Author: Karel Zak Date: Mon Jul 20 12:08:47 2015 +0200 lsipc: tiny change about --global to the man page Signed-off-by: Karel Zak sys-utils/lsipc.1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 79f4c272cf7628e50f562885578061f841c220cd Author: Karel Zak Date: Mon Jul 20 12:05:32 2015 +0200 ipcmk: support {K,M,G,...} Signed-off-by: Karel Zak sys-utils/ipcmk.1 | 2 ++ sys-utils/ipcmk.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) commit 25456d5da3dac2f563c8d7e44dab0bb4143426d9 Author: Karel Zak Date: Mon Jul 20 11:56:44 2015 +0200 lsipc: default to --global Signed-off-by: Karel Zak sys-utils/lsipc.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit 1a3110716948a40f12c1fb44ada279e1384c2be6 Author: Karel Zak Date: Wed Jul 1 14:16:50 2015 +0200 lsipc: add USE% to --global Signed-off-by: Karel Zak sys-utils/lsipc.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 624de257a6c1a2255975be764f611c84a4c9b779 Author: Karel Zak Date: Wed Jul 1 13:55:20 2015 +0200 lsipc: use sub-table for semphore elements Signed-off-by: Karel Zak sys-utils/lsipc.c | 91 ++++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 73 insertions(+), 18 deletions(-) commit 5de8fcfd3611c53eb74eca3f9f1162a529a2bed0 Author: Karel Zak Date: Wed Jul 1 12:27:48 2015 +0200 lsipc: improve JSON output Signed-off-by: Karel Zak sys-utils/lsipc.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) commit d7500c6a6b746add429ac10d6bba1aa0d4806a4d Author: Karel Zak Date: Wed Jul 1 12:19:11 2015 +0200 lsipc: move outmode to coltrol struct Signed-off-by: Karel Zak sys-utils/lsipc.c | 32 +++++++++++++------------------- 1 file changed, 13 insertions(+), 19 deletions(-) commit 91c92cb5451f794c8a611301572b4b033b1a1842 Author: Karel Zak Date: Wed Jul 1 12:15:24 2015 +0200 lsipc: fix coding style Signed-off-by: Karel Zak sys-utils/lsipc.c | 838 +++++++++++++++++++++++++++--------------------------- 1 file changed, 419 insertions(+), 419 deletions(-) commit 7458c061db8f284d137ba2611ab2825e147fb23d Author: Karel Zak Date: Wed Jul 1 12:12:08 2015 +0200 lsipc: differentiate between UID and USER names Signed-off-by: Karel Zak sys-utils/lsipc.c | 141 ++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 95 insertions(+), 46 deletions(-) commit c8b47062abdb69fe76af32e449f47f0597254eeb Author: Karel Zak Date: Wed Jul 1 11:52:25 2015 +0200 lsipc: fix ID parsing, use full time for pretty print Signed-off-by: Karel Zak sys-utils/lsipc.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit e015417306a34ba10c676736ec199be0ad237a43 Author: Karel Zak Date: Wed Jul 1 11:38:42 2015 +0200 lsipc: cleanup -o usage * support -o+AAA,BBB,CCC * keep default resource columns in getopt switch() Signed-off-by: Karel Zak sys-utils/lsipc.c | 170 ++++++++++++++++++++++++------------------------------ 1 file changed, 76 insertions(+), 94 deletions(-) commit 32cfe498b8224f8c18c00e83aeb8c9393ff794f3 Author: Karel Zak Date: Wed Jul 1 11:04:21 2015 +0200 lsipc: improve --global Signed-off-by: Karel Zak sys-utils/lsipc.c | 203 +++++++++++++++++++++++++----------------------------- 1 file changed, 93 insertions(+), 110 deletions(-) commit 16c9f32f07543224080cfc6e81f26a93fdc9e5fb Author: Karel Zak Date: Wed Jul 1 11:03:56 2015 +0200 include/xalloc: add err_oom() Signed-off-by: Karel Zak include/xalloc.h | 7 +++++++ 1 file changed, 7 insertions(+) commit 470a7332b3fe79b290b6a627b9363bc166b0254e Author: Karel Zak Date: Tue Jun 30 16:39:39 2015 +0200 lsipc: cleanup columns indexes Signed-off-by: Karel Zak sys-utils/lsipc.c | 113 +++++++++++++++++++++++++++++++----------------------- 1 file changed, 65 insertions(+), 48 deletions(-) commit be4752871342cf1f9b0c433335124c56effacbba Author: Karel Zak Date: Tue Jun 30 16:14:09 2015 +0200 lsipc: add COMMAND for shmem Signed-off-by: Karel Zak sys-utils/lsipc.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit f6c01f4eed23ca05156810a6985e2a0799636b7a Author: Karel Zak Date: Tue Jun 30 16:08:52 2015 +0200 lib/procutils: add proc_get_cmdline() Signed-off-by: Karel Zak include/procutils.h | 1 + lib/procutils.c | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) commit 1e0cd7ae9e561f725a52f6a2607c1e2cc7e82df3 Author: Karel Zak Date: Tue Jun 30 16:05:03 2015 +0200 include/all-io: read_all() don't retry on EOF Signed-off-by: Karel Zak include/all-io.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit be333373b5a4def436fdda48dd7548673b938bd9 Author: Karel Zak Date: Tue Jun 30 13:13:11 2015 +0200 lsipc: add CTIME to shmem default Signed-off-by: Karel Zak sys-utils/lsipc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9d20ffda794208d26e6b3ed09fbc38d94d0b8fc6 Author: Karel Zak Date: Tue Jun 30 13:02:36 2015 +0200 lsipc: new command to list IPC facilities Co-Author: Karel Zak Signed-off-by: Karel Zak Signed-off-by: Ondrej Oprala .gitignore | 1 + bash-completion/Makemodule.am | 3 + bash-completion/lsipc | 65 +++ configure.ac | 5 + sys-utils/Makemodule.am | 10 + sys-utils/lsipc.1 | 135 +++++ sys-utils/lsipc.c | 1259 +++++++++++++++++++++++++++++++++++++++++ 7 files changed, 1478 insertions(+) commit e36deb6424e80b2d35bfe6e0069483544da614f1 Author: Stef Walter Date: Fri Jul 3 14:48:44 2015 +0200 agetty: Reprompt once the network addresses change if address displayed Several of the /etc/issue escape codes such as \4 and \6 depend on the current addresses of the system that can change after the agetty prompt is displayed. This can cause stale data to be displayed when a user looks at a VT, especially in cases of DHCP racing with system start up. Similar to the --reload mechanism, if we're displaying an address in the issue output, and the user hasn't typed anything yet: then redisplay the prompt with the new address. We use netlink to watch for address changes. We only open the netlink socket if we display an address in the issue file. term-utils/agetty.c | 125 ++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 107 insertions(+), 18 deletions(-) commit 9b83e7a48d023b2822de930c9408a127654144f1 Author: Sami Kerola Date: Sun Jul 19 21:19:12 2015 +0100 logger: do not exit when socket errors are not enforced The libc openlog(3) does not have error detection whether unix socket could be opened. As a side effect that made it possible to use logger even if syslogd was not running. Of course user message in these cases were lost. This change makes the logger do behave similar way again, so that sysvinit scripts can successfully pipe messages to logger when ever. Addresses: https://bugs.debian.org/787864 Addresses: https://bugs.debian.org/790875 Reported-by: Andreas Beckmann Reported-by: Andreas Henriksson Tested-by: Robie Basak Signed-off-by: Sami Kerola misc-utils/logger.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 46e43c986017b408688e9f302b421ad554d9ff5f Author: Karel Zak Date: Mon Jul 20 10:10:05 2015 +0200 hwclock: add -D to the man page Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1244609 Signed-off-by: Karel Zak sys-utils/hwclock.8.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 26a46f217e80123085475bd2095698f303a86a71 Merge: a6bf40e 1c23b1c Author: Karel Zak Date: Thu Jul 16 11:40:43 2015 +0200 Merge branch 'kill-man' of https://github.com/ronin13/util-linux commit a6bf40ee77a85f5108208dc764b5d023a07998f5 Author: Karel Zak Date: Thu Jul 16 11:26:14 2015 +0200 lslogins: merge read_utmp() code The code is used only in lslogins, so it does not make sense to maintain it in libcommon. Signed-off-by: Karel Zak include/Makemodule.am | 1 - include/readutmp.h | 28 ------------------ lib/Makemodule.am | 3 +- lib/readutmp.c | 78 -------------------------------------------------- login-utils/lslogins.c | 34 ++++++++++++++++++++-- 5 files changed, 33 insertions(+), 111 deletions(-) commit 2b8a9bda07829886acde73a6c31fe010950236fd Author: Karel Zak Date: Wed Jul 15 16:14:32 2015 +0200 lslogins: fix --user-accs and --system-accs docs Reported-by: Mantas Mikulėnas Signed-off-by: Karel Zak login-utils/lslogins.1 | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit fe63e9032dd2984b6e8365ab6097541f5ffdc071 Author: Sami Kerola Date: Fri Jul 3 19:03:08 2015 +0100 bash-completion: cal: add --twelve and --color options Signed-off-by: Sami Kerola bash-completion/cal | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) commit 158e418241a935f8aa69a8a59f64b97814e6f2c9 Author: Karel Zak Date: Wed Jul 15 15:49:18 2015 +0200 ldattach: tiny coding style changes Signed-off-by: Karel Zak sys-utils/ldattach.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit 58c174609450af544f3db0d9c14a95883d053edf Author: Tilman Schmidt Date: Thu Jul 9 15:22:32 2015 +0200 ldattach: order line disciplines canonically List line disciplines in numerical order and put official names before convenience aliases. Signed-off-by: Tilman Schmidt sys-utils/ldattach.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 5687494ae00dfc7233b1aeac76a7c84d5108074e Author: Tilman Schmidt Date: Thu Jul 9 15:22:32 2015 +0200 ldattach: always set line speed and format for N_GIGASET_M101 The Gigaset M101 exhibits particularly awkward and confusing behaviour when the serial line speed isn't set to what the device expects: Configuration mode detects the used speed and works anyway, but data mode silently fails. Troubleshooting this is enormously time-consuming. Spare the users this trouble by setting the line speed and format to these devices' factory default values as long as the command line doesn't say otherwise. Signed-off-by: Tilman Schmidt sys-utils/ldattach.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit b5225af344a8508046711f794ac2fb497db0aaa4 Author: Tilman Schmidt Date: Thu Jul 9 15:22:32 2015 +0200 ldattach: adapt print_table column width to widest entry The hardcoded column width of 10 in print_table() is not enough, as the currently longest table entry to be printed has 12 characters. Signed-off-by: Tilman Schmidt sys-utils/ldattach.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4bd02cdfdf3a55ce61e8e56e29e9b149b5feaf1c Author: Karel Zak Date: Wed Jul 15 15:42:22 2015 +0200 libfdisk: fix fdisk_label_parse_parttype() for unknown types Signed-off-by: Karel Zak disk-utils/fdisk.c | 3 ++- disk-utils/fdisk.h | 1 - libfdisk/src/parttype.c | 14 +++++++++----- 3 files changed, 11 insertions(+), 7 deletions(-) commit 5aa8d13b13c3c8eddbd9176ef493dfa70a10616b Author: Karel Zak Date: Wed Jul 15 15:02:13 2015 +0200 libfdisk: (gpt) add missing GUIDs Signed-off-by: Karel Zak libfdisk/src/gpt.c | 36 ++++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) commit b8d07d9bec549f8ee371ddb10479ce8080fcdd5d Author: Scott Moser Date: Tue Jul 14 16:10:17 2015 -0400 libfdisk: add GPT GUIDs for PReP Power Firmware (OFW) scans chosen devices for PReP partition IDs. Signed-off-by: Scott Moser libfdisk/src/gpt.c | 3 +++ 1 file changed, 3 insertions(+) commit 5adcb6c77ffd2d8b5eb15a5fcae8ff1f85807809 Author: Karel Zak Date: Wed Jul 15 14:29:53 2015 +0200 libfdisk: (gpt) fix "MidnightBSD UFS" UUID Reported-by: Андрей Гаврилин Signed-off-by: Karel Zak libfdisk/src/gpt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7dbcd80ee8a8079a39c10fc0070ca2f8faa6f09c Author: Ruediger Meier Date: Thu Jul 2 12:10:17 2015 +0200 script: evaluate errno only if read() sets it [kzak@redhat.com: - be careful with errno and DBG - add EINTR check (both suggested by Rudi] Signed-off-by: Ruediger Meier Signed-off-by: Karel Zak term-utils/script.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 1c23b1c5d39f91fb8d243b27daa5ba67fadd47b9 Author: Raghavendra D Prabhu Date: Fri Jul 3 09:11:04 2015 +0530 kill: Add verbose to man page. kill adds a verbose option to print the pid(s) and the signal. It is added to man page here. misc-utils/kill.1 | 3 +++ 1 file changed, 3 insertions(+) commit e831c8767036106b2c0066e0ad85e4f83748857b Author: Karel Zak Date: Thu Jul 2 10:30:10 2015 +0200 script: make sure errno is zero Signed-off-by: Karel Zak term-utils/script.c | 1 + 1 file changed, 1 insertion(+) commit 048811c97a97cdc574dc9307fb1bdd54e41d2a60 Author: Karel Zak Date: Wed Jul 1 15:35:17 2015 +0200 swapon: fix restart waitpid with errno == EINTR Reported-by: Maks Naumov (https://github.com/karelzak/util-linux/pull/205) Signed-off-by: Karel Zak sys-utils/swapon.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit 7015df4936ca320a86d2916533a17499ac5e4fcf Author: Karel Zak Date: Tue Jun 30 12:41:13 2015 +0200 lib/strutils: make strmode() more generic Signed-off-by: Karel Zak lib/strutils.c | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) commit f2f731deb883299880ac16a1dccb3a3865c9f7cd Merge: 289b153 7ff1162 Author: Karel Zak Date: Tue Jun 30 11:21:12 2015 +0200 Merge branch 'sulogin' commit 289b153340ea52772ee060f7d7ab3da473703edb Author: Karel Zak Date: Mon Jun 29 16:14:35 2015 +0200 fstrim: close dir before exit [coverity scan] Signed-off-by: Karel Zak sys-utils/fstrim.c | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) commit f078134257f228b9b0a229997b27f6f0b2dbd8da Author: Karel Zak Date: Mon Jun 29 15:19:47 2015 +0200 rtcwake: cosmetic changes Signed-off-by: Karel Zak sys-utils/rtcwake.c | 43 ++++++++++++++++++++++++++++--------------- 1 file changed, 28 insertions(+), 15 deletions(-) commit bac778c06aa281be3e829ea0ec3ffa348a9012dd Author: Karel Zak Date: Mon Jun 29 13:46:05 2015 +0200 rtcwake: fix ARRAY_SIZE() usage Signed-off-by: Karel Zak sys-utils/rtcwake.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2626f123a5ca64fdd3574cba8bf9567d54163df2 Author: Karel Zak Date: Mon Jun 29 13:43:41 2015 +0200 rtcwake: don't use usage() on error Signed-off-by: Karel Zak sys-utils/rtcwake.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 76037ac7d86964c8b554f7eb59ca8a95c41e0f3b Author: Sami Kerola Date: Sat Jun 6 22:41:51 2015 +0100 rtcwake: fix valgrind warning ==3445== Syscall param ioctl(generic) points to uninitialised byte(s) ==3445== at 0x4F16477: ioctl (in /usr/lib/libc-2.21.so) ==3445== by 0x402785: setup_alarm (rtcwake.c:231) ==3445== by 0x403302: main (rtcwake.c:520) Signed-off-by: Sami Kerola sys-utils/rtcwake.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f87b73ab44dc6273d9c89a0bf7f3a04c1ebfdd4b Author: Sami Kerola Date: Sun Jan 11 09:37:59 2015 +0000 rtcwake: read accepted mode strings from /sys/power/state The rtcwake has various mode names that are internal to the command, listed in rtcwake_mode_string array, while some modes are dynamicaly listed in /sys/power/state. Together these form the allowed modes. [kzak@redhat.com: - cleanup strv usage] Reviewed-by: Karel Zak Signed-off-by: Sami Kerola Signed-off-by: Karel Zak sys-utils/rtcwake.c | 117 ++++++++++++++++++++++++++++------------------------ 1 file changed, 62 insertions(+), 55 deletions(-) commit 254e9e58b7bb73ab2a45b28d29358a96e3e7a9b4 Author: Sami Kerola Date: Sun Jan 11 01:03:37 2015 +0000 rtcwake: make some command line options mutually exclusive Signed-off-by: Sami Kerola sys-utils/rtcwake.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 5b4185e17d60e27bf459b794c27ec96e9a042b1a Author: Sami Kerola Date: Sun Jan 11 00:55:23 2015 +0000 rtcwake: improve coding style Reviewed-by: Benno Schulenberg Signed-off-by: Sami Kerola sys-utils/rtcwake.c | 123 +++++++++++++--------------------------------------- 1 file changed, 29 insertions(+), 94 deletions(-) commit 43a44bfc6da8f4666c5dd6bc03c89713e6c4bd46 Author: Sami Kerola Date: Sat Jan 10 20:07:08 2015 +0000 rtcwake: add --list-modes Commit ece44f19f423408f576f348fed2845c876d72c6e missed freeze mode, which to a simple patch adding the missing argument but Karel pointed out it would be better to make the rtcwake to tell what arguments are supported so that possible changes end up to be automatically correct in bash completion. Proposed-by: Karel Zak Signed-off-by: Sami Kerola bash-completion/rtcwake | 2 +- sys-utils/rtcwake.8.in | 5 ++++- sys-utils/rtcwake.c | 18 +++++++++++++++++- 3 files changed, 22 insertions(+), 3 deletions(-) commit 067fde32c99726035d468a34e393a4f93a0fec32 Author: Sami Kerola Date: Sat Jan 10 19:46:02 2015 +0000 rtcwake: do not overwrite device name This improves error messaging, and removes a memory leak. Reviewed-by: Karel Zak Signed-off-by: Sami Kerola sys-utils/rtcwake.c | 45 +++++++++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 22 deletions(-) commit 499a0c795614306d605c2abc78f73282be2a6352 Author: Sami Kerola Date: Sat Jan 10 19:13:11 2015 +0000 rtcwake: clean up struct tm initializations Signed-off-by: Sami Kerola sys-utils/rtcwake.c | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) commit 356b2989ae76f63e8382dd08458111a98c42070d Author: Sami Kerola Date: Sat Jan 10 18:45:22 2015 +0000 rtcwake: fix preprocessor redefinition The RTC_AF is expected to be part of linux/rtc.h file. Signed-off-by: Sami Kerola sys-utils/rtcwake.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit a10ce9a3e5090f9eab0b34618280d7177568d884 Author: Sami Kerola Date: Sat Jan 10 18:31:29 2015 +0000 rtcwake: add human readable --date timestamp format Reviewed-by: Benno Schulenberg Signed-off-by: Sami Kerola bash-completion/rtcwake | 7 ++++++- sys-utils/rtcwake.8.in | 18 +++++++++++++++++- sys-utils/rtcwake.c | 24 +++++++++++++++++++----- 3 files changed, 42 insertions(+), 7 deletions(-) commit 3e5a54554dd1495d10427163e911c24ba4c9e558 Author: Sami Kerola Date: Sat Jan 10 18:03:25 2015 +0000 rtcwake: improve read_clock_mode() Make skipping two lines more robust, and add message about unexpected adjfile contents when running with --verbose. Reviewed-by: Karel Zak Signed-off-by: Sami Kerola include/strutils.h | 3 +++ lib/strutils.c | 12 ++++++++++++ sys-utils/rtcwake.c | 19 +++++++------------ 3 files changed, 22 insertions(+), 12 deletions(-) commit 5fde2f0d34e71301dc146bfec616564d8c60c872 Author: Sami Kerola Date: Sat Jan 10 17:07:09 2015 +0000 rtcwake: remove RTC_ALM_READ and RTC_ALM_SET compatibility The RTC_WKALM_RD and RTC_WKALM_SET have been available since 2.6.17, and preferred way since 2007. Keeping the fallbacks to the old interface is no longer needed. Reference: https://github.com/torvalds/linux/commit/e824290e5dcfaf2120da587b16d10dfdff8d5d3e Reference: https://github.com/torvalds/linux/commit/f8245c26886c912627ebc49f714e4491261224c4 Reviewed-by: Benno Schulenberg Signed-off-by: Sami Kerola sys-utils/rtcwake.c | 42 ++++++------------------------------------ 1 file changed, 6 insertions(+), 36 deletions(-) commit 64a80678356c65ed232b1a2c958ec24cbb3fec32 Author: Sami Kerola Date: Sat Jan 10 16:34:25 2015 +0000 rtcwake: replace long if else statement with switch case Signed-off-by: Sami Kerola sys-utils/rtcwake.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) commit 6e1ec14faf760642f90af3a1dd11fa23dea66d88 Author: Sami Kerola Date: Sat Jan 10 16:14:35 2015 +0000 rtcwake: enumerate constant mode strings Reviewed-by: Karel Zak Signed-off-by: Sami Kerola sys-utils/rtcwake.c | 114 ++++++++++++++++++++++++++++++---------------------- 1 file changed, 65 insertions(+), 49 deletions(-) commit 71d95e92c109512ec16a38702829bb7dd6bf5f18 Author: Sami Kerola Date: Sat Jan 10 15:39:00 2015 +0000 rtcwake: add rtcwake_control and remove global variables Signed-off-by: Sami Kerola sys-utils/rtcwake.c | 131 +++++++++++++++++++++++++++------------------------- 1 file changed, 69 insertions(+), 62 deletions(-) commit 14867b0f723ab98821f5535561342d7c76fc28f3 Author: Sami Kerola Date: Fri Jun 12 21:25:08 2015 +0100 reset: deprecate the script, and remove reset.033c Most distributions probably ship reset from ncurses, which means util-linux reset(1) is unlikely to be in use anywhere. Assuming the previous being true it is almost unimaginable anyone one would be using the alternative script, so remove it and mark the script deprecated. Signed-off-by: Sami Kerola Documentation/deprecated.txt | 5 +++++ term-utils/Makemodule.am | 1 - term-utils/reset | 6 ++++++ term-utils/reset.033c | 11 ----------- 4 files changed, 11 insertions(+), 12 deletions(-) commit 694562e3b875688af35d9cddb85c2c89658f3c2c Author: Sami Kerola Date: Fri Jun 12 20:57:31 2015 +0100 getopt: use $(...) command substitution in example script [shellcheck] Reference: https://github.com/koalaman/shellcheck/wiki/SC2006 Signed-off-by: Sami Kerola misc-utils/getopt-parse.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 55034ed00e94657109eb0405b65086f1d3e91423 Author: Sami Kerola Date: Sun Jun 7 21:51:51 2015 +0100 docs: unify mkswap(8) with swapon(8) about holes warning Reviewed-by: Dave Rutherford Signed-off-by: Sami Kerola disk-utils/mkswap.8 | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit b464fd6284eaeb37bc4dcd6f54eefee3aa035055 Author: Sami Kerola Date: Sat Jun 6 21:21:41 2015 +0100 zramctl: add link to kernel documentation The manual page does lacks explanation how to create zram with modprobe. Signed-off-by: Sami Kerola sys-utils/zramctl.8 | 4 ++++ 1 file changed, 4 insertions(+) commit 0688911ad423cf9fae9b813e88578fe5594768f4 Author: Sami Kerola Date: Tue Jun 2 10:18:25 2015 +0100 last-deprecated: remove from source tree The last/lastb(1) from sysvinit has been around for about two years, and the better implementation is already part of releases 2.24 to 2.26. It should be safe to remove the unused last code from the source tree. Reference: ce60272039ea11952b15fefb653892dd0da02217 Signed-off-by: Sami Kerola Documentation/deprecated.txt | 5 - configure.ac | 10 - login-utils/Makemodule.am | 7 - login-utils/last-deprecated.1 | 62 ------ login-utils/last-deprecated.c | 483 ------------------------------------------ 5 files changed, 567 deletions(-) commit 0664d41dba64ef8d80307f0e1ba04bca4ae72b0d Author: Sami Kerola Date: Thu Jun 25 16:28:19 2015 +0100 script: fix variable initialization warning term-utils/script.c:402:19: warning: obsolete use of designated initializer without '=' [-Wpedantic] Signed-off-by: Sami Kerola term-utils/script.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 9583461dea0388eb284051111a710447e1786c9c Author: Karel Zak Date: Mon Jun 29 11:41:22 2015 +0200 build-sys: make autogen.sh more robust Signed-off-by: Karel Zak autogen.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a3b69ccb1c283e61876b0777ea94f7a474480b58 Author: Karel Zak Date: Mon Jun 29 10:55:37 2015 +0200 build-sys: use REALTIME_LIBS for script Signed-off-by: Karel Zak term-utils/Makemodule.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7ff1162e67164cb4ece19dd809c26272461aa254 Author: Karel Zak Date: Mon May 25 15:30:52 2015 +0200 sulogin: improve support for locked root account Some installations and distributions don't use a root account password for security reasons and use sudo instead. In that case, asking for the password makes no sense, and it is not even considered as valid as it's just "*" or "!". In these cases --force is required to just start a root shell and no ask for password. I don't think it's a good idea to automatically start root shell when locked account is detected. It's possible that the machine is on public place and for example Ubuntu uses root account disabled by default (and also Fedora when installed by yum/dnf without anaconda). The --force option forces admins to think about it... The distro maintainers can also use --force in their initscripts or systemd emergency.service if they believe that promiscuous setting is the right thing for the distro. Addresses: https://bugs.debian.org/326678 Signed-off-by: Karel Zak login-utils/sulogin.8 | 8 ++++++-- login-utils/sulogin.c | 48 ++++++++++++++++++++++++++++++++++-------------- 2 files changed, 40 insertions(+), 16 deletions(-) commit 13c551f259423d97e6edf1380d5d9e93d77ebc89 Author: Boris Egorov Date: Sat Jun 20 01:41:01 2015 +0600 cfdisk: fix condition logic [cppcheck] [disk-utils/cfdisk.c:1181] -> [disk-utils/cfdisk.c:1181]: (warning) Possible null pointer dereference: data - otherwise it is redundant to check it against null. Signed-off-by: Boris Egorov disk-utils/cfdisk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7508d991c5ee23a4dbc790deda306deba1a69cf4 Author: Boris Egorov Date: Sat Jun 20 01:41:00 2015 +0600 libblkid/whereis: simplify some conditions [cppcheck] [misc-utils/whereis.c:466]: (style) Redundant condition: uflag. 'A && (!A || B)' is equivalent to 'A || B' [libblkid/src/tag.c:373]: (style) Redundant condition: dev. 'A && (!A || B)' is equivalent to 'A || B' Signed-off-by: Boris Egorov libblkid/src/tag.c | 2 +- misc-utils/whereis.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit e3ca1312a20424501144cebe6c2e6e78a5bf6db1 Author: Boris Egorov Date: Sat Jun 20 01:40:59 2015 +0600 sys-utils/disk-utils/lib: fix printf format types [cppcheck] Fix 'invalidPrintfArgType' cppcheck warnings Signed-off-by: Boris Egorov disk-utils/fsck.cramfs.c | 6 +++--- disk-utils/mkfs.bfs.c | 6 +++--- lib/cpuset.c | 6 +++--- sys-utils/chcpu.c | 38 +++++++++++++++++++------------------- sys-utils/hwclock-rtc.c | 2 +- sys-utils/ipcs.c | 4 ++-- sys-utils/readprofile.c | 12 ++++++------ 7 files changed, 37 insertions(+), 37 deletions(-) commit 9fa6088aa9b279f3f4de3df0eb8eb9cbcda7f09e Author: Andreas Henriksson Date: Mon Jun 22 19:26:22 2015 +0200 rename: allow full-path renames The command "touch b0;rename.ul -v ./b0 ./b1 ./b0" used to work before "allow renaming in subdirectories" change. (regression in commit bd9ced628bb86) Addresses: https://bugs.debian.org/789240 Reported-by: gregrwm Reviewed-by: Sami Kerola Signed-off-by: Andreas Henriksson misc-utils/rename.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit be9308f743b78753428f16c2634cfbcfda6c66de Author: Andreas Henriksson Date: Mon Jun 22 19:22:34 2015 +0200 tests: add fullpath tests to rename/subdir Signed-off-by: Andreas Henriksson tests/expected/rename/subdir | 9 +++++++++ tests/ts/rename/subdir | 24 ++++++++++++++++++++++++ 2 files changed, 33 insertions(+) commit e10f0d073f62d7283d0b6a5c49d7e77ec59a9650 Author: Benno Schulenberg Date: Wed Jun 24 20:58:06 2015 +0200 cal: correct the man page: the reformation eliminated eleven days, not ten Also tweak some other wordings and formatting. Reported-by: Felix Neumann Signed-off-by: Benno Schulenberg misc-utils/cal.1 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit b6ffab101abe161ec8c14880f9641c13c1217edf Merge: 3c1a1ba 63ddc7b Author: Karel Zak Date: Thu Jun 25 11:56:02 2015 +0200 Merge branch 'script' * script: (25 commits) script: add note to BUGS man page section script: fix EOF problems script: improve poll debugging script: cleanup signals usage script: debug poll() results script: add support for SCRIPT_DEBUG= script: remove magic constants from poll code script: rename control struct members script: close timingfp also when -e tests: add scriptreplay test script: move timing file opening close to use of it script: add noreturn function attributes script: use gettime_monotonic() to get timing file timestamps script: use correct input type, move comment, and so on script: replace strftime() workaround with CFLAGS = -Wno-format-y2k script: move do_io() content to small functions script: add 'Script started' line always to capture file script: remove io vs signal race script: merge doinput() and output() functions to do_io() script: use poll() rather than select() ... commit 63ddc7ba1ee47ddf78bba192a658c1fd91b2f407 Author: Karel Zak Date: Thu Jun 25 11:55:42 2015 +0200 script: add note to BUGS man page section Signed-off-by: Karel Zak term-utils/script.1 | 7 +++++++ 1 file changed, 7 insertions(+) commit 3c1a1bad73ecb95b7afbc3691eb06edf678a4e78 Author: Karel Zak Date: Wed Jun 24 12:17:32 2015 +0200 logger: add note about kern->user conversion Signed-off-by: Karel Zak misc-utils/logger.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4b7248c0296e94fc1d85c22bbad5f7b943689971 Author: Karel Zak Date: Mon Jun 22 11:56:43 2015 +0200 libfdisk: add GPT GUIDs for ARMs Addresses: https://github.com/karelzak/util-linux/issues/203 Signed-off-by: Karel Zak libfdisk/src/gpt.c | 2 ++ 1 file changed, 2 insertions(+) commit 7dc0f5c90ee9899a1d92de77ad3d8af998198379 Author: Karel Zak Date: Fri Jun 19 12:17:45 2015 +0200 libmount: improve monitor to be usable for non-root users The current implementation calls mkdir and open(O_CREATE) to initialize /run/mount/utab.lock before it starts to monitor the file. Unfortunately it makes the monitor useless for non-root processes (e.g. systemd --user). The new implementation adds inotify watch for the last existing component in the path (/run/mount/utab.lock) and re-initialize after a change. It makes the monitor robust enough for mkdir/rmdir when monitor is already active. Signed-off-by: Karel Zak libmount/src/monitor.c | 224 +++++++++++++++++++++++++++++++------------------ 1 file changed, 142 insertions(+), 82 deletions(-) commit c893f5e462265b59cd0c27bd38b6355e799a302a Author: Romain Bouvier Date: Wed Jun 17 15:59:18 2015 +0000 libuuid: return correct value for uuid_generate_time_safe Make return value consistent for consecutive calls. If you call uuid_generate_time_safe, it should always return -1 if it can't guarantee uniqueness. Without this patch, on consecutive calls where it can't guarantee uniqueness, the first call returns -1, but later calls return 0. Reported-by: Romain Bouvier Signed-off-by: Andreas Henriksson libuuid/src/gen_uuid.c | 3 +++ 1 file changed, 3 insertions(+) commit acb7651f8897ae73d0f45dd75bc87630001c61b9 Author: Karel Zak Date: Thu Jun 18 11:55:29 2015 +0200 libfdisk: ignore misaligned optimal I/O size For example: # modprobe scsi_debug dev_size_mb=1000 opt_blks=65535 physblk_exp=3 creates a disk with: Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 33553920 bytes where 33553920 % 4096 != 0, it means that use Optimal I/O size to align partition results that partition is not aligned to physical sector boundary. Reported-by: Tom Yan Signed-off-by: Karel Zak libfdisk/src/alignment.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit 54c6611d6f7b73609a5331f4d0bcf63c4af6429e Author: Karel Zak Date: Wed Jun 17 15:48:50 2015 +0200 script: fix EOF problems * remove STDIN from poll() if: * STDIN already closed -- poll returns POLLHUP, for example: echo "date" | script * detect EOF as returned by read(), for example: script -c "echo Hello" < /dev/null * don't write to master when there is still something to read from slave (it means shell is not initialized yet or busy) Signed-off-by: Karel Zak term-utils/script.c | 114 ++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 88 insertions(+), 26 deletions(-) commit 2e9418b7cc029a453355dd77b6a3b51cf9cbc6df Author: Karel Zak Date: Wed Jun 17 13:33:35 2015 +0200 script: improve poll debugging Signed-off-by: Karel Zak term-utils/script.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit d35ffe808a0e42967cf69d4651582cd0b7ed1e08 Author: Karel Zak Date: Wed Jun 17 13:25:46 2015 +0200 script: cleanup signals usage * don't call anything from assert() * fork() block cleanup to make it more readable * restore original signal mask in child (do_shell()) * close signal FD in child (do_shell()) Signed-off-by: Karel Zak term-utils/script.c | 39 ++++++++++++++++++++++++++++----------- 1 file changed, 28 insertions(+), 11 deletions(-) commit 7f5769182f521c13b27f46c1f0e2a06f328c03f7 Author: Benno Schulenberg Date: Wed Jun 17 08:28:33 2015 +0200 sfdisk: improve some formatting and wording in the man page The main fix is: giving -J, --json its own paragraph. Signed-off-by: Benno Schulenberg disk-utils/sfdisk.8 | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) commit 3f43f5d05e9531d3ca8cc4fbe26a36c541abe476 Author: Benno Schulenberg Date: Wed Jun 17 08:28:32 2015 +0200 sfdisk: show that the command --verify optionally takes device names Signed-off-by: Benno Schulenberg disk-utils/sfdisk.8 | 2 +- disk-utils/sfdisk.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 1e2b75611d7a5ca78a576ff06016f85ad8b14c85 Author: Ruediger Meier Date: Sat May 9 00:34:12 2015 +0200 tests: always kill helper Signed-off-by: Ruediger Meier tests/ts/kill/print_pid | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 4f4fc8c1d09fcbc154b956c6295fbca9d6b888e5 Author: Ruediger Meier Date: Sat May 9 00:47:33 2015 +0200 procutils: reset errno before readdir readdir(3p): "When the end of the directory is encountered, a null pointer shall be returned and errno is not changed" Signed-off-by: Ruediger Meier lib/procutils.c | 1 + 1 file changed, 1 insertion(+) commit 1200cfbfbdd99c69a6c8b930f18e79f41cad7352 Author: Karel Zak Date: Tue Jun 16 14:43:59 2015 +0200 script: debug poll() results Signed-off-by: Karel Zak term-utils/script.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit a2b4dec553405de77bbfa421927ca2ffbfbc0a9e Author: Karel Zak Date: Tue Jun 16 14:03:09 2015 +0200 script: add support for SCRIPT_DEBUG= Signed-off-by: Karel Zak term-utils/script.c | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 65 insertions(+), 2 deletions(-) commit da26af4ee107b0d15e5ceb56bbf4671df3d2a575 Author: Karel Zak Date: Tue Jun 16 13:11:05 2015 +0200 script: remove magic constants from poll code Signed-off-by: Karel Zak term-utils/script.c | 54 ++++++++++++++++++++++++++++++++--------------------- 1 file changed, 33 insertions(+), 21 deletions(-) commit 3f19b85f9747e321424b65d55bd8b2a35f2b1920 Author: Karel Zak Date: Tue Jun 16 12:34:04 2015 +0200 script: rename control struct members Sorry, but it's really ugly manner to use "xflg" where "x" is a command line option as program variable and use it in code. Signed-off-by: Karel Zak term-utils/script.c | 64 ++++++++++++++++++++++++++--------------------------- 1 file changed, 32 insertions(+), 32 deletions(-) commit 7e5796c916c68fee44b5a292c448a99f86de23e1 Author: Karel Zak Date: Tue Jun 16 12:26:00 2015 +0200 script: close timingfp also when -e Signed-off-by: Karel Zak term-utils/script.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) commit f3107d3ac4f4fdb274be1fedc4824841242a8716 Merge: 9acbe2a 8090b31 Author: Karel Zak Date: Tue Jun 16 11:53:18 2015 +0200 Merge branch 'script3' of git://github.com/kerolasa/lelux-utiliteetit into script * 'script3' of git://github.com/kerolasa/lelux-utiliteetit: tests: add scriptreplay test script: move timing file opening close to use of it script: add noreturn function attributes script: use gettime_monotonic() to get timing file timestamps script: use correct input type, move comment, and so on script: replace strftime() workaround with CFLAGS = -Wno-format-y2k script: move do_io() content to small functions script: add 'Script started' line always to capture file script: remove io vs signal race script: merge doinput() and output() functions to do_io() script: use poll() rather than select() script: use signalfd() to catch signals script: add struct script_control and remove global variables script: remove function prototypes tests: check script options work as expected tests: add script output buffering race check commit 9acbe2aa4782a08ab97a04d37d0397ad2183f50c Author: Benno Schulenberg Date: Thu Jun 11 11:04:02 2015 +0200 chrt: slice up the usage text and normalize its layout Signed-off-by: Benno Schulenberg schedutils/chrt.c | 53 ++++++++++++++++++++++++++++------------------------- 1 file changed, 28 insertions(+), 25 deletions(-) commit 4e4bc0c8011594dc24f45d836f7e372b4942f9dd Author: Benno Schulenberg Date: Thu Jun 11 11:04:01 2015 +0200 chrt: make the usage synopsis clearer Signed-off-by: Benno Schulenberg schedutils/chrt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2cde9865c27248bb1f7685b66a0a5830884f5869 Author: Karel Zak Date: Mon Jun 15 14:54:15 2015 +0200 losetup: be careful with errno Signed-off-by: Karel Zak lib/loopdev.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 314ca59fbf666c9323d225be2158787e8fc53345 Author: Karel Zak Date: Mon Jun 15 14:02:36 2015 +0200 tests: add JSON sfdisk dumps Signed-off-by: Karel Zak tests/expected/sfdisk/dos-write-json | 16 ++++++++++++++++ tests/expected/sfdisk/gpt-write-json | 16 ++++++++++++++++ tests/ts/sfdisk/dos | 7 +++++++ tests/ts/sfdisk/gpt | 6 ++++++ 4 files changed, 45 insertions(+) commit a592b4b58045a4ead4ccbd3277609476ee1cb5cf Author: Karel Zak Date: Mon Jun 15 13:23:36 2015 +0200 sfdisk: add --json Signed-off-by: Karel Zak disk-utils/sfdisk.8 | 3 +++ disk-utils/sfdisk.c | 10 +++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) commit 3c7fde5f922ce67ba773487e39f44db1eaa60f5e Author: Karel Zak Date: Mon Jun 15 13:18:09 2015 +0200 libfdisk: add JSON dump output Signed-off-by: Karel Zak libfdisk/docs/libfdisk-sections.txt | 1 + libfdisk/src/libfdisk.h.in | 1 + libfdisk/src/libfdisk.sym | 1 + libfdisk/src/script.c | 189 ++++++++++++++++++++++++++++++++++-- 4 files changed, 182 insertions(+), 10 deletions(-) commit 0baeca2aef0d09b245484cba8e8d755fea97a863 Author: Karel Zak Date: Mon Jun 15 10:38:38 2015 +0200 libfdisk: rename script functions to improve readability Signed-off-by: Karel Zak libfdisk/src/script.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 025f5c0a2bfa52692c383990052fbef6b83715c2 Author: Karel Zak Date: Thu Jun 11 15:13:17 2015 +0200 tests: update fdisk BSD Signed-off-by: Karel Zak tests/expected/fdisk/bsd | 2 -- 1 file changed, 2 deletions(-) commit 5989556ad3dca8246f245eaf0867e89fb6fc9362 Author: Karel Zak Date: Thu Jun 11 14:19:47 2015 +0200 libfdisk: add new API to read label specific data * removes list() label operation from internal API The list() has been based on fdisk_info() it was useless for anything else than print on stdout... * add a new get_item() label operation and fdisk_get_disklabel_item() public API The new API provides abstract and pretty simple way how to get label specific disk label information, for example fdisk_get_disklabel_item(cxt, GPT_LABELITEM_ENTRIESLBA, &iterm); return LBA of the array with GPT entries. Note that this patch does not implement public functions to get data from the @item object. * removes get_id() label operation -- it's subset of the new get_item() * the new internal API is also used to implement backwardly compatible fdisk_list_disklabel() and fdisk_get_disklabel_id() Signed-off-by: Karel Zak disk-utils/fdisk-list.c | 2 +- libfdisk/src/bsd.c | 133 ++++++++++++++++++++++++++++++++------------- libfdisk/src/dos.c | 46 +++++++++------- libfdisk/src/fdiskP.h | 19 +++++-- libfdisk/src/gpt.c | 116 +++++++++++++++++++++++---------------- libfdisk/src/label.c | 78 +++++++++++++++++++++++--- libfdisk/src/libfdisk.h.in | 70 +++++++++++++++++++++++- libfdisk/src/libfdisk.sym | 1 + libfdisk/src/sgi.c | 52 +++++++++++++----- libfdisk/src/sun.c | 62 +++++++++++++++------ 10 files changed, 428 insertions(+), 151 deletions(-) commit 535748a6175a142901069724cb11b60d4a63b671 Author: Karel Zak Date: Wed Jun 10 16:55:29 2015 +0200 libfdisk: (dos) fix cylinders calculation Signed-off-by: Karel Zak libfdisk/src/dos.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) commit 8dd51c183396c4bf6344d08b01fb84658e0a8eb4 Author: Karel Zak Date: Wed Jun 10 14:19:45 2015 +0200 fstrim: de-duplicate by mount source too Now fstrim de-duplicates by target (mountpoint). This patch adds de-duplication according to mount source (device) to avoid bind mounts or devices mounted more than once. Note that the patch also check FS root, the different FS roots of the same multi-root FS (e.g. btrfs) maybe mounted on different places. # mount --bind /home/wine /mnt/test old version: # fstrim -av /mnt/test: 0 B (0 bytes) trimmed <--- /home/wine: 0 B (0 bytes) trimmed <--- /boot: 0 B (0 bytes) trimmed /home: 0 B (0 bytes) trimmed /: 0 B (0 bytes) trimmed new version: # fstrim -av /mnt/test: 0 B (0 bytes) trimmed <--- /boot: 0 B (0 bytes) trimmed /home: 171.8 MiB (180113408 bytes) trimmed /: 0 B (0 bytes) trimmed Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1162213 Signed-off-by: Karel Zak sys-utils/fstrim.c | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) commit 8c73e5096d4f3d7a4239f812c904010dd0b3f1cb Author: Karel Zak Date: Wed Jun 10 12:45:53 2015 +0200 fdisk: differentiate between + and +{M,G,...} Signed-off-by: Karel Zak disk-utils/fdisk.c | 2 +- libfdisk/src/dos.c | 9 ++++----- libfdisk/src/gpt.c | 7 ++----- 3 files changed, 7 insertions(+), 11 deletions(-) commit 85ccc1d42555c22f8e5547947b3b61507aaba3a4 Author: Karel Zak Date: Tue Jun 9 15:53:20 2015 +0200 libblkid: (nilfs2) check size for backup superblock only The size of the device seems irrelevant for the primary superblock. The primary superblock is stored on fixed offset, possible collision between last partition and whole-disk is possible only for backup superblock only. Signed-off-by: Karel Zak libblkid/src/superblocks/nilfs.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 3fabc3637c97b2a46803d7b9b06de3b9a59ec25c Author: Karel Zak Date: Tue Jun 9 11:16:45 2015 +0200 chrt: fix --help inconsistency Reported-by: Martin Steigerwald Signed-off-by: Karel Zak schedutils/chrt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 00817742ce360119e079a33e12cf84118ff7c63e Author: Karel Zak Date: Tue Jun 9 10:37:11 2015 +0200 libblkid: (nilfs2) check devise size Unfortunately, nilfs2 have the same problem like many RAIDs. It uses the end of the device to store (backup) superblock. The end of the last partition is the same location as the end of the whole-disk. It means that the superblock seems valid for the last partitions as well as for whole-device. Fortunately, nilfs2 superblock contains size of the device, so we can distinguish between whole-disk and partition device. Reported-by: Heinz Diehl Signed-off-by: Karel Zak libblkid/src/superblocks/nilfs.c | 3 +++ 1 file changed, 3 insertions(+) commit 8090b31e5ae03ab59101c102404f7a048b9610bc Author: Sami Kerola Date: Sun May 31 22:23:14 2015 +0100 tests: add scriptreplay test Signed-off-by: Sami Kerola tests/commands.sh | 1 + tests/expected/script/replay | 9 +++++++++ tests/ts/script/replay | 38 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 48 insertions(+) commit 9580536a7ffc1b962cfcd8026604a5402fb2a54f Author: Sami Kerola Date: Tue Mar 3 22:06:01 2015 +0000 script: move timing file opening close to use of it This allows removing almost immediate closure of file handle in the doshell() function that does not use the file. Proposed-by: Karel Zak Signed-off-by: Sami Kerola term-utils/script.c | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) commit 2ddadb5eda64d6c2ba3ca7c7260ff89de9e1bc27 Author: Sami Kerola Date: Tue Dec 30 23:22:33 2014 +0000 script: add noreturn function attributes Signed-off-by: Sami Kerola term-utils/script.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 04639805e12e343c007746e23cb42c1fa7efbb2a Author: Sami Kerola Date: Tue Dec 30 23:03:32 2014 +0000 script: use gettime_monotonic() to get timing file timestamps This moves the previous time to script control structure, and does timeval calculation with timersub() that is more appropriate than making a timeval to a double. Signed-off-by: Sami Kerola term-utils/Makemodule.am | 4 ++-- term-utils/script.c | 24 ++++++++++++------------ 2 files changed, 14 insertions(+), 14 deletions(-) commit b09feab9e47d214f269230c605b07cb57af3384c Author: Sami Kerola Date: Sat Dec 27 10:14:28 2014 +0000 script: use correct input type, move comment, and so on Minor corrections. Signed-off-by: Sami Kerola term-utils/script.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) commit 8353549e026fa6f6c77368d92f03cc97bf08a746 Author: Sami Kerola Date: Sat Dec 27 09:32:45 2014 +0000 script: replace strftime() workaround with CFLAGS = -Wno-format-y2k Nowadays, gcc(1) provides the -Wno-format-y2k option to prevent the warning, so that the above workaround is no longer required. Reference: http://man7.org/linux/man-pages/man3/strftime.3.html Signed-off-by: Sami Kerola term-utils/Makemodule.am | 1 + term-utils/script.c | 15 +++------------ 2 files changed, 4 insertions(+), 12 deletions(-) commit a8896ad5b7fe6447326d26dc8addb69b0f3fb347 Author: Sami Kerola Date: Fri Dec 26 22:32:25 2014 +0000 script: move do_io() content to small functions The do_io() got to be a bit long with relatively deep indentation. Signed-off-by: Sami Kerola term-utils/script.c | 108 ++++++++++++++++++++++++++++------------------------ 1 file changed, 58 insertions(+), 50 deletions(-) commit 076ffa48f3875867749fe5c23973aaa52ee843a9 Author: Sami Kerola Date: Fri Dec 26 17:57:46 2014 +0000 script: add 'Script started' line always to capture file The scriptreplay(1) will expect capture file always to have header. Before this change the --quiet option together with timing caused following replay error. $ script --quiet --timing=timing [...] $ scriptreplay timing typescript [...] scriptreplay: unexpected end of file on typescript Signed-off-by: Sami Kerola term-utils/script.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 89a859d433fbba81cd70ba5e42fc86e971233dce Author: Sami Kerola Date: Fri Dec 26 17:43:49 2014 +0000 script: remove io vs signal race Make do_io() to run poll() until all streams are empty. This should remove the signal from child versus io handling race for good. Addresses: https://github.com/karelzak/util-linux/pull/62 Addresses: https://bugs.launchpad.net/bugs/264967 Addresses: https://bugs.debian.org/305808 CC: Wolfgang Richter CC: Ruediger Meier Signed-off-by: Sami Kerola term-utils/script.c | 20 +++++++++++++------- tests/ts/script/race | 4 ---- 2 files changed, 13 insertions(+), 11 deletions(-) commit 6ddf53a5b4151591ec68d701770252a3a09e1c18 Author: Sami Kerola Date: Fri Dec 26 15:57:02 2014 +0000 script: merge doinput() and output() functions to do_io() One item to poll() more is a lot less work for system than separete input and output processes. Addresses: https://github.com/karelzak/util-linux/pull/62 CC: Wolfgang Richter CC: Ruediger Meier Signed-off-by: Sami Kerola term-utils/script.c | 231 ++++++++++++++-------------------------------------- 1 file changed, 59 insertions(+), 172 deletions(-) commit 7c43fd23ce308698d4ad7c061db6bd9ad65cc92a Author: Karel Zak Date: Mon Jun 8 17:26:31 2015 +0200 libfdisk: improve +0 partition size Signed-off-by: Karel Zak libfdisk/src/dos.c | 73 ++++++++++++++++++++++++++++++++++-------------------- libfdisk/src/gpt.c | 11 ++++---- 2 files changed, 52 insertions(+), 32 deletions(-) commit 09a4ca5e450c5e7cbe860453b76fd68c60fe591f Author: Karel Zak Date: Mon Jun 8 16:45:15 2015 +0200 libfdisk: (dos) fix tiny partitions calculation Signed-off-by: Karel Zak libfdisk/src/dos.c | 2 ++ 1 file changed, 2 insertions(+) commit 765004f3eb95f21b578795ecf8831225a6dcd95a Author: Karel Zak Date: Mon Jun 8 16:02:17 2015 +0200 libfdisk: (gpt) make it possible to create really small partitions Signed-off-by: Karel Zak disk-utils/fdisk.c | 2 +- libfdisk/src/gpt.c | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) commit 68a8648ce509f04113bca0e61d2f0f976a15c271 Author: Karel Zak Date: Mon Jun 8 15:41:33 2015 +0200 libfdisk: support alignment to non power of 2 Let's create a disk with 33553920 bytes optimal I/O size: # modprobe scsi_debug dev_size_mb=1000 opt_blks=65535 and try to create partition: echo -e 'n\n\n\n\n+512M\np\nq\n' | fdisk /dev/sdc old version: Device Boot Start End Sectors Size Id Type /dev/sdc1 65535 1114110 1048576 512M 83 Linux The next partition will be expected on sector 1114110 + 1, but it's not aligned to optimal I/O: ((1114110 + 1) * 512) % 33553920 = 8192 fixed version: Device Boot Start End Sectors Size Id Type /dev/sdc1 65535 1114094 1048560 512M 83 Linux ((1114094 + 1) * 512) % 33553920 = 0 Note that the same problem with alignment calculation has been fixed in Linux kernel by commit b8839b8c55f3fdd60dc36abcda7e0266aff7985c (Oct 2014). The patch also improves fdisk_align_lba_in_range() to not align sizes smaller than grain (default 1MiB) to make it possible to create really small partitions. Reported-by: Tom Yan Signed-off-by: Karel Zak libfdisk/src/alignment.c | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) commit 1c8beb3dfbb155b2cea3764a15d40fdd9038cf9f Author: Guillem Jover Date: Sat Jun 6 06:26:43 2015 +0200 sulogin: Use read instead of allocated size from getline() The getline function distinguishes between the allocated and read lenghts, and we should not mix them up, as we might end up processing junk. Signed-off-by: Guillem Jover login-utils/sulogin-consoles.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit f51275eedbb56061b0301e901046f7d0f5aad20f Author: Guillem Jover Date: Sat Jun 6 06:19:07 2015 +0200 include/c: Define F_DUPFD_CLOEXEC on kFreeBSD systems if missing The kernel of FreeBSD version 10 and higher supports this fcntl command, but the system libc, in this case glibc, might not yet know about it. Signed-off-by: Guillem Jover include/c.h | 6 ++++++ 1 file changed, 6 insertions(+) commit fef6f84a15aaf5898b4ccfb8ecc145201747cae1 Author: Guillem Jover Date: Sat Jun 6 06:19:06 2015 +0200 lib/sysfs: Use dup_fd_cloexec instead of direct call to fcntl Signed-off-by: Guillem Jover lib/sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8e86d93d1e3f0c11b3fdca3246c4f3a267acf8eb Author: Guillem Jover Date: Sat Jun 6 06:19:05 2015 +0200 lib/fileutils: Add new dup_fd_cloexec function This function duplicates and marks a file descriptor as close-on-exec. Takes care of build and run-time support for the fcntl F_DUPFD_CLOEXEC command, and other errors. Signed-off-by: Guillem Jover include/fileutils.h | 1 + lib/fileutils.c | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) commit c4417ee9d32ad383ea557745e8af18598676ad88 Author: Andreas Henriksson Date: Wed Jun 3 18:32:09 2015 +0200 man: fix nolazytime typo in mount(8) Avoids double negation... Addresses: http://bugs.debian.org/786554 Reported-by: Felix Zielcke Signed-off-by: Andreas Henriksson sys-utils/mount.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5e3da11b3e6c937c11953e2529b849b79ccac88e Author: Boris Egorov Date: Tue Jun 2 23:59:03 2015 +0600 bash-completion: remove unused variables [shellcheck] Fix shellcheck SC2034 warnings. Signed-off-by: Boris Egorov bash-completion/addpart | 2 +- bash-completion/fsck | 2 +- bash-completion/fsck.minix | 2 +- bash-completion/lsblk | 1 - bash-completion/mkfs | 2 +- bash-completion/mkfs.bfs | 2 +- bash-completion/mkfs.minix | 1 - 7 files changed, 5 insertions(+), 7 deletions(-) commit bcce334df824ee661db6fcbeea91edf2bff5010e Author: Boris Egorov Date: Tue Jun 2 23:59:02 2015 +0600 bash-completion: sync lscpu completion with code Remove unexistent option, add two not listed in completion. Signed-off-by: Boris Egorov bash-completion/lscpu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b5b80e5a6d85a53c89e8ef1ddb76ae985a1c7f65 Author: Boris Egorov Date: Tue Jun 2 23:59:01 2015 +0600 bash-completion: handle comma-separated options This solution can become messy when you have too many options listed, because it repeats all of them. For example, after invoking completion with this input: $ partx --output END,SECTORS,SCHEME,START, You got these completions: END,SECTORS,SCHEME,START,FLAGS, END,SECTORS,SCHEME,START,NR, END,SECTORS,SCHEME,START,TYPE, END,SECTORS,SCHEME,START,NAME, END,SECTORS,SCHEME,START,SIZE, END,SECTORS,SCHEME,START,UUID, Nevertheless, it works even with numbers (listed options properly excluded from completion). Try to invoke completion after 'chcpu --disable ' or 'lsblk --exclude ' to see it in action. Few issues remained: * completion interrupts after encountering ':' in listed option, like in 'MAJ:MIN' in lsblk, losetup. * lscpu completion is broken: it inserts space after '--extended', but lscpu assumes there is no space after this option. It also doesn't complete '--parse' option. * some completion options are outdated (for example, lscpu MMHZ). We need to sync them with code. Fix for lscpu follows. Signed-off-by: Boris Egorov bash-completion/chcpu | 32 ++++++++++++++++++++++---------- bash-completion/findmnt | 16 ++++++++++++---- bash-completion/losetup | 14 ++++++++++---- bash-completion/lsblk | 30 +++++++++++++++++++++--------- bash-completion/lscpu | 33 ++++++++++++++++----------------- bash-completion/lslocks | 14 ++++++++++---- bash-completion/partx | 15 +++++++++++---- bash-completion/prlimit | 14 ++++++++++---- bash-completion/setpriv | 28 ++++++++++++++++++++-------- bash-completion/swapon | 14 ++++++++++---- bash-completion/taskset | 16 +++++++++++----- bash-completion/wdctl | 14 ++++++++++---- bash-completion/zramctl | 14 ++++++++++---- 13 files changed, 173 insertions(+), 81 deletions(-) commit cf470183ea4a45d170e22aaac8c2397f5ffb0f35 Author: Sami Kerola Date: Fri Dec 26 12:37:36 2014 +0000 script: use poll() rather than select() Finalize the signalfd() change by adding file descriptors to poll() loop. Addresses: https://github.com/karelzak/util-linux/pull/62 CC: Wolfgang Richter CC: Ruediger Meier Signed-off-by: Sami Kerola term-utils/script.c | 202 +++++++++++++++++++++++++++++----------------------- 1 file changed, 114 insertions(+), 88 deletions(-) commit cc1a88fb59474642fe848491f404890eff1fa5ab Author: Sami Kerola Date: Fri Dec 26 11:51:00 2014 +0000 script: use signalfd() to catch signals This is incomplete change. Working command requires the subsequent select() to poll() change as well. Addresses: https://github.com/karelzak/util-linux/pull/62 CC: Wolfgang Richter CC: Ruediger Meier Signed-off-by: Sami Kerola term-utils/script.c | 47 ++++++++++++++--------------------------------- 1 file changed, 14 insertions(+), 33 deletions(-) commit edc7e420760e82d91f62e93bde5e472055f8e2a6 Author: Sami Kerola Date: Sat Dec 20 01:05:49 2014 +0000 script: add struct script_control and remove global variables Fix also couple indentation issues. Signed-off-by: Sami Kerola term-utils/script.c | 493 ++++++++++++++++++++++++++-------------------------- 1 file changed, 249 insertions(+), 244 deletions(-) commit 93af8d8bf3e59c881f08999848ddf3a25f7d1867 Author: Sami Kerola Date: Sat Dec 20 00:02:42 2014 +0000 script: remove function prototypes Signed-off-by: Sami Kerola term-utils/script.c | 499 +++++++++++++++++++++++++--------------------------- 1 file changed, 243 insertions(+), 256 deletions(-) commit 6a40c65f81d393667bb7059be7d89eaf5cc99791 Author: Sami Kerola Date: Sun May 24 18:14:58 2015 +0100 tests: check script options work as expected Options --flush and --timing remain unchecked, as I do not have an idea how to check them reliably. Signed-off-by: Sami Kerola term-utils/Makemodule.am | 5 +++ term-utils/script.c | 21 +++++++++++-- tests/commands.sh | 1 + tests/expected/script/options | 0 tests/expected/script/options-append | 8 +++++ tests/expected/script/options-force | 14 +++++++++ tests/expected/script/options-quiet | 4 +++ tests/expected/script/options-return | 16 ++++++++++ tests/ts/script/options | 60 ++++++++++++++++++++++++++++++++++++ 9 files changed, 127 insertions(+), 2 deletions(-) commit d9f50441e15f2ec7fe93f0493a788cbd6f7e86b2 Author: Sami Kerola Date: Sun May 24 17:48:05 2015 +0100 tests: add script output buffering race check Regression check to a fix by Stanislav Brabec. Reference: 0b285b84b2f14339fd86857244654ba25fac7d73 CC: Stanislav Brabec Signed-off-by: Sami Kerola tests/expected/script/buffering-race | 3 +++ tests/ts/script/buffering-race | 26 ++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) commit 6a768b55165f8b09bf95fc018b771261ddf64084 Author: Karel Zak Date: Fri Jun 5 11:58:42 2015 +0200 libsmartcols: keep JSON field names lower-case Signed-off-by: Karel Zak include/carefulputc.h | 10 ++++++++-- libsmartcols/src/table_print.c | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) commit b3a2e889dff3f7c1503aa164a1471fc8145cb558 Author: Karel Zak Date: Fri Jun 5 10:45:15 2015 +0200 lslocks: add --json Signed-off-by: Karel Zak misc-utils/lslocks.8 | 3 +++ misc-utils/lslocks.c | 22 ++++++++++++++++++++-- 2 files changed, 23 insertions(+), 2 deletions(-) commit 4827093d4b3090389ae0cabb7d8b522cf794ef90 Author: Karel Zak Date: Fri Jun 5 10:30:52 2015 +0200 losetup: add --json Signed-off-by: Karel Zak libsmartcols/src/table_print.c | 17 +++++++++++------ sys-utils/losetup.8 | 5 ++++- sys-utils/losetup.c | 18 +++++++++++++++++- 3 files changed, 32 insertions(+), 8 deletions(-) commit 8449f2cb598d82c6d1b5d09f6d71c896599263ed Author: Karel Zak Date: Fri Jun 5 09:47:59 2015 +0200 findmnt: add --json Signed-off-by: Karel Zak misc-utils/findmnt.8 | 3 +++ misc-utils/findmnt.c | 19 +++++++++++++++---- 2 files changed, 18 insertions(+), 4 deletions(-) commit 4a102a4871fdb415f4de5af9ffb7a2fb8926b5d1 Author: Karel Zak Date: Thu Jun 4 15:49:52 2015 +0200 lsblk: add --json Signed-off-by: Karel Zak misc-utils/lsblk.8 | 3 +++ misc-utils/lsblk.c | 16 ++++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) commit 2a6cfc1361e793c595f53987b83506382caa2d9b Author: Karel Zak Date: Thu Jun 4 15:47:21 2015 +0200 libsmartcols: add JSON output format Signed-off-by: Karel Zak libsmartcols/docs/libsmartcols-sections.txt | 3 + libsmartcols/src/libsmartcols.h.in | 3 + libsmartcols/src/libsmartcols.sym | 10 +- libsmartcols/src/smartcolsP.h | 15 ++- libsmartcols/src/table.c | 66 ++++++++++- libsmartcols/src/table_print.c | 169 ++++++++++++++++++++++++---- 6 files changed, 242 insertions(+), 24 deletions(-) commit 1280109fdc9edfc5c0a40b04568404cdd548bfd0 Author: Ronny Chevalier Date: Wed Jun 3 13:21:52 2015 +0200 libmount: (docs) fix wording Signed-off-by: Ronny Chevalier libmount/src/monitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8b1333423a3e835a48242f74053319404f4fabea Author: Ronny Chevalier Date: Wed Jun 3 13:06:59 2015 +0200 libmount: (docs) fix typo Signed-off-by: Ronny Chevalier libmount/src/monitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 362f5d203581e895005b91383ea7b1affafd8eba Author: Karel Zak Date: Wed Jun 3 12:05:09 2015 +0200 losetup: print more usable error message on failed -f Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1215370 Signed-off-by: Karel Zak sys-utils/losetup.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 28cdf9c61206034b733bf5dcbdea179b8238271f Author: Karel Zak Date: Wed Jun 3 10:59:35 2015 +0200 libmount: do not call umount helper on --fake The umount. helpers does not support --fake option and it does not make sense to call the helpers at all. All we need is to remove mtab/utab entries. Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1172297 Signed-off-by: Karel Zak libmount/src/context.c | 6 +++--- libmount/src/context_umount.c | 6 ++++++ sys-utils/umount.8 | 5 +++-- 3 files changed, 12 insertions(+), 5 deletions(-) commit 6d9b1c19eabff1b1a42f1e8e75695f3278c6bceb Author: Karel Zak Date: Tue Jun 2 14:52:56 2015 +0200 lscpu: add warning for __SANITIZE_ADDRESS__ Signed-off-by: Karel Zak sys-utils/lscpu.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit a680b2abe725f4d52403652688a94490f2023752 Author: Cristian Rodríguez Date: Sat May 30 15:51:41 2015 -0300 sys-utils: lscpu segfaults when built with -fsanitize=address This is expected and a false positive, exclude the vmware detection trick when __SANITIZE_ADDRESS__ is defined. sys-utils/lscpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a79b7cab66147dd3a7d072e076796c6cd580a593 Author: Stanislav Brabec Date: Thu May 28 17:41:39 2015 +0200 lsblk.8: Fix description of output format Signed-off-by: Stanislav Brabec misc-utils/lsblk.8 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 08e193e1e468f3f570e686f7e495b21fa47ba661 Author: Karel Zak Date: Mon Jun 1 13:17:41 2015 +0200 libmount: fix mnt_monitor_event_cleanup() We have to call epoll to drain mountinfo events too. The problem is visible if the monitor epoll FD is within another (top-level) epoll. Signed-off-by: Karel Zak libmount/src/monitor.c | 39 ++++++++++++++++++++++++++------------- 1 file changed, 26 insertions(+), 13 deletions(-) commit 92441d5c1e44ec9c378ccd2660f913bd143f3832 Author: Karel Zak Date: Fri May 29 10:55:01 2015 +0200 lsblk: use internally sysfs devnames It seems better to keep the strange sysfs devnames internally and translate to real devnames only on output or when we read from /dev. Signed-off-by: Karel Zak lib/sysfs.c | 6 ++++-- misc-utils/lsblk.c | 9 ++++----- 2 files changed, 8 insertions(+), 7 deletions(-) commit d5dbd57b2294d177264705214bca433e85d79ab6 Author: Karel Zak Date: Thu May 28 12:28:23 2015 +0200 docs: fix gtk-docs related warnings Signed-off-by: Karel Zak libblkid/docs/libblkid-docs.xml | 2 +- libblkid/src/probe.c | 2 -- libfdisk/docs/libfdisk-docs.xml | 2 +- libfdisk/docs/libfdisk-sections.txt | 3 +++ libmount/docs/libmount-docs.xml | 2 +- libmount/docs/libmount-sections.txt | 1 + libsmartcols/docs/libsmartcols-docs.xml | 2 +- 7 files changed, 8 insertions(+), 6 deletions(-) commit 6c62abc42bb1c2aad60d0da1ce3f7498ac48cd1b Author: Karel Zak Date: Thu May 28 12:09:41 2015 +0200 lib/sysfs: rename devname functions, cleanup Well, I don't have mental power to use function names like sysfs_devname_to_dev_name() so this patch renames to sysfs_devname_sys_to_dev() sysfs_devname_dev_to_sys() It also cleanups usage of the functions. We have to be sure that sysfs.c code returns regular devnames. The existence of the sysfs devnames (with '!') should be completely hidden in sysfs specific code. Signed-off-by: Karel Zak include/sysfs.h | 13 +++++-------- lib/sysfs.c | 34 +++++++++++++++++++++++++--------- libblkid/src/devno.c | 1 - misc-utils/lsblk.c | 19 +++++++++++-------- 4 files changed, 41 insertions(+), 26 deletions(-) commit 759b120d85c30ec6ab80097c251677b022c5a03c Author: Stanislav Brabec Date: Wed May 27 15:12:08 2015 +0200 lib/sysfs: Fix /dev to /sys node name translation d0dc6c1 introduced translation of /sys names to /dev names, as required by the kernel linux/drivers/base/core.c: device_get_devnode(). But there are other places of code that use /dev names in /sys. They need reverse translation from '/' to '!'. For example, fdisk -l returns empty list since a22c6eb for device nodes in subdirectories (used e. g. by cciss driver). Introduce yet another helper sysfs_dev_name_to_devname() and use it where appropriate. Signed-off-by: Stanislav Brabec include/sysfs.h | 20 +++++++++++++++++++- lib/sysfs.c | 8 ++++++-- 2 files changed, 25 insertions(+), 3 deletions(-) commit 97c68d42041bb8761568f988b27cbfc470f6fb7d Author: Stanislav Brabec Date: Tue May 26 17:59:29 2015 +0200 libfdisk: Use predictable /dev/mapper partition names for /dev/dm-N It is impossible to predict /dev/dm-N partition names. Use predictable and better readable /dev/mapper names instead. [kzak@redhat.com: - remove if-before-free] Signed-off-by: Stanislav Brabec Signed-off-by: Karel Zak libfdisk/src/utils.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit 8b5940be9665b65cf3fcf4b6f3776470cf59509c Author: Stanislav Brabec Date: Mon May 25 21:17:52 2015 +0200 Use correct partition names for /dev/mapper The default configuration of multipath-tools appends "-partN" to partition nodes. Follow this conventions and do the same. It fixes for example fdisk -l /dev/mapper/name_of_the_device. Note that the current implementation only partially fixes the problem. It does not reflect any udev configuration changes, as udev does not provide any function to return names of future (or current) partitions of a particular device. It also does not fix fdisk -l /dev/dm-0. Signed-off-by: Stanislav Brabec libfdisk/src/utils.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit d0dc6c17c5025639a7beef8d52792932fd8da0fc Author: Stanislav Brabec Date: Mon May 25 18:21:36 2015 +0200 Fix /sys to /dev node name translation linux/drivers/base/core.c: device_get_devnode() defines a translation of '!' in sysfs nodes to '/' in /dev nodes. The same translation has to be done to properly support device nodes with slash (e. g. device nodes of cciss driver and several other drivers). Introduce new helper sysfs_devname_to_devno() and use it where appropriate. Fixes for example lsblk -f on devices using cciss driver. Signed-off-by: Stanislav Brabec include/sysfs.h | 18 ++++++++++++++++++ lib/sysfs.c | 2 ++ libblkid/src/devno.c | 1 + misc-utils/lsblk.c | 1 + 4 files changed, 22 insertions(+) commit 687cc5d58942b24a9f4013c68876d8cbea907ab1 Author: Karel Zak Date: Tue May 26 10:32:38 2015 +0200 hwclock: don't allow non-root access Fortunately very few people are crazy enough to install hwclock as setuid. Some comments in code and unfortunately also man page advertising that setuid is no problem. That's pretty stupid promise. The code quality is poor and it's obviously not designed to be secure (things like popen() without drop privileges, etc.). This patch removes all notes about "setuid support" and for sure disable hwclock execution for non-root users. Addresses: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=786804 Signed-off-by: Karel Zak sys-utils/hwclock.8.in | 15 --------------- sys-utils/hwclock.c | 34 +++++----------------------------- 2 files changed, 5 insertions(+), 44 deletions(-) commit d681e0956cdca1a016346424939fe1b9c6a0a549 Author: Karel Zak Date: Mon May 25 15:24:13 2015 +0200 sulogin: don't use strcpy(), enlarge pwd line buffer * according to "man getpwnam" 16384 bytes is enough to store one passwd entry (let's use 2*BUFSIZE to avoid magic numbers in code) * don't use strcpy() to set empty password Signed-off-by: Karel Zak login-utils/sulogin.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 17d710346a806d4c358248a09843fe9fe32d15e5 Author: Karel Zak Date: Fri May 22 12:43:33 2015 +0200 build-sys: add --without-* for all libs It's necessary for people who want to compile util-linux in very unusual environment and disable as much as possible dependencies. For example distro bootstrap. References: https://bugzilla.redhat.com/show_bug.cgi?id=1223894 Signed-off-by: Karel Zak configure.ac | 72 ++++++++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 55 insertions(+), 17 deletions(-) commit 5ec4a890a1a4218d29d88539c8428921de025a6c Author: Karel Zak Date: Thu May 21 13:13:49 2015 +0200 blkid: another hint to the man page Signed-off-by: Karel Zak misc-utils/blkid.8 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit f36522da5ffce1205ddfd9ac84d2cfef4807a9b0 Author: Karel Zak Date: Thu May 21 12:37:18 2015 +0200 blkid: be more precise in the man page Signed-off-by: Karel Zak misc-utils/blkid.8 | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit f8098e2b2c0a8a98ccb603f53dfba0cc05683a39 Author: Karel Zak Date: Thu May 21 12:14:32 2015 +0200 blkid: don't ignore info about partitions on non-formated devices  # blkid -p /dev/sdc1; echo $? 2 but libblkid provides information about partition, fixed version: # blkid -p /dev/sdc1; echo $? /dev/sdc1: PART_ENTRY_SCHEME="dos" PART_ENTRY_UUID="4c1e518c-01" PART_ENTRY_TYPE="0x83" PART_ENTRY_NUMBER="1" PART_ENTRY_OFFSET="2048" PART_ENTRY_SIZE="1021952" PART_ENTRY_DISK="8:32" 0 Signed-off-by: Karel Zak misc-utils/blkid.c | 15 --------------- 1 file changed, 15 deletions(-) commit 6ddccd0d6e17d2cb0495be6f0154e32239a77f6b Author: Karel Zak Date: Tue May 19 14:40:42 2015 +0200 docs: update TODO Signed-off-by: Karel Zak Documentation/TODO | 3 --- 1 file changed, 3 deletions(-) commit fddfd4e08b72aa39d577696ce0dc1b20f973bc29 Author: Georg Schiesser Date: Tue May 5 13:19:51 2015 +0200 build-sys: support unshare.static This patch adds support for building a static version of unshare. We need to add unshare to the list of possible static programs, and provide build flags for the compiler and linker, which are equivalent to the flags of the non-static program, except additional static linking. See also: commit 2fa60c5 build-sys: support nsenter.static Signed-off-by: Georg Schiesser configure.ac | 2 +- sys-utils/Makemodule.am | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) commit c5ad7b59acc8b12fa2c10624bbf12dc20910f88d Author: Sami Kerola Date: Sun May 17 18:27:42 2015 +0100 cal: fix January 1753 week number printout Earlier output was clearly broken. $ cal -w 1 1753 January 1753 Su Mo Tu We Th Fr Sa 51 1 2 3 4 5 6 52 7 8 9 10 11 12 13 52 14 15 16 17 18 19 20 52 21 22 23 24 25 26 27 52 28 29 30 31 Signed-off-by: Sami Kerola misc-utils/cal.c | 2 +- tests/expected/cal/jan1753 | 19 +++++++++++++++++++ tests/ts/cal/jan1753 | 43 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 63 insertions(+), 1 deletion(-) commit bffc9174b89d8d9fefe7a77b9350ab8f0dbef54f Author: Karel Zak Date: Mon May 18 11:30:56 2015 +0200 zramctl: add MEM-LIMIT, MEM-USED and MIGRATED columns Signed-off-by: Karel Zak sys-utils/zramctl.c | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) commit 5388c862607ec4f25f3e7ad23ab858b696bde1a1 Author: Karel Zak Date: Mon May 18 11:13:44 2015 +0200 zramctl: support /sys/block/zram/mm_stat Linux >= 4.1 provides all memory related statistics by one file. Signed-off-by: Karel Zak sys-utils/zramctl.c | 91 +++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 78 insertions(+), 13 deletions(-) commit 548b9714e82ec7aca28958f5d5c2927a9b134fbe Author: Karel Zak Date: Fri May 15 14:57:04 2015 +0200 lib/strv: add new functions (from systemd) Signed-off-by: Karel Zak include/Makemodule.am | 1 + include/strutils.h | 4 + include/strv.h | 54 +++++++ lib/Makemodule.am | 1 + lib/strutils.c | 100 +++++++++++++ lib/strv.c | 392 ++++++++++++++++++++++++++++++++++++++++++++++++++ lib/sysfs.c | 3 +- 7 files changed, 554 insertions(+), 1 deletion(-) commit 8fdc064ac3a0b302d8a90f1d80b2feb89ad7f064 Author: Stanislav Brabec Date: Thu May 14 17:55:56 2015 +0200 script: Fix mangled EOF and hang on big endian On s390 and other big endian machines, doinput() sends NUL instead of EOF to the tty master. NUL does not even reach the slave, and it is waiting for more data forever. If STDIN is not a tty, the bug caused "^@" being into the log, and since commit 032228c it also causes hang. Signed-off-by: Stanislav Brabec term-utils/script.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a19876310ed96fd173958c36b1a5a48ebf5397da Merge: 9200391 be8d50f Author: Karel Zak Date: Wed May 13 15:08:04 2015 +0200 Merge branch 'test-fixes' of https://github.com/rudimeier/util-linux * 'test-fixes' of https://github.com/rudimeier/util-linux: tests: fix kill/all_processes tests: add $top_builddir to $PATH commit 9200391d41969a1915fae43dd8904ef3e126fd48 Author: Karel Zak Date: Wed May 13 15:06:22 2015 +0200 tests: update lscpu tests (due to CPU flags in output) Signed-off-by: Karel Zak tests/expected/lscpu/lscpu-s390-kvm | 1 + tests/expected/lscpu/lscpu-s390-lpar | 1 + tests/expected/lscpu/lscpu-s390-zvm | 1 + tests/expected/lscpu/lscpu-sparc64 | 1 + tests/expected/lscpu/lscpu-vbox-win | 1 + tests/expected/lscpu/lscpu-x86_64-64cpu | 1 + tests/expected/lscpu/lscpu-x86_64-dell_e4310 | 1 + 7 files changed, 7 insertions(+) commit ee1f1057e25d3cce300664ea449eea4fe6deb7ff Author: WANG Chao Date: Wed May 13 11:15:05 2015 +0800 lscpu: add cpu flags entry to summary output It'd be convenient to have unified cpu "Flags: " entry in the summary output. Signed-off-by: WANG Chao sys-utils/lscpu.c | 3 +++ 1 file changed, 3 insertions(+) commit c1be496a932c9eeada42bb646fe32e77fbcd0784 Author: Karel Zak Date: Mon May 11 13:01:26 2015 +0200 libfdisk: keep FDISK_FIELD_CYLINDERS independent on context mode Signed-off-by: Karel Zak libfdisk/src/partition.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 6360bccad5c42cf1e1a4bf83369c0979edf82ec9 Author: Karel Zak Date: Mon May 11 12:45:21 2015 +0200 fdisk: provide more information by 'i'nfo command Signed-off-by: Karel Zak disk-utils/fdisk.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 31ea7fa6d4f978db37cd0efb08d006ca2f1bec6b Author: Karel Zak Date: Mon May 11 12:42:24 2015 +0200 libfdisk: add fdisk_label_get_fields_ids_all() The current fdisk_label_get_fields_ids() is too smart as it differentiate between details mode etc. It's useful for default output, but in some cases it's better to provide all output fields. Signed-off-by: Karel Zak libfdisk/docs/libfdisk-sections.txt | 1 + libfdisk/src/label.c | 41 +++++++++++++++++++++++++++++++++++++ libfdisk/src/libfdisk.h.in | 5 +++++ libfdisk/src/libfdisk.sym | 11 +++++----- 4 files changed, 53 insertions(+), 5 deletions(-) commit 3e3b51b3b137a868a181f05c51edd7e9a5304ab3 Author: Jean-Loup 'clippix' Bogalho Date: Sat May 9 23:15:23 2015 +0200 fdisk: add the 'i'nfo command Add the 'i'nfo command to fdisk that prints details about a specific partition. Details are everything the function 'fdisk_label_get_field' can return. Signed-off-by: Jean-Loup 'clippix' Bogalho disk-utils/fdisk-menu.c | 4 ++++ disk-utils/fdisk.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ disk-utils/fdisk.h | 2 ++ 3 files changed, 50 insertions(+) commit 71af1c7239e59f11ee70b4995dab5b55b55e8f39 Author: Karel Zak Date: Mon May 11 12:18:12 2015 +0200 tests: add hexdump from GPT * use hardcoded UUIDs for partitions in sfdisk GPT test * output hexdump of the GPT header (it would be possible to use MD5 sum, but from hexdump it's more obvious where is problem) Signed-off-by: Karel Zak tests/expected/sfdisk/gpt-attrs | 1105 +++++++++++++++++++++++++++++++++++++++ tests/ts/sfdisk/gpt | 6 + 2 files changed, 1111 insertions(+) commit 159652d9378ac418e25fc44f40bb4dc0cdc9ced3 Author: Ruediger Meier Date: Fri May 8 13:39:53 2015 +0200 libfdisk: (gpt) fix attributes endianess The new libfdisk/gpt test (4a4a0927) discovered that we read and write partition attributes wrongly on BE systems. Our temporarily used char[8] bits are always LE and do not need to be converted. CC: Michael Marineau Signed-off-by: Ruediger Meier libfdisk/src/gpt.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit be8d50fe3517bcb7130b7db0c4bcc3f090b79142 Author: Ruediger Meier Date: Thu May 7 15:20:47 2015 +0200 tests: fix kill/all_processes We have to wait for the killed helper. Signed-off-by: Ruediger Meier tests/ts/kill/all_processes | 3 +++ 1 file changed, 3 insertions(+) commit 4ba0bfbb5102dccd2d3b82a8f1aff63fe900ee4f Author: Ruediger Meier Date: Mon Apr 13 15:51:02 2015 +0200 tests: add $top_builddir to $PATH Since we have dropped some more hardcoded search paths we should make sure that our tested binaries would use the right helpers from our build directory. See 07b51567 and follow-up commits. Signed-off-by: Ruediger Meier tests/functions.sh | 3 +++ 1 file changed, 3 insertions(+) commit b3f5d0bc2807a8d1cfbafd0fcc534845cd8fc661 Author: Karel Zak Date: Wed May 6 16:43:35 2015 +0200 Revert "travise: try to add coverity_scan" This reverts commit 3053e14997194849b17a7dae3d4a0366a52c6b45. .travis.yml | 14 -------------- 1 file changed, 14 deletions(-) commit 3053e14997194849b17a7dae3d4a0366a52c6b45 Author: Karel Zak Date: Wed May 6 16:16:17 2015 +0200 travise: try to add coverity_scan Signed-off-by: Karel Zak .travis.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit b5575bc08cc778e522c793b0b909c6333a4bc503 Author: Brad Forschinger Date: Tue May 5 11:51:24 2015 +1000 flock: NULL deref cmd_argv[2] will be initialised only if it's specificed with -c. NULL deref otherwise resulting in crash. Signed-off-by: Brad Forschinger sys-utils/flock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1eb19118939857152a63629dd85ed7a3f91dced8 Author: Mike Frysinger Date: Sun May 3 23:51:04 2015 -0400 build-sys: fix parallel builds w/setarch links The symlink generation tries to write to the sys-utils/ subdir but does not make sure that dir exists. This can sometimes lead to parallel build failures when building out-of-tree like: ... echo ".so man8/setarch.8" > sys-utils/linux64.8 /bin/bash: sys-utils/linux64.8: No such file or directory Makefile:11503: recipe for target 'sys-utils/linux64.8' failed make: *** [sys-utils/linux64.8] Error 1 References: https://bugs.gentoo.org/511812 Signed-off-by: Mike Frysinger sys-utils/Makemodule.am | 1 + 1 file changed, 1 insertion(+) commit 4a4a0927c6b761f7b8b29b00491b22b3553720e8 Author: Michael Marineau Date: Sat May 2 15:52:48 2015 -0700 libfdisk: (gpt) add API for raw partition attributes The existing APIs can only toggle individual bits or get and set bits in a complex text representation, making it impractical to use libfdisk for manipulating the GPT partition attribute field in more complex ways such as updating a value that is multiple bits wide. For example priority based partition selection originally designed for ChromeOS includes two integer values that are 4-bits wide. http://www.chromium.org/chromium-os/chromiumos-design-docs/disk-format#TOC-Trusting-the-GPT [kzak@redhat.com: - add new symbols to .sym file and docs - remove unused variables from test program] Signed-off-by: Michael Marineau Signed-off-by: Karel Zak libfdisk/docs/libfdisk-sections.txt | 2 + libfdisk/src/Makemodule.am | 6 ++ libfdisk/src/gpt.c | 126 +++++++++++++++++++++++++++++++ libfdisk/src/libfdisk.h.in | 2 + libfdisk/src/libfdisk.sym | 2 + tests/commands.sh | 1 + tests/expected/libfdisk/gpt-all-defaults | 21 ++++++ tests/expected/libfdisk/gpt-getattr | 2 + tests/expected/libfdisk/gpt-setattr | 2 + tests/ts/libfdisk/gpt | 52 +++++++++++++ 10 files changed, 216 insertions(+) commit c6bf5c094d90a8a67317ac0fe5b685e7c2b54199 Author: Michael Marineau Date: Fri May 1 21:44:33 2015 -0700 libfdisk: (gpt) fix check for beginning of protective partition Search for the protective partition before attempting to validate that it covers the GPT header. Some hybrid MBRs list partitions out of order. For example, CoreOS images ship with a hybrid MBR that lists the boot partition first and the protective partition second in order to maintain compatibility with old versions of Xen's PV-GRUB. Signed-off-by: Michael Marineau libfdisk/src/gpt.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit d60d5b74d2b0ff0f58ea445d93d328e76f2cb498 Author: Stanislav Brabec Date: Wed Apr 29 18:49:47 2015 +0200 fsck: Fix parsing of -r Fix regression introduced by commit 658c089: -r cannot be used as a last option: fsck -r /dev/sda1 fsck: invalid argument -r: '/dev/sda1' Signed-off-by: Stanislav Brabec disk-utils/fsck.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 628a4efa276de11fca82bca0e303d322bda87f33 Author: Karel Zak Date: Tue Apr 28 14:04:15 2015 +0200 docs: fix TODO typos Signed-off-by: Karel Zak Documentation/TODO | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f7fdd3da3f92afa9a9fc7c450c000a1e9fba6472 Author: Karel Zak Date: Tue Apr 28 14:00:28 2015 +0200 docs: update TODO Signed-off-by: Karel Zak Documentation/TODO | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) commit 658c089190cda060bb7c7e24243cffb0b2776c15 Author: Karel Zak Date: Tue Apr 28 13:43:14 2015 +0200 fsck: print errors on invalid -r argument The patch also add support for -r 0. Signed-off-by: Karel Zak disk-utils/fsck.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) commit 07c09a29eaf359f75a8adf8bb0320f3f2d97c5cc Author: Stanislav Brabec Date: Mon Apr 27 17:20:55 2015 +0200 fsck: implement fsck -r {fd} Make possible sending of statistics to a dedicated file descriptor. Rationale: When UI is calling fsck from a remote terminal, fsck progress needs to be sent to stdout. It is mixed there with output of statistics, and it is impossible to parse the output to get the statistics. Now it will be possible e. g. with "fsck -C -r 3 /dev/sda1" Note: Code in if and else is intentionally partially duplicated. Current human readable output of floats does not conform to locale conventions, and may be changed in future. But we want to keep machine readable output exactly same as it is now. [kzak@redhat.com: - don't use report_stats_fd globally] Signed-off-by: Stanislav Brabec Signed-off-by: Karel Zak disk-utils/fsck.8 | 13 +++++++++-- disk-utils/fsck.c | 64 ++++++++++++++++++++++++++++++++++++++++++++----------- 2 files changed, 63 insertions(+), 14 deletions(-) commit dffd1f3f57a93c78ecac58556c7bb29302e98e7b Author: Benno Schulenberg Date: Wed Apr 8 10:22:43 2015 +0200 hwclock: fix spelling, punctuation and formatting mistakes in the man page Also improve some wordings. Signed-off-by: Benno Schulenberg sys-utils/hwclock.8.in | 78 ++++++++++++++++++++++++-------------------------- 1 file changed, 38 insertions(+), 40 deletions(-) commit a6e5a415bd42041cbef9d4acc633ba94218e0661 Author: Karel Zak Date: Tue Apr 28 12:27:18 2015 +0200 hwclock: clean up man page header We already use .TQ in another man pages for years and nobody complains, so I guess the fallback is unnecessary. The patch also minimize in-header change-log. We have git for this purpose. Signed-off-by: Karel Zak sys-utils/hwclock.8.in | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) commit 0f9a4b029ff872c7769a2324ddd00333cfb53e71 Author: Benno Schulenberg Date: Tue Mar 17 21:34:51 2015 +0100 hwclock: remove an untrue phrase from the man page Signed-off-by: Benno Schulenberg sys-utils/hwclock.8.in | 5 ----- 1 file changed, 5 deletions(-) commit a03bdbcd2029ed1b002d45a028f6e706845fa566 Author: Karel Zak Date: Mon Apr 27 10:51:33 2015 +0200 fsck: use PATH or fallback to /sbin It's overkill to support all the obscure paths like /sbin/fs.d. We have PATH for customization, that's enough. It still seems like a good idea to keep fsck robust, because it's used by boot scripts/systemd. For this reason fsck fallbacks to "/sbin" if PATH is undefined or empty. Signed-off-by: Karel Zak disk-utils/fsck.8 | 25 ++++++------------------- disk-utils/fsck.c | 16 ++++------------ 2 files changed, 10 insertions(+), 31 deletions(-) commit f1bc59963fb2cf755fa1373c4f86fe8a6bdc2bf8 Author: Mike Frysinger Date: Sun Apr 12 05:06:52 2015 -0400 swapon: search for mkswap via PATH Rather than hardcode /sbin/mkswap all the time, use a normal PATH search. This matches the normal behavior of other tools, and makes local testing easier. Signed-off-by: Mike Frysinger sys-utils/swapon.8 | 2 +- sys-utils/swapon.c | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) commit 07b5156790f329835d7351aa4e803f3d623cde5d Author: Mike Frysinger Date: Sun Apr 12 05:06:51 2015 -0400 mkfs: drop hardcoded search path Rather than maintain a hardcoded search path for looking up tools and override the user's PATH env setting, respect whatever the user has. This matches the convention of just about every other tool out there. It might break on systems that don't have /sbin in their PATH and they try to run /sbin/mkfs directly, but so be it. Signed-off-by: Mike Frysinger disk-utils/mkfs.8 | 16 ++-------------- disk-utils/mkfs.c | 17 +---------------- 2 files changed, 3 insertions(+), 30 deletions(-) commit ff229538902c4dd6d0a552d6a4223f077789dee2 Author: Alexey Galakhov Date: Thu Apr 16 17:26:27 2015 +0200 hwclock: flush stdout in hwclock -c This allows using hwclock -c in automated test scripts that parse its output line-by-line. The standard output is flushed before each 10 second delay. Signed-off-by: Alexey Galakhov sys-utils/hwclock.c | 1 + 1 file changed, 1 insertion(+) commit 165ae38f0d10baf47786e1eff04971da35eca577 Author: J William Piggott Date: Thu Apr 23 19:53:58 2015 -0400 hwclock: Remove TZUTC commit d53f8ecfbf036eddb2aef737dc0973a613d80ced introduced the TZUTC environment variable to facilitate use of the zoneinfo 'right' database. This was incorrect. Either the TZDIR environment variable should be used or a system-wide configuration for the 'right' database should be used. See hwclock(8) POSIX vs 'RIGHT' for more details. TZUTC was undocumented and should be safe to remove. The commit also caused a regression when using musl libc, because when TZUTC is unset getenv() returns a NULL pointer. Reported-by: Isaac Dunham Signed-off-by: J William Piggott sys-utils/hwclock.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit 28f47fd2e0cc76ea2dafd0bd384d8586d4c901e3 Author: Karel Zak Date: Fri Apr 24 17:09:17 2015 +0200 test_uuidd: add comment Signed-off-by: Karel Zak tests/helpers/test_uuidd.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit a539def58999a587fe42f5d42c48f261dcd489a7 Author: Karel Zak Date: Fri Apr 24 15:53:28 2015 +0200 test_uuidd: add pid, tid and idx back to object Signed-off-by: Karel Zak tests/helpers/test_uuidd.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 032776e8b068b7a02b22736f900eb5962b7f8770 Author: Karel Zak Date: Fri Apr 24 15:01:23 2015 +0200 test_uuidd: make objdump more robust Signed-off-by: Karel Zak tests/helpers/test_uuidd.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit adbc73eb61ce80d6d9fd801b6f1e1e3f287c222a Author: Karel Zak Date: Fri Apr 24 14:54:09 2015 +0200 test_uuidd: fix include Signed-off-by: Karel Zak tests/helpers/test_uuidd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit cfa4171a14d9fcea8e99feffd5bb6fba170b7307 Author: Karel Zak Date: Fri Apr 24 14:47:49 2015 +0200 test_uuidd: don't exit on failed pthread_create() Signed-off-by: Karel Zak tests/helpers/test_uuidd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4d5241584f55051329494928349b6e7347d50727 Author: Karel Zak Date: Fri Apr 24 14:47:09 2015 +0200 test_uuidd: don't exit on failed pthread_create() Signed-off-by: Karel Zak tests/helpers/test_uuidd.c | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) commit 1d27cd1193fe48fd4cf01f6faa6ed1b1653bbd0e Author: Karel Zak Date: Fri Apr 24 14:25:30 2015 +0200 test_uuidd: improve readability Signed-off-by: Karel Zak tests/helpers/test_uuidd.c | 146 +++++++++++++++++++++++++-------------------- 1 file changed, 82 insertions(+), 64 deletions(-) commit 179306122c0c49b2eeeb62d4f952c624a1e9bcef Author: Karel Zak Date: Fri Apr 24 13:39:17 2015 +0200 test_uuidd: cleanup counters names Signed-off-by: Karel Zak tests/helpers/test_uuidd.c | 70 +++++++++++++++++++++++----------------------- 1 file changed, 35 insertions(+), 35 deletions(-) commit 7eeb7e1d56494d4eb42c2a944d07dd097a2c4dcf Author: Karel Zak Date: Fri Apr 24 13:35:54 2015 +0200 test_uuidd: cleanup pid usage Signed-off-by: Karel Zak tests/helpers/test_uuidd.c | 48 ++++++++++++++++++++++------------------------ 1 file changed, 23 insertions(+), 25 deletions(-) commit f4be1406a32db3b36452b5d388349674279af717 Author: Karel Zak Date: Fri Apr 24 13:28:12 2015 +0200 test_uuidd: cleanup used types Signed-off-by: Karel Zak tests/helpers/test_uuidd.c | 145 ++++++++++++++++++++++----------------------- 1 file changed, 71 insertions(+), 74 deletions(-) commit 0f2b00ce0a76068e673a0f89a3da0375f04b4263 Author: Karel Zak Date: Fri Apr 24 12:40:51 2015 +0200 test_uuidd: err messages, argv[] parsing and another cleanups Signed-off-by: Karel Zak tests/helpers/Makemodule.am | 2 +- tests/helpers/test_uuidd.c | 328 ++++++++++++++++++-------------------------- 2 files changed, 132 insertions(+), 198 deletions(-) commit 963f128cfa64fdebca2a9916f78c60868af1dea6 Author: Huschaam Hussain Date: Fri Apr 24 11:28:47 2015 +0200 tests: add uuidd test program References: https://bugzilla.redhat.com/show_bug.cgi?id=678306 Signed-off-by: Karel Zak tests/helpers/Makemodule.am | 6 + tests/helpers/test_uuidd.c | 356 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 362 insertions(+) commit e2381bdac86bb5fc27fe12ff9994268ea68888dc Author: Karel Zak Date: Thu Apr 23 15:08:26 2015 +0200 tests: fix sfdisk GPT test The test uses too large last partition, libfdisk checks this problem now. Signed-off-by: Karel Zak tests/expected/sfdisk/gpt-read-dump | 4 ++-- tests/expected/sfdisk/gpt-write-dump | 2 +- tests/ts/sfdisk/gpt | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit 9d9a1b876094fe38c5539f19a57323437b8b8a0d Author: Karel Zak Date: Thu Apr 23 12:32:36 2015 +0200 libfdisk: (gpt) add extra check for First/Last LBA Signed-off-by: Karel Zak disk-utils/sfdisk.c | 5 +++-- libfdisk/src/gpt.c | 15 +++++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) commit fb966a7e1f656e9e5cefe131f37b57eaf63fdb05 Author: Karel Zak Date: Thu Apr 23 11:37:00 2015 +0200 tests: add sfdisk resize tests for GPT Signed-off-by: Karel Zak .../expected/sfdisk/resize-gpt-0-move-up-absolute | 25 +++++++++++++++++++ .../sfdisk/resize-gpt-1-move-down-absolute | 25 +++++++++++++++++++ tests/expected/sfdisk/resize-gpt-10-down-enlarge | 25 +++++++++++++++++++ .../sfdisk/resize-gpt-11-absolute-move-resize | 25 +++++++++++++++++++ tests/expected/sfdisk/resize-gpt-12-reduce-midle | 29 ++++++++++++++++++++++ tests/expected/sfdisk/resize-gpt-13-max-last | 29 ++++++++++++++++++++++ .../expected/sfdisk/resize-gpt-2-move-up-relative | 25 +++++++++++++++++++ .../sfdisk/resize-gpt-3-move-down-relative | 25 +++++++++++++++++++ .../expected/sfdisk/resize-gpt-4-enlarge-absolute | 25 +++++++++++++++++++ tests/expected/sfdisk/resize-gpt-5-reduce-absolute | 25 +++++++++++++++++++ .../expected/sfdisk/resize-gpt-6-enlarge-relative | 25 +++++++++++++++++++ tests/expected/sfdisk/resize-gpt-7-reduce-relative | 25 +++++++++++++++++++ tests/expected/sfdisk/resize-gpt-8-enlarge-all | 25 +++++++++++++++++++ tests/expected/sfdisk/resize-gpt-9-up-preduce | 25 +++++++++++++++++++ tests/ts/sfdisk/resize | 2 +- 15 files changed, 359 insertions(+), 1 deletion(-) commit 7678505292fe4305bae74a7279a6bf22275d3cc9 Author: Karel Zak Date: Thu Apr 23 11:34:05 2015 +0200 libfdisk: (gpt) fix end sector calculation on resize Signed-off-by: Karel Zak libfdisk/src/gpt.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 9b4ffb45656c1430f94aaeb5886a767dd264173c Author: Karel Zak Date: Wed Apr 22 17:15:39 2015 +0200 tests: add sfdisk resize regression tests for MBR Signed-off-by: Karel Zak tests/expected/sfdisk/resize | 0 .../expected/sfdisk/resize-dos-0-move-up-absolute | 25 +++++ .../sfdisk/resize-dos-1-move-down-absolute | 25 +++++ tests/expected/sfdisk/resize-dos-10-down-enlarge | 25 +++++ .../sfdisk/resize-dos-11-absolute-move-resize | 25 +++++ tests/expected/sfdisk/resize-dos-12-reduce-midle | 29 +++++ tests/expected/sfdisk/resize-dos-13-max-last | 29 +++++ .../expected/sfdisk/resize-dos-2-move-up-relative | 25 +++++ .../sfdisk/resize-dos-3-move-down-relative | 25 +++++ .../expected/sfdisk/resize-dos-4-enlarge-absolute | 25 +++++ tests/expected/sfdisk/resize-dos-5-reduce-absolute | 25 +++++ .../expected/sfdisk/resize-dos-6-enlarge-relative | 25 +++++ tests/expected/sfdisk/resize-dos-7-reduce-relative | 25 +++++ tests/expected/sfdisk/resize-dos-8-enlarge-all | 25 +++++ tests/expected/sfdisk/resize-dos-9-up-preduce | 25 +++++ tests/ts/sfdisk/resize | 124 +++++++++++++++++++++ 16 files changed, 482 insertions(+) commit a7c27ff2970e4149829e477521d4110171089982 Author: Karel Zak Date: Wed Apr 22 17:14:28 2015 +0200 libfdisk: fix scriptk parser to support alone signs for example echo "- - - *" | sfdisk /dev/sda1 -N1 Signed-off-by: Karel Zak libfdisk/src/script.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 339ca8416c49553070c54b1f8f1043d59591ab3b Author: Karel Zak Date: Wed Apr 22 17:13:48 2015 +0200 libfdisk: allow to move start to first usable LBA Signed-off-by: Karel Zak libfdisk/src/partition.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 8cf10fd08d6ef81ba49f2a5918c32bb294672338 Author: Karel Zak Date: Tue Apr 21 15:51:45 2015 +0200 libfdisk: add warning to resize function Signed-off-by: Karel Zak libfdisk/src/partition.c | 1 + 1 file changed, 1 insertion(+) commit 98e15beb61d04ad6e7bbfb0378ef1d1dd451c734 Author: Karel Zak Date: Tue Apr 21 14:36:24 2015 +0200 libfdisk: support resize operation in fdisk_set_partition() Note that the resize is not exported by API yet, the only way to use it is sfdisk-like scripts. Signed-off-by: Karel Zak libfdisk/src/partition.c | 241 ++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 227 insertions(+), 14 deletions(-) commit b17c1f14475498d8e1dc6d19792360270572d9d6 Author: Karel Zak Date: Tue Apr 21 14:35:18 2015 +0200 libfdisk: add fdisk_table_get_partition_by_partno() Signed-off-by: Karel Zak libfdisk/docs/libfdisk-sections.txt | 1 + libfdisk/src/libfdisk.h.in | 5 ++++- libfdisk/src/libfdisk.sym | 1 + libfdisk/src/table.c | 34 ++++++++++++++++++++++++++++++++++ 4 files changed, 40 insertions(+), 1 deletion(-) commit 6f163929379ab2eca661e425ddaf5d8238c89379 Author: Karel Zak Date: Tue Apr 21 14:32:31 2015 +0200 libfdisk: fix script parser to support resize operations Signed-off-by: Karel Zak libfdisk/src/fdiskP.h | 15 +++++++++++++++ libfdisk/src/script.c | 30 ++++++++++++++++++++++++++---- 2 files changed, 41 insertions(+), 4 deletions(-) commit ee105ed6f3e5aeef8b01944d8f81296f83e92ac2 Author: Karel Zak Date: Tue Apr 21 14:30:11 2015 +0200 libfdisk: don't resize in label drivers The resize operation has to be implemented on upper layer. Signed-off-by: Karel Zak libfdisk/src/dos.c | 27 --------------------------- libfdisk/src/gpt.c | 9 --------- 2 files changed, 36 deletions(-) commit 43a2b09426731fae8d39f5f71f8637f0e56a0b81 Author: Karel Zak Date: Wed Apr 22 11:52:24 2015 +0200 libfdisk: (gpt) fix LE usage Signed-off-by: Karel Zak libfdisk/src/gpt.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 40b175084ff4c57468fb67600c8c66703e17cd75 Author: Karel Zak Date: Wed Apr 22 11:08:05 2015 +0200 lib/strutils: fix string_add_to_idarray() int vs. size_t The function uses "int" as argument, but for array size (and index) is better to use unsigned type (size_t). If we mix "size_t" in util (e.g. fdisk) and "int" in lib/strutils.c then result is unexpected behavior on ppc64. # sfdisk --list -o DEVICE,START,SIZE /dev/sdb Disk /dev/sdb: 50 MiB, 52428800 bytes, 102400 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 32768 bytes Disklabel type: gpt Disk identifier: 3B8559DB-33AF-43E9-BEFC-C331D829B539 lt-sfdisk: libfdisk/src/label.c:178: fdisk_label_get_field: Assertion `id > 0' failed. The patch cleanup all code to use size_t everywhere. Signed-off-by: Karel Zak disk-utils/fdisk-list.c | 2 +- disk-utils/partx.c | 3 ++- include/strutils.h | 2 +- lib/strutils.c | 5 ++--- misc-utils/findmnt.c | 12 +++++++----- misc-utils/lsblk.c | 14 ++++++++------ misc-utils/lslocks.c | 10 ++++++---- sys-utils/losetup.c | 10 ++++++---- 8 files changed, 33 insertions(+), 25 deletions(-) commit 622be27845d00275fdf24f77918d935f13d18c2e Author: Karel Zak Date: Wed Apr 22 10:20:31 2015 +0200 fdisk, sfdisk: fix -o backend Signed-off-by: Karel Zak disk-utils/fdisk-list.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6f13d7a1b27da596b57dbec57e3f350296bcbc78 Merge: 66f0c7b fffe5f7 Author: Karel Zak Date: Wed Apr 22 10:03:12 2015 +0200 Merge branch 'tests-refactor-loop-cleanup' of https://github.com/rudimeier/util-linux * 'tests-refactor-loop-cleanup' of https://github.com/rudimeier/util-linux: tests: never use -o pipefail tests: loop tests, don't call ts_die() with DEVICE parameter tests: scsi_debug tests, don't call ts_die() with DEVICE parameter tests: introduce TS_LOOP_DEVS for cleanup tests: introduce ts_cleanup_on_exit() commit 66f0c7bb67f2026e6ecd1cdfa48d8542fad198a5 Merge: 9fb890c aac448a Author: Karel Zak Date: Wed Apr 22 09:56:47 2015 +0200 Merge branch 'test-fix' of https://github.com/rudimeier/util-linux commit aac448a80b28f22b42793faf326b1fb68611ec8c Author: Ruediger Meier Date: Wed Apr 22 08:05:47 2015 +0200 tests: config.h lives in build directory Signed-off-by: Ruediger Meier tests/ts/libmount/context | 2 +- tests/ts/libmount/context-py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 9fb890c3c5fccf9a9a02b251dfa5332f427d4c78 Author: J William Piggott Date: Tue Apr 21 16:46:23 2015 -0400 hwclock: remove dead code Removes never used #ifdef dead code. Reported-by: Karel Zak Signed-off-by: J William Piggott sys-utils/hwclock-rtc.c | 14 -------------- 1 file changed, 14 deletions(-) commit efc4eaf4229f78f14430d8739ddef2c5101f05cc Author: J William Piggott Date: Tue Apr 21 16:43:41 2015 -0400 hwclock: regression fix Commit ab8f402952301106ad0bd5c5a51dc8646d1bff64 regression where synchronize_to_clock_tick_rtc() only returns the correct value for a select() time out if using debug mode. This caused hwclock to have invalid output when select() timed out in normal mode. Signed-off-by: J William Piggott sys-utils/hwclock-rtc.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit fffe5f7c72121c054645c60c0bb49f653bb7142e Author: Ruediger Meier Date: Tue Apr 21 10:41:01 2015 +0200 tests: never use -o pipefail It was hard to find out that pipefail was the reason why our test-suite could have random failures for aribtrary tests, for example the ones which are using ts_device_has_uuid() or ts_mount(). Bash's pipefall option is evil! It may return error for such a simple line like this one $ echo -e "xxx\nyyy" | grep -q "xxx" because the left echo command will get SIGPIPE when grep exits after the first match. So the command line above could return an error eventhough it does exactly what we want. This patch removes any pipefail from our tests. The funny thing is that I couldn't find any case where we relied on this feature anyway. Signed-off-by: Ruediger Meier tests/ts/blkdiscard/offsets | 2 -- tests/ts/blkid/md-raid0-whole | 2 -- tests/ts/blkid/md-raid1-whole | 2 -- tests/ts/cal/1m | 1 - tests/ts/cal/1mw | 1 - tests/ts/cal/3m | 1 - tests/ts/cal/3mw | 2 -- tests/ts/cal/bigyear | 1 - tests/ts/cal/bigyearw | 1 - tests/ts/cal/color | 2 -- tests/ts/cal/colorw | 2 -- tests/ts/cal/sep1752 | 1 - tests/ts/cal/sep1752w | 1 - tests/ts/cal/weekarg | 1 - tests/ts/cal/weeknum | 1 - tests/ts/cal/year | 1 - tests/ts/cal/yearw | 1 - tests/ts/cramfs/doubles | 2 -- tests/ts/cramfs/fsck-endianness | 2 -- tests/ts/cramfs/mkfs | 2 -- tests/ts/cramfs/mkfs-endianness | 2 -- tests/ts/fsck/ismounted | 2 -- tests/ts/minix/fsck | 2 -- tests/ts/minix/mkfs | 2 -- tests/ts/mount/devname | 2 -- tests/ts/mount/fslists | 2 -- tests/ts/mount/fstab-broken | 2 -- tests/ts/mount/fstab-devname | 2 -- tests/ts/mount/fstab-devname2label | 2 -- tests/ts/mount/fstab-devname2uuid | 2 -- tests/ts/mount/fstab-label | 2 -- tests/ts/mount/fstab-label2devname | 2 -- tests/ts/mount/fstab-label2uuid | 2 -- tests/ts/mount/fstab-none | 2 -- tests/ts/mount/fstab-symlink | 2 -- tests/ts/mount/fstab-uuid | 2 -- tests/ts/mount/fstab-uuid2devname | 2 -- tests/ts/mount/fstab-uuid2label | 2 -- tests/ts/mount/label | 2 -- tests/ts/mount/regfile | 2 -- tests/ts/mount/rlimit | 2 -- tests/ts/mount/uuid | 2 -- tests/ts/script/race | 2 -- tests/ts/swapon/devname | 2 -- tests/ts/swapon/fixpgsz | 2 -- tests/ts/swapon/fixsig | 2 -- tests/ts/swapon/label | 2 -- tests/ts/swapon/uuid | 2 -- 48 files changed, 85 deletions(-) commit a53e37f9d4c9b7b88f13e44f5c82a0ac92dbfd6a Author: Karel Zak Date: Fri Apr 17 10:32:48 2015 +0200 sfdisk: don't use BLKRRPART to check loopdev usage It seesm that kernel always returns EINVAL for BLKRRPART on loop devices, we call the ioctl to check if nobody else uses the device. Signed-off-by: Karel Zak disk-utils/sfdisk.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 2daf61b734f00e69da576844258d3cc437359604 Author: Karel Zak Date: Thu Apr 16 18:01:32 2015 +0200 tests: add old dump for sfdisk Signed-off-by: Karel Zak tests/expected/sfdisk/dos-dump-gaps | 24 ++++++++++++++++++++++++ tests/expected/sfdisk/dos-dump-old | 23 +++++++++++++++++++++++ tests/ts/sfdisk/dos | 22 +++++++++++++++++++++- tests/ts/sfdisk/files/dump-gaps | 7 +++++++ tests/ts/sfdisk/files/dump-old | 7 +++++++ tests/ts/sfdisk/gpt | 2 +- 6 files changed, 83 insertions(+), 2 deletions(-) commit 2928068a3ced58023c4e80f2b96b8b636d10b720 Author: Karel Zak Date: Thu Apr 16 17:40:28 2015 +0200 sfdisk: accept empty partitions from dump Old sfdisk uses: dev/sdc2 : start= 0, size= 0, Id= 0 for undefined MBR partitions. Let's follow this behaviour. Reported-by: Ruediger Meier Signed-off-by: Karel Zak disk-utils/sfdisk.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) commit 1d2dfb9c30e3a1d788e7ec4a5a6b3ad5a3c2eb57 Author: Ruediger Meier Date: Tue Apr 14 14:54:52 2015 +0200 tests: fix logger device pathname too long $TS_OUTDIR may be too long for sockaddr_un.sun_path. Noticed on travis in distcheck. Signed-off-by: Ruediger Meier tests/ts/logger/errors | 4 +++- tests/ts/logger/formats | 4 +++- tests/ts/logger/options | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) commit f1849be96a2f3baff3a7c3776be2d02af20bea81 Author: Ruediger Meier Date: Tue Mar 31 14:35:07 2015 +0200 tests: loop tests, don't call ts_die() with DEVICE parameter Signed-off-by: Ruediger Meier tests/ts/cramfs/mkfs | 4 ++-- tests/ts/fsck/ismounted | 6 +++--- tests/ts/minix/mkfs | 2 +- tests/ts/mount/devname | 8 ++++---- tests/ts/mount/fslists | 14 +++++++------- tests/ts/mount/fstab-devname | 12 ++++++------ tests/ts/mount/fstab-devname2label | 8 ++++---- tests/ts/mount/fstab-devname2uuid | 8 ++++---- tests/ts/mount/fstab-label | 16 ++++++++-------- tests/ts/mount/fstab-label2devname | 12 ++++++------ tests/ts/mount/fstab-label2uuid | 14 +++++++------- tests/ts/mount/fstab-symlink | 12 ++++++------ tests/ts/mount/fstab-uuid | 16 ++++++++-------- tests/ts/mount/fstab-uuid2devname | 12 ++++++------ tests/ts/mount/fstab-uuid2label | 14 +++++++------- tests/ts/mount/label | 12 ++++++------ tests/ts/mount/remount | 8 ++++---- tests/ts/mount/rlimit | 2 +- tests/ts/mount/shared-subtree | 4 ++-- tests/ts/mount/uuid | 12 ++++++------ tests/ts/swapon/devname | 6 +++--- tests/ts/swapon/fixpgsz | 6 +++--- tests/ts/swapon/fixsig | 8 ++++---- tests/ts/swapon/label | 6 +++--- tests/ts/swapon/uuid | 6 +++--- 25 files changed, 114 insertions(+), 114 deletions(-) commit 5c6834e3b1e6384e0c390ef34864d5ae332fe6b1 Author: Ruediger Meier Date: Tue Mar 31 14:23:30 2015 +0200 tests: scsi_debug tests, don't call ts_die() with DEVICE parameter This was almost useless anyway. Signed-off-by: Ruediger Meier tests/ts/libmount/context | 2 +- tests/ts/libmount/context-py | 2 +- tests/ts/libmount/tabfiles-tags | 4 ++-- tests/ts/libmount/tabfiles-tags-py | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) commit cbae7931c85d232269d45ec6766b293c40cbdb09 Author: Ruediger Meier Date: Tue Mar 31 14:19:40 2015 +0200 tests: introduce TS_LOOP_DEVS for cleanup We are maintaining an array TS_LOOP_DEVS to de-initialize devices always on exit. Until now there was no cleanup in ts_skip(). The downside is that we can't execute ts_device_init() in a subshell anymore. The device is returned via global variable TS_LODEV, similar like we do already in ts_scsi_debug_init(). Tests which don't use ts_device_init() to create loop devices may use ts_register_loop_device() to get them cleaned up later. Signed-off-by: Ruediger Meier tests/functions.sh | 26 ++++++++++++++++++-------- tests/ts/blkdiscard/offsets | 2 +- tests/ts/blkid/md-raid0-whole | 10 ++++------ tests/ts/blkid/md-raid1-whole | 10 ++++------ tests/ts/cramfs/mkfs | 3 +-- tests/ts/fdisk/align-512-512 | 5 ++--- tests/ts/fsck/ismounted | 5 ++--- tests/ts/minix/fsck | 4 ++-- tests/ts/minix/mkfs | 4 ++-- tests/ts/mount/devname | 6 ++---- tests/ts/mount/fslists | 7 ++----- tests/ts/mount/fstab-devname | 5 ++--- tests/ts/mount/fstab-devname2label | 5 ++--- tests/ts/mount/fstab-devname2uuid | 5 ++--- tests/ts/mount/fstab-label | 5 ++--- tests/ts/mount/fstab-label2devname | 5 ++--- tests/ts/mount/fstab-label2uuid | 5 ++--- tests/ts/mount/fstab-symlink | 5 ++--- tests/ts/mount/fstab-uuid | 5 ++--- tests/ts/mount/fstab-uuid2devname | 5 ++--- tests/ts/mount/fstab-uuid2label | 5 ++--- tests/ts/mount/label | 6 ++---- tests/ts/mount/remount | 6 ++---- tests/ts/mount/rlimit | 6 ++---- tests/ts/mount/shared-subtree | 5 ++--- tests/ts/mount/uuid | 6 ++---- tests/ts/swapon/devname | 5 ++--- tests/ts/swapon/fixpgsz | 4 ++-- tests/ts/swapon/fixsig | 5 ++--- tests/ts/swapon/label | 5 ++--- tests/ts/swapon/uuid | 5 ++--- 31 files changed, 80 insertions(+), 105 deletions(-) commit caf31605dda3d19c356b538d68c1572123053aac Author: Ruediger Meier Date: Tue Mar 31 10:54:56 2015 +0200 tests: introduce ts_cleanup_on_exit() ts_cleanup_on_exit() is always called on exit, e.g. after ts_skip, ts_die, ts_finalize ... A first usage example is the cleanup of TS_SUID_PROGS which is now also done on ts_skip. Later we want to fix some left loop devices. Signed-off-by: Ruediger Meier tests/functions.sh | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit f8c0152970221261c52f6604e9e7963b478ebd95 Merge: c84f259 432439a Author: Karel Zak Date: Tue Apr 14 11:52:06 2015 +0200 Merge branch 'tests-logger' of https://github.com/rudimeier/util-linux * 'tests-logger' of https://github.com/rudimeier/util-linux: travis: install socat >= 1.7.2 tests: add subtests for invalid logger devive tests: logger/errors does not use --no-act tests: logger, validate written socket data tests: logger with socat device tests: simplify common logger options logger: --stderr and --no-act turn "auto-errors" on commit c84f2590dfdb8570beeb731e0105f8fe597443d1 Author: Karel Zak Date: Thu Apr 9 11:48:07 2015 +0200 unshare: allow persisting mount namespaces We can create a reference (bind mount) to the new namespace after unshare(2), but it does not make sense to do it within unshared namespace. (And if I read kernel fs/namespace.c: do_loopback() correctly than copy mount bind mounts of /proc//ns/mnt between namespaces is unsupported.) This patch bypass this problem by fork() where parent continue as usually (call unshare(2), setup another things, etc.), but child waits for /proc/[ppid]/ns/mnt inode number change (the ino is changed after parent's unshare(2)) and then it bind mounts the new namespaces and exit. Signed-off-by: Karel Zak sys-utils/unshare.c | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 68 insertions(+), 4 deletions(-) commit 0490a6ca26f6e7bf9eed5521d240661adb302ba2 Author: Karel Zak Date: Thu Apr 9 11:34:02 2015 +0200 unshare: allow persisting namespaces For nsenter(1) we already support namespace specification by file (e.g. bind mount to namespace /proc/[pid]/ns/[type] file). For example: # nsenter --uts=/some/path This patch extends unshare(1) to setup the bind mount for specified namespace, for example # touch /some/path # unshare --uts=/some/path hostname FOO # nsenter --uts=/some/path hostname FOO Note that the problem is mount namespace, because create bind mount to ns/mount file within unshared namespace does not make sense. Based on patch from Lubomir Rintel . Signed-off-by: Karel Zak sys-utils/unshare.1 | 70 +++++++++++++++++++++++++++++----------- sys-utils/unshare.c | 93 ++++++++++++++++++++++++++++++++++++++++++++++------- 2 files changed, 132 insertions(+), 31 deletions(-) commit d1f9c0969eb24d0a5ec5d862bd41b1bd5f3103f0 Author: Cristian Rodríguez Date: Fri Apr 10 15:57:58 2015 -0300 lib/sysfs.c: use fcntl(..F_DUPFD_CLOEXEC) instead of dup(2) "The two descriptors do not share file descriptor flags (the close-on-exec flag). The close-on-exec flag for the duplicate descriptor is off" lib/sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 63f06be7ecb9fe7e894dfd723450127b75da74de Author: Karel Zak Date: Tue Apr 14 11:26:54 2015 +0200 tests: make libmount python context tests sensitive to USE_LIBMOUNT_FORCE_MOUNTINFO Signed-off-by: Karel Zak tests/ts/libmount/context-py | 50 +++++++++++++++++++++++++------------------- 1 file changed, 29 insertions(+), 21 deletions(-) commit 866372c699ab1bdc692ddbb6c27c91dd1e20b4b9 Author: Karel Zak Date: Tue Apr 14 11:26:54 2015 +0200 tests: make libmount context tests sensitive to USE_LIBMOUNT_FORCE_MOUNTINFO Signed-off-by: Karel Zak tests/functions.sh | 2 +- tests/ts/libmount/context | 50 +++++++++++++++++++++++++++-------------------- 2 files changed, 30 insertions(+), 22 deletions(-) commit 9ff89c5d9c6ca57d7fe683ee5d74229198080075 Author: Karel Zak Date: Mon Apr 13 18:11:38 2015 +0200 fdisk: fix typo Signed-off-by: Karel Zak disk-utils/fdisk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aeb9a30ba4e99bfaf33a0986562766d8480a3e4c Author: Karel Zak Date: Mon Apr 13 17:24:45 2015 +0200 fdisk: add --protect-boot Now fdisk erases the begin of the device when create a new disk label, it seems like disadvantage for some use-cases. Reported-by: Jean-Loup 'clippix' Bogalho Signed-off-by: Karel Zak disk-utils/fdisk.8 | 4 ++++ disk-utils/fdisk.c | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) commit 432439a4655d887b03629c7f3ce20ed334467cb4 Author: Ruediger Meier Date: Mon Apr 13 13:29:26 2015 +0200 travis: install socat >= 1.7.2 Signed-off-by: Ruediger Meier .travis-functions.sh | 7 +++++++ 1 file changed, 7 insertions(+) commit 23719c0759ab7e7fce98181f43f7ec4dcf4017fa Author: Ruediger Meier Date: Fri Apr 10 08:28:26 2015 +0200 tests: add subtests for invalid logger devive Note --journald should not complain about invalid sockets. Signed-off-by: Ruediger Meier tests/expected/logger/errors-check_socket | 2 ++ tests/expected/logger/errors-invalid_socket | 2 ++ tests/ts/logger/errors | 4 ++++ tests/ts/logger/journald | 2 +- 4 files changed, 9 insertions(+), 1 deletion(-) commit 307c82f35de265f0ee7021b65c1b23f1e0dcdaad Author: Ruediger Meier Date: Thu Apr 9 20:14:51 2015 +0200 tests: logger/errors does not use --no-act Signed-off-by: Ruediger Meier tests/expected/logger/errors-check_socket | 18 ++++++++++++++++++ tests/ts/logger/errors | 5 ++++- 2 files changed, 22 insertions(+), 1 deletion(-) commit 62656395050fb61c7bb819a699a086e76744f6a8 Author: Karel Zak Date: Mon Apr 13 13:41:10 2015 +0200 sfdisk: enable bootbits protection Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1210428 Signed-off-by: Karel Zak disk-utils/sfdisk.c | 1 + 1 file changed, 1 insertion(+) commit 3457d90e3014b0ec25341c39629583b5655aa97f Author: Karel Zak Date: Mon Apr 13 13:40:25 2015 +0200 libfdisk: support bootbits protection from (p)MBR Signed-off-by: Karel Zak include/pt-mbr.h | 1 + libfdisk/docs/libfdisk-sections.txt | 6 ++- libfdisk/src/context.c | 33 ++++++++++++++++- libfdisk/src/dos.c | 5 ++- libfdisk/src/fdiskP.h | 4 +- libfdisk/src/gpt.c | 6 ++- libfdisk/src/libfdisk.h.in | 2 + libfdisk/src/libfdisk.sym | 2 + libfdisk/src/sgi.c | 2 +- libfdisk/src/sun.c | 2 +- libfdisk/src/utils.c | 73 ++++++++++++++++++++++++++----------- 11 files changed, 106 insertions(+), 30 deletions(-) commit effd66e38e845414afbed19793189672f783c4b1 Author: Ruediger Meier Date: Thu Apr 9 20:14:50 2015 +0200 tests: logger, validate written socket data Actually there should be no data written to the socket because we are always using --no-act. Signed-off-by: Ruediger Meier tests/expected/logger/errors-check_socket | 1 + tests/expected/logger/formats-check_socket | 1 + tests/expected/logger/options-check_socket | 1 + tests/ts/logger/errors | 5 +++++ tests/ts/logger/formats | 5 +++++ tests/ts/logger/options | 5 +++++ 6 files changed, 18 insertions(+) commit c9813f2cbe1f4c92f5ebecdd5a22d9ff94affe82 Author: Ruediger Meier Date: Thu Apr 9 17:12:34 2015 +0200 tests: logger with socat device Signed-off-by: Ruediger Meier tests/functions.sh | 29 +++++++++++++++++++++++++++++ tests/ts/logger/errors | 10 +++++++++- tests/ts/logger/formats | 10 +++++++++- tests/ts/logger/options | 16 ++++++++++++++-- 4 files changed, 61 insertions(+), 4 deletions(-) commit d754d5540fa3e5399f2f46a2781acaa12aa33500 Author: Karel Zak Date: Mon Apr 13 12:08:50 2015 +0200 sfdisk: improve -N warnings Signed-off-by: Karel Zak disk-utils/sfdisk.8 | 9 ++++++++- disk-utils/sfdisk.c | 9 +++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) commit 531dfb14d423ecb2c3284f533745421da5bd189c Author: Karel Zak Date: Mon Apr 13 10:56:03 2015 +0200 tests: add sfdisk resize tests Signed-off-by: Karel Zak tests/expected/sfdisk/dos-resize | 23 +++++++++++++++++++++++ tests/expected/sfdisk/gpt-resize | 23 +++++++++++++++++++++++ tests/ts/sfdisk/dos | 14 ++++++++++++++ tests/ts/sfdisk/gpt | 14 ++++++++++++++ 4 files changed, 74 insertions(+) commit b6a38f27abd802d2fd4a646baf6d8402b527d0b9 Author: Karel Zak Date: Mon Apr 13 10:35:51 2015 +0200 tests: require wipefs for sfdisk/gpt Signed-off-by: Karel Zak tests/ts/sfdisk/gpt | 1 + 1 file changed, 1 insertion(+) commit 4d156d92eb538f9dbc077a2dd181a48d8fdc65cd Author: Karel Zak Date: Mon Apr 13 10:29:00 2015 +0200 libfdisk: (dos) retain existing boot flag when resizing a partition Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1210912 Signed-off-by: Karel Zak Co-Author: awilliam@redhat.com libfdisk/src/dos.c | 8 +++++--- libfdisk/src/partition.c | 3 +-- 2 files changed, 6 insertions(+), 5 deletions(-) commit 582aabe2586cf3674874c1a62ce89c6f85ed32f6 Author: Ruediger Meier Date: Thu Apr 9 17:00:26 2015 +0200 tests: simplify common logger options Signed-off-by: Ruediger Meier tests/ts/logger/errors | 32 ++++++++++++++------------------ tests/ts/logger/formats | 26 ++++++++++++++------------ 2 files changed, 28 insertions(+), 30 deletions(-) commit bcf7e149393ee41af3e092a58dba643c8c091c28 Author: Ruediger Meier Date: Thu Mar 26 14:20:29 2015 +0100 logger: --stderr and --no-act turn "auto-errors" on Signed-off-by: Ruediger Meier misc-utils/logger.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 25156ba16b46803e1ad2a8071bfb3e523c647382 Author: Jörg Jenderek Date: Wed Apr 8 10:24:26 2015 +0200 libfdisk: recognize FAT32 partitions hidden by Acronis software References: http://www.acronis.de/products/trueimage Signed-off-by: Karel Zak Signed-off-by: Jörg Jenderek include/pt-mbr-partnames.h | 1 + include/pt-mbr.h | 1 + 2 files changed, 2 insertions(+) commit 3a87ba647bef94f56d4770270a9cc5fe6fb4f07d Merge: 7800509 2e81d99 Author: Karel Zak Date: Tue Apr 7 15:22:22 2015 +0200 Merge branch 'fix-last' of https://github.com/rudimeier/util-linux * 'fix-last' of https://github.com/rudimeier/util-linux: last, fix race when comparing time stamps last: fix first (current) runlevel line commit 7800509b215139502ccc8e097f916784cda99de6 Author: Max Klinger Date: Tue Apr 7 13:05:39 2015 +0200 cal: add -Y and -n [kzak@redhat.com: - add month_in_row to avoid extra meaning of num_month=-3, - add header_year - add long option for -Y - define conflicts between -Y, -y and -n - remove ctl.yflag] Co-Author: Karel Zak Signed-off-by: Karel Zak misc-utils/cal.1 | 6 ++ misc-utils/cal.c | 201 ++++++++++++++++++++++++++++--------------------------- 2 files changed, 107 insertions(+), 100 deletions(-) commit e8362d50083a31743e8eadd31aed99a36a65cc8b Merge: 0fc7a4f 4c16510 Author: Karel Zak Date: Tue Apr 7 12:42:56 2015 +0200 Merge branch 'test-fixes' of https://github.com/rudimeier/util-linux * 'test-fixes' of https://github.com/rudimeier/util-linux: tests: mount/rlimit tries to restore mtab tests: fix, don't call ts_die from subshell tests: ts_scsi_debug_init() sleeps a bit earlier tests: fix cramfs/mkfs for BE and different pagesizes commit 0fc7a4fbf46e514e3c893583372dbaad579c6eaf Merge: b1c9817 587652b Author: Karel Zak Date: Tue Apr 7 12:31:55 2015 +0200 Merge branch 'fix-tinfo-typo' of https://github.com/rudimeier/util-linux * 'fix-tinfo-typo' of https://github.com/rudimeier/util-linux: build-sys: typo -ltinfo commit b1c9817eff80d250450aa16fc85641c209eacecd Author: Mike Place Date: Tue Apr 7 10:44:50 2015 +0200 whereis: trivial spelling and grammar fix Signed-off-by: Karel Zak misc-utils/whereis.1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c3dd2ecd5fcaf30860d5fcfd74edfd70a3dd7603 Author: Sami Kerola Date: Tue Apr 7 08:58:19 2015 +0100 logger: fix memory leaks Reported-by: Patrick Plagwitz Signed-off-by: Sami Kerola misc-utils/logger.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4a8919a4e5b28a47cd61fc8b774a6eaee943b90e Author: Patrick Plagwitz Date: Mon Apr 6 22:50:46 2015 +0100 logger: generate header when reading message from stdin This change fixes crashing error, that ought not to be simply avoided. $ echo foo | logger -n localhost Segmentation fault (core dumped) If the ctl->hdr is just checked not to be NULL syslog message will not have valid header, so generating such is not optional when reading message from stdin and writing it to remote destination. Reviewed-by: Bernhard Voelker Signed-off-by: Patrick Plagwitz Signed-off-by: Sami Kerola misc-utils/logger.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 890e103559ac89b7a0d7a7a71f198e138650ece1 Author: Karel Zak Date: Fri Apr 3 11:44:24 2015 +0200 wall: do not use a temporary file. The issue with using a temporary file in wall is that wall runs as setgid. This means that an unprivileged user who runs wall can modify wall's temporary files, even if those are mode 0600, so the unprivileged user can edit and effectively suppress the banner. The fix is to simply not use temporary files. [kzak@redhat.com: - rewrite growing string functions - use struct buffer - add buf_print() function] Signed-off-by: Karel Zak Co-Author: Jann Horn term-utils/wall.c | 116 +++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 80 insertions(+), 36 deletions(-) commit 398f7f9d99648d9c0fbc901f921d05aba9301a9a Author: Karel Zak Date: Thu Apr 2 12:30:26 2015 +0200 libmount: add note about flock() to docs Signed-off-by: Karel Zak libmount/src/lock.c | 4 ++++ 1 file changed, 4 insertions(+) commit 4c16510cb9e34531404c431340f7c03ebd4d6a44 Author: Ruediger Meier Date: Thu Apr 2 11:35:29 2015 +0200 tests: mount/rlimit tries to restore mtab Signed-off-by: Ruediger Meier tests/ts/mount/rlimit | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 6dd79fd40ae6a0e58e552769589c9b77ecd543a1 Author: Ruediger Meier Date: Tue Mar 31 16:07:37 2015 +0200 tests: fix, don't call ts_die from subshell Signed-off-by: Ruediger Meier tests/ts/mount/fslists | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 85fca7e5bc80e5b79e104a218d8ca0a906e3b4b0 Author: Ruediger Meier Date: Sat Mar 28 15:32:30 2015 +0100 tests: ts_scsi_debug_init() sleeps a bit earlier Signed-off-by: Ruediger Meier tests/functions.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit a91e0e6a84bee704f9b4886196de94d6b29165ba Author: Ruediger Meier Date: Sat Mar 28 12:34:43 2015 +0100 tests: fix cramfs/mkfs for BE and different pagesizes Signed-off-by: Ruediger Meier tests/expected/cramfs/mkfs | 1 - tests/ts/cramfs/mkfs | 17 ++++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) commit 296dc15c244211e0e2a329286555c5060f337233 Author: Karel Zak Date: Wed Apr 1 12:23:23 2015 +0200 lsblk: don't ignore dependences for partitioned devies The code only lists partitions, but ignore another dependencies on whole-disk device: $ lsblk /dev/sdb NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sdb 8:16 0 298.1G 0 disk └─sdb1 8:17 0 298.1G 0 part $ ls /sys/block/sdb/holders/ dm-0 fixed version: $ lsblk /dev/sdb NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sdb 8:16 0 298.1G 0 disk ├─sdb1 8:17 0 298.1G 0 part └─mpatha 253:0 0 298.1G 0 mpath └─mpatha1 253:1 0 298.1G 0 part Signed-off-by: Karel Zak misc-utils/lsblk.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 92abdcaee05178e18566d43022a66fc77e3800f2 Author: Karel Zak Date: Wed Apr 1 12:06:41 2015 +0200 lsblk: follow kernel for inverse tree For multi-path devices kernel defines dependence between the device and whole-list: $ ls /sys/block/dm-0/slaves/ sdb but lsblk inserts partition into the tree: $ lsblk -s -oNAME,KNAME /dev/dm-1 mpatha1 dm-1 └─mpatha dm-0 └─sdb1 sdb1 <--- ! └─sdb sdb Signed-off-by: Karel Zak misc-utils/lsblk.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 7e786ecae1fff63a1b1b0f9ac37b81e6f9b55123 Author: Karel Zak Date: Wed Apr 1 12:06:15 2015 +0200 lsblk: add debug support Signed-off-by: Karel Zak misc-utils/lsblk.c | 87 +++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 76 insertions(+), 11 deletions(-) commit 3542fc516a983eb2e096b5622df0f9a17e430d36 Author: Karel Zak Date: Tue Mar 31 13:10:17 2015 +0200 cfdisk: cleanup extra partitions info for slang The patch removes problem with getch() on slang, now the code is based on subwin() and extra info window is persistent. A new problem is that slang does not keep sub-window border persistent. I'm going to ignore this slang problem... use ncurses dude! Signed-off-by: Karel Zak disk-utils/cfdisk.c | 53 ++++++++++++++++++----------------------------------- 1 file changed, 18 insertions(+), 35 deletions(-) commit f9c4d13891c1fbf1f8b29abfebe5e6403e2ba427 Author: Karel Zak Date: Mon Mar 30 13:54:08 2015 +0200 build-sys: define cfdisk dependence on open_memstream Signed-off-by: Karel Zak configure.ac | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit a8a55fc9948b9e9c35e7341e4c7e8e451f9226e9 Author: Karel Zak Date: Mon Mar 30 12:52:22 2015 +0200 mount: fix lazytime docs Signed-off-by: Karel Zak sys-utils/mount.8 | 1 - 1 file changed, 1 deletion(-) commit 8c7f073aaeaad3ab9b1775447306776056bf50b8 Author: Karel Zak Date: Mon Mar 30 12:43:45 2015 +0200 libmount: add support for MS_LAZYTIME Signed-off-by: Karel Zak libmount/src/libmount.h.in | 4 ++++ libmount/src/optmap.c | 4 ++++ sys-utils/mount.8 | 27 +++++++++++++++++++++++++++ 3 files changed, 35 insertions(+) commit fcca5f1e18f311f70f7f34a53e513e947343f0de Author: Waldemar Brodkorb Date: Sun Mar 29 15:00:30 2015 +0200 setarch: fix regression for sparc builds With following commit: 5edb0ea6bbd57dd916417737f98c9109dc1ecb5b Sparc cross-compile fails. Signed-off-by: Waldemar Brodkorb sys-utils/setarch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 587652b4f87a62ed9bd63ff4865cf0e4454a3620 Author: Ruediger Meier Date: Sat Mar 28 11:23:53 2015 +0100 build-sys: typo -ltinfo Signed-off-by: Ruediger Meier configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3ba8e422a040c282483803f8ffe6279b93bc6139 Author: Karel Zak Date: Fri Mar 27 15:04:58 2015 +0100 sfdisk: cleanup prompt usage Let's use fgets-like callback only when compiled with readline, otherwise (and also for non-tty) print prompt by printf(). Reported-by: Ruediger Meier Signed-off-by: Karel Zak disk-utils/sfdisk.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) commit dda7fe12acff6613f23c67de15905848b7521767 Author: Ondrej Oprala Date: Fri Feb 20 09:41:19 2015 +0100 cfdisk: provide extra partinfo with "x" The new 'extra' info provides: * filesystem information from libblkid (TYPE, UUID, LABEL) This feature is based on libblkid ability to probe specified area on the device. It allows to probe for filesystems although the partition devices (e.g. /dev/sda2) does not exist. For example from disk image: # cfdisk /home/archive/fs-images/disk.img * additional information from libfdisk (partition UUID, Name, ...) * mount information from libmount (from fstab or mountinfo) Signed-off-by: Ondrej Oprala Signed-off-by: Karel Zak Co-Author: Karel Zak disk-utils/Makemodule.am | 23 +-- disk-utils/cfdisk.8 | 3 + disk-utils/cfdisk.c | 368 +++++++++++++++++++++++++++++++++++++++++++++-- 3 files changed, 372 insertions(+), 22 deletions(-) commit 7298680365d7aa3c0e736e7e5db435aae865da6f Author: Karel Zak Date: Fri Mar 27 13:47:13 2015 +0100 libfdisk: don't return empty strings from fdisk_partition_to_string() Signed-off-by: Karel Zak libfdisk/src/partition.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 30c34afbdc02ad22a833dece1f96454043a406c3 Author: Karel Zak Date: Fri Mar 27 13:46:15 2015 +0100 build-sys: add HAVE_LIBMOUNT Signed-off-by: Karel Zak configure.ac | 3 +++ 1 file changed, 3 insertions(+) commit 0b28c2ec37f356c9333361e5893dcad258e80e24 Author: Karel Zak Date: Fri Mar 27 10:32:24 2015 +0100 build-sys: add TINFO_LIBS_STATIC and use this variable for $READLINE_LIBS_STATIC. Note the patch also moves READLINE checks after TINFO check. Signed-off-by: Karel Zak configure.ac | 55 +++++++++++++++++++++++++++++++------------------------ 1 file changed, 31 insertions(+), 24 deletions(-) commit da99043dc42cbdb963077cb9d8e1c6845db2d1a7 Author: Karel Zak Date: Thu Mar 26 19:05:11 2015 +0100 build-sys: fix READLINE_LIBS_STATIC usage for fdisk Signed-off-by: Karel Zak disk-utils/Makemodule.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 703ab08256d35067381eaf8580b3e92a409f3354 Author: Karel Zak Date: Thu Mar 26 18:21:53 2015 +0100 sfdisk: fix -a vs. -A bug The -A has been originally used for --activate, since v2.26 it's used for --append. This is stupid mistake. This patch reverts the change to: -A, --activate -a, --append Note that --append is a new command line option in v2.26. Addresses: https://bugs.archlinux.org/task/44349 Signed-off-by: Karel Zak disk-utils/sfdisk.8 | 4 ++-- disk-utils/sfdisk.c | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) commit d7030b0441bb58082ee61ff43dbdf41be871674b Author: Karel Zak Date: Thu Mar 26 13:00:24 2015 +0100 docs: document --exclude for tests Signed-off-by: Karel Zak Documentation/howto-tests.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) commit f1e744f283dfb8508783939f38345b8e11f366e0 Author: Ruediger Meier Date: Wed Mar 25 12:09:36 2015 +0100 tests: add documentation about environment variables Introduced in 8e3ac29e, now advertised :) Signed-off-by: Ruediger Meier Documentation/howto-tests.txt | 50 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) commit d06aed236eb2dc7fb8dae97aac0a88b2e9adab34 Author: Ruediger Meier Date: Tue Mar 24 19:37:01 2015 +0100 tests: verify logger return value Signed-off-by: Ruediger Meier tests/expected/logger/errors-id_with_space | 2 + tests/expected/logger/errors-invalid_prio | 1 + tests/expected/logger/errors-kern_priority | 1 + tests/expected/logger/errors-kern_priority_numeric | 1 + tests/expected/logger/errors-rfc5424_exceed_size | 1 + .../logger/errors-rfc5424_msgid_with_space | 1 + tests/expected/logger/errors-tag_with_space | 2 + tests/expected/logger/formats-priorities | 152 +++++++++++++++++++++ tests/expected/logger/formats-rfc3164 | 1 + tests/expected/logger/formats-rfc5424_msgid | 1 + tests/expected/logger/formats-rfc5424_nohost | 1 + tests/expected/logger/formats-rfc5424_notime | 1 + tests/expected/logger/formats-rfc5424_simple | 1 + tests/expected/logger/journald | 1 + .../expected/logger/options-input_file_empty_line | 1 + .../expected/logger/options-input_file_prio_prefix | 1 + tests/expected/logger/options-input_file_simple | 1 + .../expected/logger/options-input_file_skip_empty | 1 + tests/expected/logger/options-log_pid | 1 + tests/expected/logger/options-log_pid_define | 1 + tests/expected/logger/options-log_pid_long | 1 + tests/expected/logger/options-log_pid_no_arg | 1 + tests/expected/logger/options-simple | 1 + tests/ts/logger/errors | 9 ++ tests/ts/logger/formats | 6 + tests/ts/logger/journald | 2 +- tests/ts/logger/options | 1 + 27 files changed, 193 insertions(+), 1 deletion(-) commit ba51d3f453782dce14428e499b370b90f49f25e1 Author: Ruediger Meier Date: Tue Mar 24 09:47:49 2015 +0100 tests: avoid &>> for bash compatibility Signed-off-by: Ruediger Meier tests/ts/fdisk/gpt | 2 +- tests/ts/libmount/utils | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) commit ae9f65a191fd6a691e00ce9c70a53d525eb8261e Author: Ruediger Meier Date: Tue Mar 24 09:37:30 2015 +0100 tests: fix getopt for old glibc Signed-off-by: Ruediger Meier tests/ts/misc/getopt2 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b2ae8c571bcfeaa4e373352debd7c30f68c907db Author: Karel Zak Date: Thu Mar 26 12:09:50 2015 +0100 build-sys: python is optional, don't fail when missing Signed-off-by: Karel Zak configure.ac | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 43cc76e2631f3b0255bb4817d59d98746f1c309b Author: Karel Zak Date: Thu Mar 26 11:50:15 2015 +0100 build-sys: ncurses is optional, don't fail when missing Signed-off-by: Karel Zak configure.ac | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit c8aa62a8dcadcad4e75025bd4e2b90e16d89231c Author: Karel Zak Date: Wed Mar 25 19:32:22 2015 +0100 tests: add --exclude= for run.sh Signed-off-by: Karel Zak tests/run.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 15eba21796cc68023901a534764ff44d4dc8f1ef Author: Karel Zak Date: Wed Mar 25 17:55:22 2015 +0100 build-sys: support static build with readline Signed-off-by: Karel Zak configure.ac | 4 +++- disk-utils/Makemodule.am | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) commit 87db0047ea364152f32c10b8aefac4a5b8359d7d Author: Karel Zak Date: Wed Mar 25 17:36:28 2015 +0100 tests: more(1) depends on terminal, force to TERM=linux Signed-off-by: Karel Zak tests/ts/more/regexp | 1 + 1 file changed, 1 insertion(+) commit 6a7a5eac349bbad629e39586879c07a2cc785c73 Author: Karel Zak Date: Wed Mar 25 16:09:32 2015 +0100 docs: remove obsolete things from TODO Signed-off-by: Karel Zak Documentation/TODO | 13 ------------- 1 file changed, 13 deletions(-) commit 7159b496d5f86a240b5915a213a4e3a24926e407 Author: Karel Zak Date: Wed Mar 25 16:06:39 2015 +0100 sfdisk: add readline support Signed-off-by: Karel Zak disk-utils/Makemodule.am | 3 +- disk-utils/sfdisk.c | 73 ++++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 67 insertions(+), 9 deletions(-) commit 84ab260aa2fab1adfb6598e15682a9284e07c43a Author: Karel Zak Date: Wed Mar 25 16:06:26 2015 +0100 fdisk: fix readline wrapper Signed-off-by: Karel Zak disk-utils/fdisk.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5cdbe36fbc07c7d30c454b764eb5a6e9595a8252 Author: Karel Zak Date: Wed Mar 25 16:05:14 2015 +0100 libfdisk: add fgets() callback for scripts Signed-off-by: Karel Zak libfdisk/docs/libfdisk-sections.txt | 3 ++ libfdisk/src/libfdisk.h.in | 5 ++++ libfdisk/src/libfdisk.sym | 6 ++++ libfdisk/src/script.c | 56 ++++++++++++++++++++++++++++++++++++- 4 files changed, 69 insertions(+), 1 deletion(-) commit 310399cafe303907635338b42f903f65cff98d2a Author: Karel Zak Date: Wed Mar 25 11:08:22 2015 +0100 libfdisk: fix symbols versioning script Really stupid copy & past mistake. The libfdisk symbols should not be prefixed by MOUNT_ suffix. This change makes binaries linked with libfdisk 2.26 incompatible with new libfdisk. Fortunately, 2.26 has been the first release and very probably the library has been used for util-linux fdisks only. Signed-off-by: Karel Zak libfdisk/src/libfdisk.sym | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 2e81d99870920a8f9a79a00221839ce8c8cb3400 Author: Ruediger Meier Date: Tue Mar 24 12:22:13 2015 +0100 last, fix race when comparing time stamps It is just luck if two time() calls happen within the same second. Introduced in 31d28e09. Actually I don't like adding another global variable but this way we avoid bigger refactoring. IMO it's questionable why lastdate, lastdown, etc. are initialized with current time() at all. It looks unsafe to print "still running" always when logout_time = now. Signed-off-by: Ruediger Meier login-utils/last.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 568f460ca3c4ca1fff0c2c7e325a1b709992188c Author: Ruediger Meier Date: Tue Mar 24 14:38:09 2015 +0100 last: fix first (current) runlevel line Since 744c7fec lastrch was not set to current time anymore, but we need it. # broken: $ ./last -x | grep -m 2 runlevel runlevel (to lvl 5) 3.11.10-25-deskt Wed Feb 18 13:11 - 01:00 (-16484+-12:-11) runlevel (to lvl 5) 3.11.10-25-deskt Thu Jan 22 16:50 - 13:11 (26+20:21) # fixed: $ ./last -x | grep -m 2 runlevel runlevel (to lvl 5) 3.11.10-25-deskt Wed Feb 18 13:11 still running runlevel (to lvl 5) 3.11.10-25-deskt Thu Jan 22 16:50 - 13:11 (26+20:21) Signed-off-by: Ruediger Meier login-utils/last.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 740c36f657ddef7b8adf829230e91995a0dd3143 Author: Karel Zak Date: Wed Mar 25 10:31:37 2015 +0100 fdisk: add GNU Readline support to fdisk Signed-off-by: Karel Zak disk-utils/Makemodule.am | 4 +-- disk-utils/fdisk.c | 64 +++++++++++++++++++++++++++++++++++++----------- 2 files changed, 52 insertions(+), 16 deletions(-) commit 0273afda3c0e8acf2bea4bbd738e37febcb1939e Author: Ondrej Oprala Date: Mon Feb 2 18:11:40 2015 +0100 build-sys: add --with-readline [kzak@redhat.com: - define READLINE_LIBS] Signed-off-by: Ondrej Oprala Signed-off-by: Karel Zak configure.ac | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit d1bba731c6ca1918d03f2a8c144b51f9a8607fda Author: Stanislav Brabec Date: Tue Mar 24 21:01:10 2015 +0100 fsck: fix fsck -C {fd} parsing Both fsck(8) and fsck --help documents progress bar redirection as -C {fd} This did not work, and only -C{fd} and "-C {fd}" worked. Signed-off-by: Karel Zak disk-utils/fsck.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9c6f3de60f9858e404a825824026bff4c42203fc Author: Karel Zak Date: Mon Mar 23 12:03:30 2015 +0100 libfdisk: (gpt) check header size before verify CRC Addresses: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=780834 Signed-off-by: Karel Zak libfdisk/src/gpt.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 5a34fb8a07de1716ca866832fa284b53109dee79 Author: Karel Zak Date: Mon Mar 23 11:40:59 2015 +0100 dmesg: use GMT in tests, add DMESG_TEST_BOOTIME We don't want to hardcode anything to the test, just use env.variable DMESG_TEST_BOOTIME. Signed-off-by: Karel Zak sys-utils/dmesg.c | 26 +++++++++++++++++++------- tests/ts/dmesg/colors | 3 +++ tests/ts/dmesg/console-levels | 3 +++ tests/ts/dmesg/decode | 3 +++ tests/ts/dmesg/delta | 3 +++ tests/ts/dmesg/facilities | 3 +++ tests/ts/dmesg/indentation | 3 +++ 7 files changed, 37 insertions(+), 7 deletions(-) commit 98e90a49019995a9779768cf9a307638fbc9d7b1 Author: Karel Zak Date: Mon Mar 23 11:40:45 2015 +0100 logger: fix LOGGER_TEST_TIMEOFDAY check Signed-off-by: Karel Zak misc-utils/logger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 711ebe0e6b6bf069e0badd2907207f6f6deab30f Author: Sami Kerola Date: Sun Mar 22 23:05:30 2015 +0000 tests: check dmesg message coloring Signed-off-by: Sami Kerola tests/expected/dmesg/colors | 105 ++++++++++++++++++++++++++++++++++++++++++++ tests/ts/dmesg/colors | 25 +++++++++++ 2 files changed, 130 insertions(+) commit acc57d8f388d68c5473f654d4c6053a78ab4744d Author: Sami Kerola Date: Sun Mar 22 23:05:29 2015 +0000 tests: check timestamp formats Signed-off-by: Sami Kerola tests/expected/dmesg/indentation | 15 +++++++++++++++ tests/ts/dmesg/indentation | 6 ++++++ 2 files changed, 21 insertions(+) commit 5fac518cefdba5c06829be187cefa3e904a7e1b3 Author: Sami Kerola Date: Sun Mar 22 23:05:28 2015 +0000 tests: add test_dmesg that has fixed boot time This allows testing time stamp formats. Signed-off-by: Sami Kerola sys-utils/Makemodule.am | 4 ++++ sys-utils/dmesg.c | 5 +++++ tests/commands.sh | 2 +- tests/ts/dmesg/console-levels | 4 ++-- tests/ts/dmesg/decode | 4 ++-- tests/ts/dmesg/delta | 4 ++-- tests/ts/dmesg/facilities | 4 ++-- tests/ts/dmesg/indentation | 10 +++++----- 8 files changed, 23 insertions(+), 14 deletions(-) commit fa69a8b94f1c260d9cf9099d9421f8c34650089c Author: Sami Kerola Date: Sun Mar 22 23:05:27 2015 +0000 tests: add dmesg multiline message check Signed-off-by: Sami Kerola tests/expected/dmesg/indentation | 20 ++++++++++++++++++++ tests/ts/dmesg/indentation | 31 +++++++++++++++++++++++++++++++ tests/ts/dmesg/newlines | 5 +++++ 3 files changed, 56 insertions(+) commit f1300e2cea31d6232783dafb97b7c600d48823e8 Author: Sami Kerola Date: Sun Mar 22 23:05:26 2015 +0000 dmesg: fix shadow declaration sys-utils/dmesg.c:650:9: warning: declaration of 's' shadows a previous local [-Wshadow] sys-utils/dmesg.c:619:12: warning: shadowed declaration is here [-Wshadow] And since the code had to be touched deprecate loop printing one character at a time, in favour of printf and instruction to repeat spaces the number required. Signed-off-by: Sami Kerola sys-utils/dmesg.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit f0f22e9c6f109f8c1234caa3173368ef43b023eb Author: Karel Zak Date: Wed Mar 18 15:13:15 2015 +0100 unshare: add --propagation, use MS_PRIVATE by default After "unshare --mount" users assume that mount operations within the new namespaces are unshared (invisible for the rest of the system). Unfortunately, this is not true and the behavior depends on the current mount propagation setting. The kernel default is "private", but for example systemd based distros use "shared". The solution is to use (for example) "mount --make-private" after unshare(1). I have been requested many times to provide less fragile and more unified unshared mount setting *by default* to make things user friendly. The patch forces unshare(1) to explicitly use MS_REC|MS_PRIVATE for all tree by default. We can use something less (e.g MS_SLAVE), but "private" is the kernel default, so for many users this change (feature) will be invisible. This feature is possible to disable by "--propagation unchanged" or it's possible to specify another propagation flag, supported are: Acked-by: "Eric W. Biederman" Signed-off-by: Karel Zak sys-utils/unshare.1 | 20 ++++++++++++++------ sys-utils/unshare.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+), 6 deletions(-) commit 355ee3b8981ed4990fd069b097dd8ae0f7373920 Author: Karel Zak Date: Fri Mar 20 15:26:58 2015 +0100 nsenter: add -Z to set selinux context The new context is copied from --target . This solution allows to keep SELinux happy when you enter container by nsenter(1). Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1116100 Signed-off-by: Karel Zak sys-utils/Makemodule.am | 2 +- sys-utils/nsenter.1 | 15 ++++++++++++--- sys-utils/nsenter.c | 34 +++++++++++++++++++++++++++++++++- 3 files changed, 46 insertions(+), 5 deletions(-) commit 8b5b94685b7f91c61ff1abeaa8e7089226d2bf35 Author: Karel Zak Date: Fri Mar 20 12:42:33 2015 +0100 mount: don't remount read-only on --bind mount(8) tries to mount read-only when the previous attempt ends with EROFS or EACCES. This is bad idea for bind mounts as "ro,bind" has a special semantic. Signed-off-by: Karel Zak sys-utils/mount.c | 3 +++ 1 file changed, 3 insertions(+) commit 172d6eed1b0c6c278f9d60bd5d3076fcaf6c1376 Author: Karel Zak Date: Fri Mar 20 11:05:42 2015 +0100 tests: remove private2 dir from mount/move The directory is unnecessary, all we need is to create from "private" directory a mount point (so "--bind $DIR_PRIVATE $DIR_PRIVATE"). Signed-off-by: Karel Zak tests/ts/mount/move | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit bb3df8218b4f8f145e345ab59828a9b3d6d70c4b Author: Ruediger Meier Date: Thu Mar 19 17:12:15 2015 +0100 tests: some more mount error handling Signed-off-by: Ruediger Meier tests/ts/mount/fstab-broken | 4 ++++ tests/ts/mount/fstab-none | 1 + tests/ts/mount/shared-subtree | 1 + 3 files changed, 6 insertions(+) commit d38c04261d2010a4e3db514f0abe3e81c01d0a2f Author: Ruediger Meier Date: Thu Mar 19 17:12:00 2015 +0100 tests: more error handling in mount/move (refactor) Signed-off-by: Ruediger Meier tests/ts/mount/move | 50 ++++++++++++++++++++++++++++---------------------- 1 file changed, 28 insertions(+), 22 deletions(-) commit 51d455ce16a4e42bb17bea893e5cae2edc1872b4 Author: Ruediger Meier Date: Thu Mar 19 17:11:43 2015 +0100 tests: mount/move also tests findmnt vs. mountpoint Signed-off-by: Ruediger Meier tests/commands.sh | 1 + tests/ts/mount/move | 15 +++++++++++++++ 2 files changed, 16 insertions(+) commit 0009f510cb4bafabbec0d26acd7385436c3e7c8b Author: Karel Zak Date: Thu Mar 19 12:08:30 2015 +0100 findmnt: add --mountpoint command line option The current --target implementation check the elements in reverse order to get the mountpoint. The feature may be inwanted in some cases when we really want to check for mountpoint specified by the . The new option "--mountpoint " allows to be strict. Signed-off-by: Karel Zak misc-utils/findmnt.8 | 25 +++++++++++++++++-------- misc-utils/findmnt.c | 21 +++++++++++++++++---- tests/ts/mount/fstab-broken | 4 ++-- tests/ts/mount/fstab-none | 4 ++-- tests/ts/mount/move | 4 ++-- tests/ts/mount/remount | 2 +- tests/ts/mount/shared-subtree | 16 ++++++++-------- 7 files changed, 49 insertions(+), 27 deletions(-) commit 8ba3f35e07f736a0165669ac787b016b4311eb29 Author: Karel Zak Date: Thu Mar 19 12:06:35 2015 +0100 tests: start script/race test only when --force specified The test generates 1000 processes and it seems too invasive for test/build machines and containers. Signed-off-by: Karel Zak tests/ts/script/race | 3 +++ 1 file changed, 3 insertions(+) commit a0e215fb2d501acbcb81c0e65e181b6536bc61bd Author: J William Piggott Date: Sun Mar 15 16:44:05 2015 -0400 hwclock: non-root access in test mode Allow a non-root user to call all hwclock functions when the --test option is used. Signed-off-by: J William Piggott sys-utils/hwclock.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a36a9026ea1b50968a73ff0f74f71e962feab230 Author: J William Piggott Date: Sun Mar 15 14:17:13 2015 -0400 hwclock: increase debug output precision Increased the precision in debug output showing the clock drift and the time lapsed. Showing a clock drift of 0.0 while giving a value that the drift factor was adjusted by makes no sense. Signed-off-by: J William Piggott sys-utils/hwclock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 266f8562608cebb28fcfea1aae1001789f5df4df Author: Karel Zak Date: Tue Mar 17 12:03:28 2015 +0100 travis: add MAKE_CHECK_OPTS Signed-off-by: Karel Zak .travis-functions.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit d995c2f082a710e01e7abeb10c6ca533494d0304 Author: Karel Zak Date: Tue Mar 17 11:34:22 2015 +0100 tests: add --skip-loopdevs Signed-off-by: Karel Zak tests/functions.sh | 3 ++- tests/run.sh | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) commit f586080352cc77ae8632068021c2ad53d60c3abd Merge: ec4fe40 5f70838 Author: Karel Zak Date: Tue Mar 17 11:25:57 2015 +0100 Merge branch 'drone-ci' of https://github.com/rudimeier/util-linux commit ec4fe40b5946baa08b85f6d91b86188b1770c80c Author: Karel Zak Date: Tue Mar 17 11:21:39 2015 +0100 tests: use ts_skip for logger/journald Signed-off-by: Karel Zak tests/ts/logger/journald | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 95305cec15750f2b6e938c9939f58fe70d252395 Author: Karel Zak Date: Tue Mar 17 11:10:20 2015 +0100 Since 569d1dac7bc64457aac11163b6a91ce9b41a6715 we read device start sector from the /sys/block/.../start file. The file exists only for partitions, for wholedisk is the start of the device always zero. References: https://bugzilla.redhat.com/show_bug.cgi?id=1202443 Signed-off-by: Karel Zak disk-utils/blockdev.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 8979e7024e3e16f3c41e66fb459fe0645f0df5a8 Author: Karel Zak Date: Tue Mar 17 10:55:46 2015 +0100 hwclock: cosmetic changes to man page Reported-by: Benno Schulenberg Signed-off-by: Karel Zak sys-utils/hwclock.8.in | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 8e96dfa2c892151b4af8062816f46a101641c558 Merge: 4230d57 963a702 Author: Karel Zak Date: Tue Mar 17 10:37:13 2015 +0100 Merge branch 'hwman312' of https://github.com/jwpi/util-linux commit 4230d576fda7cc3303b158319cc164397e240fd5 Author: Karel Zak Date: Tue Mar 17 10:15:50 2015 +0100 build-sys: add new compiler warnings Signed-off-by: Karel Zak configure.ac | 2 ++ 1 file changed, 2 insertions(+) commit bd0673f95a3e528507b24a435ea62de4e7267f24 Merge: 3e64a01 cf92286 Author: Karel Zak Date: Tue Mar 17 10:01:35 2015 +0100 Merge branch 'tests_logger' of https://github.com/kerolasa/lelux-utiliteetit commit 3e64a01e289c837114fea4b79835b82b297e957c Author: Ruediger Meier Date: Mon Mar 16 15:15:35 2015 +0100 tests: remove warning from test output This was added in 3f8478a7 but it's only printed in --help. Signed-off-by: Ruediger Meier tests/expected/tailf/simple | 1 - 1 file changed, 1 deletion(-) commit cf9228608497cf305a340de7426e81b716b3f96f Author: Sami Kerola Date: Mon Mar 16 00:03:49 2015 +0000 libblkid: fix compiler warnings warning: extra ';' outside of a function [-Wextra-semi] warning: embedding a directive within macro arguments has undefined behavior [-Wembedded-directive] Signed-off-by: Sami Kerola libblkid/src/superblocks/bcache.c | 2 +- libblkid/src/superblocks/minix.c | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) commit a0fd24e07089df0884175e79060f95d31f76d62c Author: Sami Kerola Date: Mon Mar 16 23:42:57 2015 +0000 tests: add logger(1) journald test Signed-off-by: Sami Kerola tests/expected/logger/journald | 3 +++ tests/ts/logger/journald | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) commit b3d4c9862c1c12c1f1e5db5e72fe010b192ca106 Author: Sami Kerola Date: Sun Mar 15 12:46:30 2015 +0000 tests: add logger(1) error condition tests Signed-off-by: Sami Kerola tests/expected/logger/errors | 0 tests/expected/logger/errors-id_with_space | 2 + tests/expected/logger/errors-invalid_prio | 1 + tests/expected/logger/errors-kern_priority | 1 + tests/expected/logger/errors-kern_priority_numeric | 1 + tests/expected/logger/errors-rfc5424_exceed_size | 1 + .../logger/errors-rfc5424_msgid_with_space | 1 + tests/expected/logger/errors-tag_with_space | 2 + tests/ts/logger/errors | 65 ++++++++++++++++++++++ 9 files changed, 74 insertions(+) commit 660d2e44e5d75d98cfeb8971c7229f2c4b1d03d9 Author: Sami Kerola Date: Sun Mar 15 12:00:57 2015 +0000 tests: add logger(1) message format tests Signed-off-by: Sami Kerola tests/expected/logger/formats | 0 tests/expected/logger/formats-priorities | 152 +++++++++++++++++++++++++++ tests/expected/logger/formats-rfc3164 | 1 + tests/expected/logger/formats-rfc5424_msgid | 1 + tests/expected/logger/formats-rfc5424_nohost | 1 + tests/expected/logger/formats-rfc5424_notime | 1 + tests/expected/logger/formats-rfc5424_simple | 1 + tests/ts/logger/formats | 58 ++++++++++ 8 files changed, 215 insertions(+) commit 5f708381a1ef5350196cb7c82f8e67edd37a87bd Author: Ruediger Meier Date: Mon Mar 16 12:22:53 2015 +0100 tests: optionally skip tests where loop support is needed It can be hard to check for loop support (e.g. on LXC containers). Let the user skip it manually by env: TS_OPT_FEAT_SKIP_LOOP="yes" Signed-off-by: Ruediger Meier tests/functions.sh | 4 ++++ 1 file changed, 4 insertions(+) commit 355df774f4b29df0a094804dbeab9ec4555a8d8f Author: Ruediger Meier Date: Mon Mar 16 12:20:53 2015 +0100 travis: whitelist travis* branches Sometimes we may want to test non-master branches. Signed-off-by: Ruediger Meier .travis.yml | 1 + 1 file changed, 1 insertion(+) commit 5ddcc32a3ece62b7b5bbca366f81cd035fd388cc Author: Ruediger Meier Date: Mon Mar 16 11:21:49 2015 +0100 travis: move install script to .travis-functions.sh Now this snippet can be re-used by non-travis systems. For example on drone.io we can use this simple build script: ...... MAKE_CHECK="root" source ./.travis-functions.sh travis_install_script || exit travis_before_script || exit ret=0 travis_script || ret=$? travis_after_script exit $ret ...... Signed-off-by: Ruediger Meier .travis-functions.sh | 15 +++++++++++++++ .travis.yml | 13 ++----------- 2 files changed, 17 insertions(+), 11 deletions(-) commit 1a289ac5b726236067ae57b06258ac96ea9a9884 Author: Ruediger Meier Date: Fri Mar 13 16:09:37 2015 +0100 tests: disarm tailf test Signed-off-by: Ruediger Meier tests/ts/tailf/simple | 4 ++++ 1 file changed, 4 insertions(+) commit 3f8478a71ccde6883d4c81b7e65561a106653b28 Author: Ruediger Meier Date: Fri Mar 13 16:09:36 2015 +0100 tailf: deprecated We want to remove it in 2 years, March 2017. See discussion "tailf, really needed?" http://thread.gmane.org/gmane.linux.utilities.util-linux-ng/10967 [kzak@redhat.com: - move warning to usage()] Signed-off-by: Ruediger Meier Signed-off-by: Karel Zak Documentation/deprecated.txt | 5 +++++ tests/expected/tailf/simple | 1 + text-utils/tailf.1 | 6 ++++++ text-utils/tailf.c | 14 ++++++++++---- 4 files changed, 22 insertions(+), 4 deletions(-) commit 77837afcd15106528d9917f87c5af4a3cabf8578 Author: Karel Zak Date: Mon Mar 16 14:17:49 2015 +0100 tests: use --no-act for logger tests and also use --stderr on one place only. Signed-off-by: Karel Zak tests/ts/logger/options | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 81ff52b32225a2a2aa3f926357aafab866aa0bc3 Author: Sami Kerola Date: Sun Mar 15 12:54:50 2015 +0000 tests: add logger(1) command line options tests [kzak@redhat.com: - use LOGGER_TEST_* env] Signed-off-by: Sami Kerola Signed-off-by: Karel Zak tests/expected/logger/input_empty_line | 3 ++ tests/expected/logger/input_prio_prefix | 1 + tests/expected/logger/input_simple | 1 + tests/expected/logger/options | 0 .../expected/logger/options-input_file_empty_line | 3 ++ .../expected/logger/options-input_file_prio_prefix | 1 + tests/expected/logger/options-input_file_simple | 1 + .../expected/logger/options-input_file_skip_empty | 2 + tests/expected/logger/options-log_pid | 1 + tests/expected/logger/options-log_pid_define | 1 + tests/expected/logger/options-log_pid_long | 1 + tests/expected/logger/options-log_pid_no_arg | 1 + tests/expected/logger/options-simple | 1 + tests/ts/logger/options | 62 ++++++++++++++++++++++ 14 files changed, 79 insertions(+) commit ef5fb2800153fc05d19df202e4ee182fb72f1d86 Author: Karel Zak Date: Mon Mar 16 13:26:52 2015 +0100 logger: add -DTEST_LOGGER "make test_logger" now compiles logger(1) test program to overwrite system datetime stuff, hostname and PID, for example: export TZ=GMT export LOGGER_TEST_TIMEOFDAY=1234567890.123456 export LOGGER_TEST_HOSTNAME=foo export LOGGER_TEST_GETPID=123 ./test_logger --rfc5424 --no-act --stderr -i --tag MyTag mesg <13>1 2009-02-13T23:31:30.123456+00:00 foo MyTag 123 - [timeQuality tzKnown="1" isSynced="0"] mesg if the LOGGER_TEST_* variables are not specified then default to standard logger(1) behavior. Note that it would be possible to use for example "unshare --utc" to make hostname stable and portable, but LOGGER_TEST_* variables allow to keep the tests less complex. Signed-off-by: Karel Zak misc-utils/Makemodule.am | 5 +++++ misc-utils/logger.c | 56 ++++++++++++++++++++++++++++++++++++++++++------ tests/commands.sh | 1 + 3 files changed, 56 insertions(+), 6 deletions(-) commit fd343a05726658514fc9679cc226ea8aa89549d6 Author: Karel Zak Date: Mon Mar 16 12:38:46 2015 +0100 logger: add --no-act for testing * force --journal mode to also output to stderr when the option --stderr specified on command line * add --no-act to avoid all write() operations to make it possible to write tests without "spam" system logs Signed-off-by: Karel Zak misc-utils/logger.1 | 5 +++++ misc-utils/logger.c | 46 ++++++++++++++++++++++++++++++++-------------- 2 files changed, 37 insertions(+), 14 deletions(-) commit 773df0fa2f6c12581cc8649a08b9d825456a247c Author: Karel Zak Date: Mon Mar 16 11:51:05 2015 +0100 logger: fix rfc5424 format crash $ logger --rfc5424=notq message Segmentation fault (core dumped) Reported-by: Sami Kerola Signed-off-by: Karel Zak misc-utils/logger.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8fce3924e51eed84793dc8d4751c6dd2de17d966 Author: Sami Kerola Date: Sun Mar 15 12:54:53 2015 +0000 logger: use errx() when checking user input Additionally inform in usage() the --msgid requires an argument. Signed-off-by: Sami Kerola misc-utils/logger.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d5f930614b12c38aeb8cf6f41384e2f5f9f90e9e Author: Sami Kerola Date: Sun Mar 15 12:54:48 2015 +0000 logger: check xgethostname() return value Signed-off-by: Sami Kerola misc-utils/logger.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit 9a13f968e67a43fafb9edda16ddf6c635ba3ba60 Author: Sami Kerola Date: Sun Mar 15 12:54:47 2015 +0000 logger: tidy few indentation issues Signed-off-by: Sami Kerola misc-utils/logger.c | 115 ++++++++++++++++++++++++++-------------------------- 1 file changed, 58 insertions(+), 57 deletions(-) commit 8d341322dbf4ef80dea7821c858292c7ba5e0b25 Author: Stef Walter Date: Sun Mar 15 14:23:32 2015 +0100 logger: Fix use of errno after strtol() without zeroing first References: https://bugzilla.redhat.com/show_bug.cgi?id=1202104 Signed-off-by: Karel Zak misc-utils/logger.c | 1 + 1 file changed, 1 insertion(+) commit 963a702ef53a2d63d733fb7ce54acc7064e7435c Author: J William Piggott Date: Fri Mar 13 14:40:59 2015 -0400 hwclock: man-page errata The information I wrote regarding clock crystals was not only incomplete, it was wrong. The characteristics of quartz crystals is beyond the scope of this man-page. It was misguided to attempt to include it. This commit removes said information. Signed-off-by: J William Piggott sys-utils/hwclock.8.in | 22 ---------------------- 1 file changed, 22 deletions(-) commit d0c7dfdf3350a633f1f23062de6985c5c773285f Author: J William Piggott Date: Fri Mar 13 14:37:22 2015 -0400 hwclock: add '11 minute mode' information Add that '11 minute mode' is a kernel compile time option. Add details regarding its activation and how to check its status. Signed-off-by: J William Piggott sys-utils/hwclock.8.in | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) commit 187c2b8e4d77ffdbf94bfdee1e776628f39b65ef Author: J William Piggott Date: Fri Mar 13 14:35:22 2015 -0400 hwclock: remove depreciated ntpdate Replace references to the depreciated ntpdate with sntp. Signed-off-by: J William Piggott sys-utils/hwclock.8.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 073971e906b2696691d5a1bb60782f0819a3267a Author: J William Piggott Date: Fri Mar 13 14:34:08 2015 -0400 hwclock: Improve FILES section Signed-off-by: J William Piggott sys-utils/hwclock.8.in | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit ea6b197e60865772f4b15d40bdd3201f86e9a945 Author: J William Piggott Date: Fri Mar 13 14:31:50 2015 -0400 hwclock: add TZDIR Add information about TZDIR and improve the ENVIRONMENT section. Signed-off-by: J William Piggott sys-utils/hwclock.8.in | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit 7ff6948e59172c1942544c9a064708e5666ba20d Author: Karel Zak Date: Fri Mar 13 13:35:20 2015 +0100 logger: use xstrdup() Signed-off-by: Karel Zak misc-utils/logger.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 565964a933aa02a90aeb5f26f19a40387d6420ee Author: Ruediger Meier Date: Thu Mar 12 19:08:26 2015 +0100 tests: fix fdisk/bsd for ppc64le Actually Aurelien's patch a80886e9 should have addressed this already because it's the case LE, BSD_LABELSECTOR = 0, BSD_LABELOFFSET = 64. I've asked about this on mailing list but couldn't get more informations. Thread "test fdisk/bsd on exotic archs": http://comments.gmane.org/gmane.linux.utilities.util-linux-ng/10621 Signed-off-by: Ruediger Meier tests/ts/fdisk/bsd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b3e94605e7f5a6a8382b8340736343be76c231a4 Author: Ruediger Meier Date: Thu Mar 12 19:08:25 2015 +0100 tests: improve readability for fdisk/bsd Signed-off-by: Ruediger Meier tests/ts/fdisk/bsd | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit 744c7fecd3873a25eba5aabb56a932a0124e5da0 Author: Karel Zak Date: Fri Mar 13 11:47:00 2015 +0100 last: keep array of files in main() Signed-off-by: Karel Zak login-utils/last.c | 54 ++++++++++++++++++++++-------------------------------- 1 file changed, 22 insertions(+), 32 deletions(-) commit da1a8ed0b04763af99db4dd239f98a1ed6c60caa Author: Karel Zak Date: Fri Mar 13 11:13:26 2015 +0100 last: fix utmplist usage last(1) uses a global list of entries, this is unnecessary and it's also mistake because the pointer to the list is not set to NULL when last(1) opens another utmp file. For example: last -f /var/log/wtmp -f /var/log/wtmp-20150220 ends with unexpected free() call or sometimes with never ending loop. Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1201033 Signed-off-by: Karel Zak login-utils/last.c | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) commit 2a4b073e8b2d34dfadd8306f7d71957687923bdd Author: Karel Zak Date: Thu Mar 12 11:50:07 2015 +0100 cal: care about setuprterm() result References: https://bugzilla.suse.com/show_bug.cgi?id=903440 Signed-off-by: Karel Zak misc-utils/cal.c | 59 ++++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 38 insertions(+), 21 deletions(-) commit 209fd7a74879d37cef3d5d1679bc9cad76b96c7a Author: Karel Zak Date: Wed Mar 11 11:38:07 2015 +0100 libmount: mark overlay as pseudo-FS Signed-off-by: Karel Zak libmount/src/utils.c | 1 + 1 file changed, 1 insertion(+) commit c8b9ecebe9a8f44f968ed94aa7ad2c0f38a0d62c Author: Karel Zak Date: Wed Mar 11 11:11:19 2015 +0100 libmount: add mnt_table_get_fs_root() to header file Signed-off-by: Karel Zak libmount/src/mountP.h | 4 ++++ 1 file changed, 4 insertions(+) commit 772f813a40d9b864080a64b53852422d3df5233b Merge: 167cb03 3eb3c8d Author: Karel Zak Date: Wed Mar 11 11:07:37 2015 +0100 Merge branch 'master-silence-format-printf-warning' of https://github.com/rgerhards/util-linux commit 167cb0324678e98aaa9bc3b372bbd6cf019f4be3 Author: Karel Zak Date: Wed Mar 11 10:58:45 2015 +0100 tests: update sfdisk --dump test Signed-off-by: Karel Zak tests/expected/sfdisk/gpt-write-dump | 2 ++ 1 file changed, 2 insertions(+) commit 2cb40465320ca3f0b9425a0631ee7c970276b06b Author: Karel Zak Date: Wed Mar 11 10:51:13 2015 +0100 logger: small change in usage() Signed-off-by: Karel Zak misc-utils/logger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7c7c77a1160e930f8d6f75e8467d1cf5aa4f1589 Author: Rainer Gerhards Date: Tue Mar 10 17:48:05 2015 +0100 logger man page: fix typo misc-utils/logger.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 55f5bc662e69a96c666d097eb5110ea8b3e93d20 Author: Rainer Gerhards Date: Tue Mar 10 17:47:30 2015 +0100 logger: add --msgid option, permits to set RFC5424 MSGID field misc-utils/logger.1 | 6 ++++++ misc-utils/logger.c | 17 +++++++++++++---- 2 files changed, 19 insertions(+), 4 deletions(-) commit 4826184bce8df85ae357a102e47e06e345536bc6 Author: Rainer Gerhards Date: Tue Mar 10 17:26:14 2015 +0100 logger: fix multiple format bugs in rfc5424 formatter This is more or less a complete rewrite of the formatter. It had multiple issue, e.g. a missing field (MSGID?) and invalid handling of nil values. misc-utils/logger.c | 78 ++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 57 insertions(+), 21 deletions(-) commit 3eb3c8d77e5323d313e555107bf5b27ded2d1c1c Author: Rainer Gerhards Date: Tue Mar 10 14:13:38 2015 +0100 silence compiler warning This is primarily cosmetic, albeit it also provides an only very slight improvement in compile time error checking. include/xalloc.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit cc06a01ec551ed2bcd397a5097165b4434179b34 Author: Karel Zak Date: Tue Mar 10 13:35:56 2015 +0100 libmount: cleanup fs root detection code Signed-off-by: Karel Zak libmount/src/mountP.h | 5 ---- libmount/src/tab.c | 32 ++++++++++++++++++++----- libmount/src/utils.c | 34 --------------------------- tests/expected/libmount/utils-fs-root | 1 - tests/expected/libmount/utils-fs-root-subdir | 1 - tests/expected/libmount/utils-fs-root-subdir2 | 1 - tests/ts/libmount/utils | 12 ---------- 7 files changed, 26 insertions(+), 60 deletions(-) commit cd41b385a06dde70bb45c3143d3459157bda58f8 Author: Karel Zak Date: Tue Mar 10 12:51:44 2015 +0100 findmnt: don't rely on st_dev for --target The overlay filesystem does not provide usable st_dev (in traditional UNIX way). It's necessary to search in /proc/self/mountinfo to detect which path element is mountpoint. $ findmnt --target /mnt/merged/dir-a/foo TARGET SOURCE FSTYPE OPTIONS /mnt/merged overlay overlay rw,relatime,lowerdir=/mnt/low,upperdir=/mnt/high/data,workdir=/mnt/high/work Signed-off-by: Karel Zak libmount/src/utils.c | 4 ++++ misc-utils/findmnt.8 | 8 ++++++-- misc-utils/findmnt.c | 18 ++++++++++-------- 3 files changed, 20 insertions(+), 10 deletions(-) commit 7d3a07d87fd1c59927a614a04a2751aa4db420d8 Author: Karel Zak Date: Tue Mar 10 11:37:45 2015 +0100 logger: check for ntp_gettime() rather than for timex.h It seems that musl libc and uClibc without UCLIBC_NTP_LEGACY does not provide ntp_gettime and compile will fail. References: https://github.com/karelzak/util-linux/issues/174 Signed-off-by: Karel Zak configure.ac | 1 + misc-utils/logger.c | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) commit ae6846b842b4912f03730ac475e19a7916302893 Author: Rainer Gerhards Date: Sat Mar 7 12:14:21 2015 +0100 logger: add --skip-empty-lines to prevent logging empty lines Empty log messages are generally considered useless. This option enables to turn them off when processing files (including stdin). [kzak@redhat.com: - rename --skip-empty-lines to --skip-empty, - add the option to getopt_long(), - add the option to bash-completion] Signed-off-by: Karel Zak bash-completion/logger | 2 +- misc-utils/logger.1 | 8 ++++++++ misc-utils/logger.c | 14 +++++++++++--- 3 files changed, 20 insertions(+), 4 deletions(-) commit a43022fdd48c544278fb12a3e4e1df7e6293152a Author: Rainer Gerhards Date: Sat Mar 7 12:04:43 2015 +0100 logger man page: update --size doc now we have strict sizes Signed-off-by: Karel Zak misc-utils/logger.1 | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit b9ef27f59bffbeaf5397538ea16065d4eb6364c8 Author: Rainer Gerhards Date: Sat Mar 7 11:49:00 2015 +0100 logger: bugfix: missing sanity checks with --prio-prefix option There were no apparent sanity checks other than applying the logmask when reading PRI values from files. As such, invalid PRIs (tested with values 192, 210, and 2100) are accepted. This in turn can trigger problems in various receivers, especially older versions. See here for details: http://www.rsyslog.com/remote-syslog-pri-vulnerability-cve-2014-3683/ Note that 2100 was changed to 52 as described in above link. This patch refactors PRI processing. Invalid PRIs are detected and in this case the message is sent with the default priority, with the invalid pri being part of the message to be sent. This is along the line of what 2.26 did when it detected the PRI was invalid. The refactoring now also enables pricese tracking of syslog header length in all cases, so --size is now strictly obeyed. [kzak@redhat.com: - fix compiler warning [-Wunused-variable]] Signed-off-by: Karel Zak misc-utils/logger.c | 85 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 48 insertions(+), 37 deletions(-) commit 2b3f40c5978569f15e30836cf99f34f31c163d1c Author: Rainer Gerhards Date: Fri Mar 6 18:52:26 2015 +0100 logger: refactor message generation Previously, the message format was generated in one big step. Now this is refactored to generate the header independently. This not only provides a better isolation of functionality, but enables to calculate the size of the header *before* generating the user part of the message. That in turn is needed in order to precisely enforce the message size limit. This is especially important while processing files, as here parts of the message may be lost if the receiver truncates the message. The file reader itself tries to guard against this by reading only the permitted number of bytes, but without knowing the header size, it would mis-guess here. Note that when --prio-prefix is given, we still do not know exactly the header length, because the PRI value is between 1 and 3 bytes. Unfortunately, we do not know the actual size before reading. With the current (simple) approach, we need to read the full line before getting the PRI, so this is a hen-egg problem. To solve this, a more complex reader would be required. It is questionable if this is necessary for a tool like logger. So currently, we still have a 2-byte window of uncertainty if --prio-prefix is given. [kzak@redhat.com: - fix compiler warnings [-Wunused-but-set-variable]] Signed-off-by: Karel Zak misc-utils/logger.c | 91 +++++++++++++++++++++++++++-------------------------- 1 file changed, 47 insertions(+), 44 deletions(-) commit f68b8aa7f5dc1fdf403a2ef64b5dd86f3fdbee95 Author: Rainer Gerhards Date: Fri Mar 6 15:50:34 2015 +0100 logger: permit to send messages larger than 1024 characters This is an important capability that has been specified in RFC5424. However, messages larger than 1024 chars are being accepted for years now by at least rsyslog and syslog-ng. This patch adds the option --size to permit setting a new max size, with 1024 being the default. Note that the size limit is only approximative, as we do not take the header size in account (RFC talks about total message length). [[kzak@redhat.com: - add 'S' to getopt_long(), - rename --message-size to --size - add the option to bash-completion] Signed-off-by: Karel Zak bash-completion/logger | 2 +- misc-utils/logger.1 | 15 +++++++++++++++ misc-utils/logger.c | 23 ++++++++++++++++------- 3 files changed, 32 insertions(+), 8 deletions(-) commit c2ef308bbfdc9fb9a0053e258828f5bd6fbb0c5d Author: Karel Zak Date: Mon Mar 9 12:45:52 2015 +0100 agetty: reload issue on --autologin --login-pause too The current "agetty --reload" implementation does not refresh issue file output on autologin. Let's support this use-case too. Reported-by: Sitsofe Wheeler Signed-off-by: Karel Zak term-utils/agetty.c | 171 ++++++++++++++++++++++++++++------------------------ 1 file changed, 92 insertions(+), 79 deletions(-) commit c9f5ec0faa2b2d9cf7fc162baf99499457b8b909 Author: Karel Zak Date: Mon Mar 9 12:26:55 2015 +0100 agetty: make sure that reload file exists agetty monitors /run/agetty.reload file, unfortunately if the file does not exist when agetty starts up then "agetty" --reload does not work. This patch forces agetty to create the file before inotify is enabled. Reported-by: Sitsofe Wheeler Signed-off-by: Karel Zak term-utils/agetty.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) commit c958032a6d82c134683dadb4c859de532101bab1 Author: Karel Zak Date: Fri Mar 6 14:32:12 2015 +0100 build-sys: fix typo include/Makemodule.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f63faced16be616cd41f5ba39cd32db7b0d01c90 Author: Karel Zak Date: Fri Mar 6 14:23:57 2015 +0100 Revert "build-sys: remove static builds from make-check" The problem should be fixed now. This reverts commit 948b87581e7f1a430f258e169282a1755bb68edd. Makefile.am | 1 + 1 file changed, 1 insertion(+) commit 254743e4a6641173abfe342edd94902d9344f58b Author: Karel Zak Date: Fri Mar 6 14:20:19 2015 +0100 build-sys: cleanup realtime lib usage * check for timer_create() * define dependence on timer_create() for flock * rename CLOCKGETTIME_LIBS to REALTIME_LIBS Signed-off-by: Karel Zak configure.ac | 29 +++++++++++++++-------------- disk-utils/Makemodule.am | 2 +- libmount/src/Makemodule.am | 4 ++-- login-utils/Makemodule.am | 2 +- sys-utils/Makemodule.am | 6 +++--- 5 files changed, 22 insertions(+), 21 deletions(-) commit 26e8964b9db51e27cc6eaf5510ebc8eac8443f33 Author: Karel Zak Date: Fri Mar 6 13:17:20 2015 +0100 lib/timer: use separate file for timers It seems that static builds require -lpthread for timer_* functions. It's better to keep it out of our libs (e.g. libmount) to avoid unnecessary dependence. Signed-off-by: Karel Zak include/Makemodule.am | 21 +++++++++++---------- include/monotonic.h | 14 +++----------- include/timer.h | 11 +++++++++++ lib/monotonic.c | 40 ++-------------------------------------- lib/timer.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++ sys-utils/Makemodule.am | 2 +- sys-utils/flock.c | 1 + 7 files changed, 76 insertions(+), 60 deletions(-) commit f33383f7c2583ba484018b041331cf8b75ad5f04 Merge: 0d1f3a7 2346420 Author: Karel Zak Date: Fri Mar 6 12:36:17 2015 +0100 Merge branch 'logger-man-syslog-routine' of https://github.com/rgerhards/util-linux * 'logger-man-syslog-routine' of https://github.com/rgerhards/util-linux: logger man page: bump man page date to current logger man page: fix some "syslog(3) routine" remnants commit 2346420a01c563741f0368aeaf4b0cd124264d91 Author: Rainer Gerhards Date: Fri Mar 6 12:32:12 2015 +0100 logger man page: bump man page date to current misc-utils/logger.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a435617319861793e34563f58087d1b03f9549d4 Author: Rainer Gerhards Date: Fri Mar 6 12:30:56 2015 +0100 logger man page: fix some "syslog(3) routine" remnants misc-utils/logger.1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0d1f3a707d3d916ecd52669bae29d02c04bdeb6c Merge: 17d66cc 940a14a Author: Karel Zak Date: Fri Mar 6 12:31:48 2015 +0100 Merge branch 'logger-fix-tcp-framing' of https://github.com/rgerhards/util-linux * 'logger-fix-tcp-framing' of https://github.com/rgerhards/util-linux: logger: bugfix: tcp syslog framing is broken, -T unusable logger: refactor the way output is written commit 17d66ccc7516a5e2cf681abc73406559da41eaae Author: Karel Zak Date: Fri Mar 6 12:15:23 2015 +0100 logger: use username as the default tag Reported-by: Rainer Gerhards Signed-off-by: Karel Zak misc-utils/logger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 940a14a3515a0d8cddb338605e788315565fd6cc Author: Rainer Gerhards Date: Fri Mar 6 12:12:15 2015 +0100 logger: bugfix: tcp syslog framing is broken, -T unusable Logger can send via plain tcp syslog if -n -T options are given. However, the framing is broken so that a syslog receiver can not know where the first message ends and the next one starts. It actually looks like no framing at all is used. Plain TCP syslog framing is described in RFC6587. This patch adds RFC6587 octet-stuffed framing to TCP syslog. For local logging, this is always fine, for remote logging this is NOT recommended by the IETF (the RFC is historic). However, a full blown RFC5425 TLS sender seems to be out of scope for a tool like logger IMO. This patch also refactors the way output is written, seperating the message format generators from the output writer. misc-utils/logger.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 4be843064c700fb28cab869893c3d19392c4938d Author: Rainer Gerhards Date: Fri Mar 6 11:51:31 2015 +0100 logger: refactor the way output is written Previously, output was written in exactly the same way in three different places. This is now combined into a single function. This hopefully makes it easier to adapt to changing output needs. misc-utils/logger.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) commit 1c936504d5a21d54f13058f2cc47fef7f3d4c6bd Author: Karel Zak Date: Fri Mar 6 11:48:23 2015 +0100 logger: remove "interface to syslog(3)" from man page since v2.26 logger does not use syslog(3) anymore Reported-by: Rainer Gerhards Signed-off-by: Karel Zak misc-utils/logger.1 | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 59d6ed3f0179d35fd5fc27c87018906df1142d08 Merge: 0f1c825 d4c814b Author: Karel Zak Date: Fri Mar 6 11:32:17 2015 +0100 Merge branch 'logger-kernel-regression' of https://github.com/rgerhards/util-linux * 'logger-kernel-regression' of https://github.com/rgerhards/util-linux: logger: fix -p kern.* priority is accepted regression logger: messages are logged with kern.* priority by default commit 0f1c825b75f2a8e8c1a1979f59c90f20d3631a54 Author: Karel Zak Date: Fri Mar 6 11:27:16 2015 +0100 logger: fix whitespace and compiler warning [-Wunused-variable] misc-utils/logger.c: In function ‘syslog_rfc3164’: misc-utils/logger.c:336:9: warning: unused variable ‘now’ [-Wunused-variable] Signed-off-by: Karel Zak misc-utils/logger.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 603358d588136f44bd1eb71117a8a24b80b93982 Merge: c95d320 3070ca7 Author: Karel Zak Date: Fri Mar 6 11:25:56 2015 +0100 Merge branch 'logger-fix-local-timestamp' of https://github.com/rgerhards/util-linux * 'logger-fix-local-timestamp' of https://github.com/rgerhards/util-linux: logger: fix invalid timestamp regression in local format commit c95d3209093d284ca267e04fb684002f59401924 Author: Karel Zak Date: Fri Mar 6 11:05:30 2015 +0100 logger: add comment Signed-off-by: Karel Zak misc-utils/logger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d17bb3e7de9cb41821ca7f5d44bbbce629c9ed34 Merge: 0487bcb 7dc2080 Author: Karel Zak Date: Fri Mar 6 11:04:08 2015 +0100 Merge branch 'logger-format-fix' of https://github.com/rgerhards/util-linux * 'logger-format-fix' of https://github.com/rgerhards/util-linux: logger: fix inconsistent format regression when logging locally commit 0487bcb1a3db3906564780b37818ed9a93f425b0 Author: Karel Zak Date: Fri Mar 6 10:57:12 2015 +0100 libblkid: fix compiler warning [-Wunused-variable] libblkid/src/superblocks/zfs.c: In function 'probe_zfs': libblkid/src/superblocks/zfs.c:199:11: warning: unused variable 'swab_magic' [-Wunused-variable] Signed-off-by: Karel Zak libblkid/src/superblocks/zfs.c | 1 - 1 file changed, 1 deletion(-) commit 0f71ceb140d544ca1a28879ab20b2d32536f6e80 Merge: 948b875 e44a4c7 Author: Karel Zak Date: Fri Mar 6 10:53:22 2015 +0100 Merge branch 'zfs' of https://github.com/mihu/util-linux * 'zfs' of https://github.com/mihu/util-linux: zfs: make less syscalls blkid: make zfs detection more robust commit d4c814b18a489dc2aa41e768e6e3cad2f16a8af3 Author: Rainer Gerhards Date: Thu Mar 5 16:54:34 2015 +0100 logger: fix -p kern.* priority is accepted regression Pre 2.26, syslog(3) was used for local logging, and it did not accept kern.* priorities. This is re-enabled by the patch. misc-utils/logger.c | 2 ++ 1 file changed, 2 insertions(+) commit d0b6c4bf8d327cb9ce0dcaaae3fac1bf7c1d32a7 Author: Rainer Gerhards Date: Thu Mar 5 16:44:03 2015 +0100 logger: messages are logged with kern.* priority by default The default should be user.notice and kern.* should never be used (syslog(3) forbids this). This is a severe regression, as messages are now logged to the wrong bin or not at all. So they get lost and may confuse readers of the kernel bin. regression from 2.25.2 to 2.26 misc-utils/logger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 948b87581e7f1a430f258e169282a1755bb68edd Author: Karel Zak Date: Thu Mar 5 15:34:42 2015 +0100 build-sys: remove static builds from make-check .. temporary, the final solution has to cleanup timer_* functions usage. The function are unnecessary for libmount, but we use lib/monotme.c in the library and it probably requires -lrt and *also* -lpthread for static builds. Signed-off-by: Karel Zak Makefile.am | 1 - 1 file changed, 1 deletion(-) commit 3070ca77ac3b3a99b5392f0d192b71ff872e7109 Author: Rainer Gerhards Date: Thu Mar 5 15:20:50 2015 +0100 logger: fix invalid timestamp regression in local format Since 1d57503378bdcd838365d625f6d2d0a09da9c29d logger no longer uses the syslog(3) call. The way the local timestamp is generated did not match the syslog(3) format. Most importantly, the month name is formatted based on the user's local. For example: $ ./logger --stderr test with logger 2.26.39-eb651-dirty <5>Mär 5 14:17:47 logger: test with logger 2.26.39-eb651-dirty "Mär" like in German "März" for "March". previously: $ logger --stderr test with logger 2.25.2 rger: test with logger 2.25.2 In the system log file, this results to the following: Mar 5 14:17:47 host Mär 5 14:17:47 logger: test with logger 2.26.39-eb651-dirty Mar 5 14:18:01 host rger: test with logger 2.25.2 This local naming is invalid as of RFC3164. One may argue that the local log socket traditionally does not have RFC3164 format, but the timestamp always was as defined in RFC3164 (and along the lines of the ctime() call). Anything else would also be impractical, as a syslog parser would otherwise need to know about all potential locale-specific representations of month names. This patch corrects the problem and also refactors the timestamp handling a bit. The same timestamp is needed in local and rfc3164 processing, so there now is a new function to create that stamp. misc-utils/logger.c | 42 +++++++++++++++++++++++++++++------------- 1 file changed, 29 insertions(+), 13 deletions(-) commit 7dc2080433c35ac6fa310442f43cd93bf6f949e4 Author: Rainer Gerhards Date: Wed Mar 4 11:17:20 2015 +0100 logger: fix inconsistent format regression when logging locally The message format when writing to local sockets is inconsistent. Example: $ ./logger --stderr test <5>Mär 4 11:03:30 logger: test $ ./logger -u /dev/log --stderr test <5>1 2015-03-04T11:03:31.699841+0100 ubuntu1404esp rger - [timeQuality tzKnown="1" isSynced="1" syncAccuracy="29000"] test The regression was introduced with 4de2e8a03859aaab2c25dc98f33409cd28de6acc As far as the commit comments and man page indicates, this was meant to affect remote system logging only, but it also affects local logging when the -u option is given. This causes problems with receivers who do not expect full-blown RFC format on the log socket, like rsyslog. In consequence, this can also affect log analysis programs and invalidate some of their results. The patch corrects the behaviour so that the same old-style format is used for any type of local logging. New-style can always be selected by command line-options. RFC5424 is still the default for remote logging, as intended in the orignal commit. Result with the patch: $ ./logger --stderr test <5>Mär 4 11:15:35 logger: test $ ./logger -u /dev/log --stderr test <5>Mär 4 11:15:40 logger: test $ ./logger -u /dev/log --rfc5424 --stderr test <5>1 2015-03-04T11:21:28.796170+0100 ubuntu1404esp rger - [timeQuality tzKnown="1" isSynced="1" syncAccuracy="27500"] test misc-utils/logger.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit b9dedd3d34cb6d340c7dc229b598d4580c704c8c Author: Karel Zak Date: Thu Mar 5 13:32:53 2015 +0100 lib/monotonic: fix compiler warnings Signed-off-by: Karel Zak include/monotonic.h | 3 +++ 1 file changed, 3 insertions(+) commit b28842ae67557f503ae097d5101cbe0a93fda39d Author: Karel Zak Date: Thu Mar 5 12:25:28 2015 +0100 agetty: support /usr/lib/os-release too http://www.freedesktop.org/software/systemd/man/os-release.html The file /etc/os-release takes precedence over /usr/lib/os-release. Applications should check for the former, and exclusively use its data if it exists, and only fall back to /usr/lib/os-release if it is missing. Reported-by: Dimitri John Ledkov Signed-off-by: Karel Zak include/pathnames.h | 4 +++- term-utils/agetty.8 | 7 ++++--- term-utils/agetty.c | 9 ++++++--- 3 files changed, 13 insertions(+), 7 deletions(-) commit ec27f470483a7a617bd7227807d4faca16e2e652 Merge: e1f7791 2f26761 Author: Karel Zak Date: Thu Mar 5 11:52:00 2015 +0100 Merge branch 'logger-fix-rfc5424-timestamp' of https://github.com/rgerhards/util-linux * 'logger-fix-rfc5424-timestamp' of https://github.com/rgerhards/util-linux: logger: fix invalid timestamp in rfc5425 format commit e1f7791c8164eb3aafb6fdb8682ac156b697d2cc Author: Karel Zak Date: Thu Mar 5 11:11:53 2015 +0100 tailf: use size_t and fwrite() Let's use size_t for number of output lines and use fwrite() rather than while() { putchar() }; Signed-off-by: Karel Zak text-utils/tailf.c | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) commit 46cd5b1767c3ca638a3f9170bfc4463bc83b62b4 Author: Karel Zak Date: Thu Mar 5 10:47:59 2015 +0100 flock: fix timeout handler pointer usage Signed-off-by: Karel Zak include/monotonic.h | 2 +- lib/monotonic.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) commit bde76c048aaf6fc17f4d6f408a318a13efc32989 Author: Karel Zak Date: Thu Mar 5 10:29:10 2015 +0100 whereis: make "-BMS -f" more obvious in usage() Signed-off-by: Karel Zak misc-utils/whereis.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3f51c10b39920bd22a2760bd57cb5a5703b0ec2c Author: Sami Kerola Date: Fri Feb 20 19:42:34 2015 +0000 logger: fix -i argument parsing regression With earlier logger it's possible to combine the option -i with other options, such as -s. But currently: $:~> logger -is logger: failed to parse id: 's' The changed behaviour breaks existing scripts like dhcpcd-run-hooks from dhcpcd. Broken-since: aab5b44405b9a6ada92e419e5a84cc0d1d4afee9 Reference: http://comments.gmane.org/gmane.linux.utilities.util-linux-ng/9683 Reported-by: Juergen Daubert Reviewed-by: Benno Schulenberg Signed-off-by: Sami Kerola misc-utils/logger.1 | 5 ++++- misc-utils/logger.c | 13 +++++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) commit 9195eca64dcb9f25fec431fa24a3be6a8212b769 Author: Sami Kerola Date: Tue Feb 17 21:41:46 2015 +0000 tailf: ensure file argument really is a file The tailf(1) never worked very well with block or character devices, sockets, fifos and such. Now after mmap() is used to find last lines even the little command used to work for example pipes is broken, so test the tailf is asked to follow a file and when not fail. That said symlinks are OK, as long they point to a file. Signed-off-by: Sami Kerola text-utils/tailf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 16d3d9a04d5d2a7f4f10c3658cccc5aa0c7cd0af Author: Sami Kerola Date: Sun Feb 15 17:12:03 2015 +0000 tailf: do not allow minus signed last lines argument Before mmap() the command behavior was not completely correct, as demonstrated below, and after the mmap() it tried to print some eighteen quintillion lines. $ tailf -n-1 x tailf: cannot allocate 18446744073709543424 bytes: Cannot allocate memory Signed-off-by: Sami Kerola text-utils/tailf.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) commit a260b21bdb7a1592523de41bb09a13f9f460684d Author: Sami Kerola Date: Sun Feb 15 16:52:39 2015 +0000 tailf: count last lines correctly at initial print out When last lines happen to be greater than string buffer size for fgets() the number of printed lines resulted to too few. To avoid miscounts due insufficient buffer size use mmap() to map the whole file and rewind until requested number of new lines is found. Signed-off-by: Sami Kerola text-utils/tailf.c | 77 +++++++++++++++++++++++++----------------------------- 1 file changed, 36 insertions(+), 41 deletions(-) commit 7e5dd0e5bed95f3da369a912732ab500c3c15c5f Author: Sami Kerola Date: Sat Jan 10 15:04:27 2015 +0000 tunelp: use parse_switch() Signed-off-by: Sami Kerola sys-utils/tunelp.c | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) commit 378543e13f93c522b976efddd1610a19a6601b1c Author: Sami Kerola Date: Mon Feb 9 23:18:09 2015 +0000 flock: improve timeout handling Signal ALRM raised by the timer, and the timer only, will be considered as a timeout criteria. Secondly time interval is made to use monotonic clock. Documentation of ITIMER_REAL is unclear whether that time is affected various sources of clock skew, or does it even tick when system is suspended. Reviewed-by: Karel Zak Signed-off-by: Sami Kerola configure.ac | 14 ++++++++++---- include/Makemodule.am | 1 - include/monotonic.h | 4 ++++ include/timer.h | 31 ------------------------------- lib/monotonic.c | 34 ++++++++++++++++++++++++++++++++++ sys-utils/Makemodule.am | 2 +- sys-utils/flock.c | 17 ++++++++++------- 7 files changed, 59 insertions(+), 44 deletions(-) commit 2f267611f0d8d1ea6e9a2f404521e9208390bb21 Author: Rainer Gerhards Date: Wed Mar 4 18:50:30 2015 +0100 logger: fix invalid timestamp in rfc5425 format The timestamp is written as 2015-03-04T15:02:02.566782+0100 unfortunately, this is not an RFC3339 timestamp as demanded by rfc5424. The colon in the time offset field is missing. The correct timestamp is 2015-03-04T15:02:02.566782+01:00 (Note "+0100" vs. "+01:00") misc-utils/logger.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 59dc9f28b520561de5194d1217a77080a349e133 Author: Sami Kerola Date: Sat Feb 7 23:45:24 2015 +0000 flock: add --verbose option Jenkins script jobs using flock are a great example of a situation in which one may want an automation to be verbose, so that when unexpected events happen there is more hints in logs. Reviewed-by: Benno Schulenberg Signed-off-by: Sami Kerola sys-utils/Makemodule.am | 4 ++-- sys-utils/flock.1 | 4 ++++ sys-utils/flock.c | 31 +++++++++++++++++++++++++++++-- 3 files changed, 35 insertions(+), 4 deletions(-) commit a3d29ee0c7bc638d27666809e02245cacfa031e3 Author: Sami Kerola Date: Sat Feb 7 21:10:51 2015 +0000 whereis: tell when mandatory option is missing The list is terminated by any arbitrary option, but to be simple when none is specified complain about -f being missing. Reviewed-by: Benno Schulenberg Reviewed-by: Karel Zak Signed-off-by: Sami Kerola misc-utils/whereis.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit f71d1104df68e9ab7f06878c1c324566721acd66 Author: Karel Zak Date: Tue Mar 3 11:36:59 2015 +0100 build-sys: add --enable-usrdir-path The directories /{sbin,bin} are symliks to /usr/{sbin,bin} on many systems. This patch add new ./configure option to remove the non-usr paths from the default $PATH environment variable. The default $PATH is hardcoded in login(1) and can be overwritten by /etc/login.defs. default: ./test_pathnames | grep DEFPATH _PATH_DEFPATH /usr/local/bin:/bin:/usr/bin _PATH_DEFPATH_ROOT /usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin --enable-usrdir-path: ./test_pathnames | grep DEFPATH _PATH_DEFPATH /usr/local/bin:/usr/bin _PATH_DEFPATH_ROOT /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin This patch does not modify install paths, you still have to care about --{bin,lib}dir configure options. Signed-off-by: Karel Zak configure.ac | 10 ++++++++++ include/pathnames.h | 14 ++++++++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) commit b7c67e6414a68caaef133e978b3110d599f3d147 Author: Karel Zak Date: Mon Mar 2 13:58:23 2015 +0100 libfdisk: add {first,last}-lba header to sfdisk scritps The current sfdisk does not allow to create partition that starts before the default libfdisk First LBA (~1MiB). It means that # sfdisk --dump /dev/sda > foo # sfdisk /dev/sdb < foo does not work on systems where 1st partition does not start at offset 2048. This patch add new headers to scripts to inform libfdisk about different First/Last LBA ranges. For example: label: gpt first-lba: 34 allows to override the library default. Signed-off-by: Karel Zak libfdisk/src/gpt.c | 81 ++++++++++++++++++++++++++++++++++++++++++++++----- libfdisk/src/script.c | 23 +++++++++++++-- 2 files changed, 94 insertions(+), 10 deletions(-) commit e44a4c7ac9522c03b76d8b62ce88b443771fdb0b Author: Michal Humpula Date: Sat Feb 28 21:19:42 2015 +0100 zfs: make less syscalls libblkid/src/superblocks/zfs.c | 95 ++++++++++++++++++++++++++---------------- 1 file changed, 58 insertions(+), 37 deletions(-) commit 14160b7bd08f54f977993cae4c4ed2cbfcb9d1ae Author: Peter Cordes Date: Tue Feb 24 22:40:41 2015 -0400 docs: fstab(5) grammar / English fixes, and some other updates I proofread the whole thing. I fixed everything that I thought could use improvement. various grammar and man page style-guide fixes (commas, word order, etc.). Reworded a couple things to hopefully make it clear to someone that didn't already know about fstab. Re-ordered the intro paragraphs for easier skimming. And added an example line. Expanded on a couple things other things. Tightened up the wording in some other places to get the point across faster and in less space. Thanks to Benno Schulenberg for several improvements. Signed-off-by: Peter Cordes sys-utils/fstab.5 | 99 ++++++++++++++++++++++++++++++++----------------------- 1 file changed, 58 insertions(+), 41 deletions(-) commit a55f60a1076b60381e598aad60a6471d40ef3bff Author: Bill Pemberton Date: Wed Feb 25 09:07:59 2015 -0500 docs: fix some spelling errors and typos in man pages runuser.1: fix spelling implemenation -> implementation scriptreplay.1: fix spelling overide -> override unshare.1: fix spelling permamently -> permanently last.1: fix spelling preferrable -> preferable lslogins.1: fix spelling priviliges -> privileges hwclock.8.in: fix spelling transfered -> transferred prlimit.1: fix typo umlimited -> unlimited agetty.8: fix typo unnsupported -> unsupported Signed-off-by: Bill Pemberton login-utils/last.1 | 2 +- login-utils/lslogins.1 | 2 +- login-utils/runuser.1 | 2 +- sys-utils/hwclock.8.in | 2 +- sys-utils/prlimit.1 | 2 +- sys-utils/unshare.1 | 2 +- term-utils/agetty.8 | 2 +- term-utils/scriptreplay.1 | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) commit 342172b24d8f0241a5de6ff9fa9bb998ca3c7e0f Author: Karel Zak Date: Fri Feb 27 14:46:43 2015 +0100 docs: update TODO Signed-off-by: Karel Zak Documentation/TODO | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 4310faf9507b863adf0d735564f28db5c68ca600 Author: Karel Zak Date: Fri Feb 27 13:57:34 2015 +0100 lib/colors: use libtinfo to check terminal capability The current implementation assumes that all terminals supports colors and users are forcet to use terminal-colors.d/ to disable colors for some terminals. This patch checks for maximal supported colors for the current terminal and colors are automatically disabled for terminals like vt100. The patch moves lib/colors.c from libcommon.la to libtcolors.la to avoid collisions with another utils. Signed-off-by: Karel Zak configure.ac | 3 +++ disk-utils/Makemodule.am | 6 +++--- lib/Makemodule.am | 14 ++++++++++++-- lib/colors.c | 35 ++++++++++++++++++++++++++++++++--- libsmartcols/src/Makemodule.am | 5 +++-- misc-utils/Makemodule.am | 2 +- sys-utils/Makemodule.am | 3 ++- text-utils/Makemodule.am | 2 +- 8 files changed, 57 insertions(+), 13 deletions(-) commit f5cd0f62314db4cdb5deb5a9a8421de88f042237 Merge: 5d51dc2 cd744d0 Author: Karel Zak Date: Thu Feb 26 10:43:36 2015 +0100 Merge branch 'fixes' of https://github.com/rudimeier/util-linux * 'fixes' of https://github.com/rudimeier/util-linux: logger: link libsystemd-daemon.so commit 5dd705ba65dc80cf8630b3b1b4f3a1ba153e7eec Author: Michal Humpula Date: Wed Feb 25 20:25:05 2015 +0100 blkid: make zfs detection more robust Try to use all the possible uberblock locations. libblkid/src/superblocks/zfs.c | 42 +++++++++++++++++++++++++++--------------- 1 file changed, 27 insertions(+), 15 deletions(-) commit 5d51dc2a7f04d01b33505737fce0f7325c6487b8 Author: Karel Zak Date: Wed Feb 25 12:37:55 2015 +0100 colors: cleanup man pages, add hint to usage() cfdisk, fdisk, calm dmesg and hexdump Signed-off-by: Karel Zak Signed-off-by: Karel Zak disk-utils/cfdisk.8 | 7 ++++--- disk-utils/cfdisk.c | 6 ++++-- disk-utils/fdisk.8 | 6 ++++-- disk-utils/fdisk.c | 3 +++ misc-utils/cal.1 | 21 +++++++-------------- misc-utils/cal.c | 3 +++ sys-utils/dmesg.1 | 5 +++-- sys-utils/dmesg.c | 2 ++ text-utils/hexdump.1 | 5 +++-- text-utils/hexdump.c | 2 ++ 10 files changed, 35 insertions(+), 25 deletions(-) commit da25898b7ad6fd62017696ec7802b17c2b315ac1 Author: Karel Zak Date: Wed Feb 25 12:35:45 2015 +0100 sfdisk: add missing --color The util already support lib/colors.c stuff, but without command line option. Signed-off-by: Karel Zak disk-utils/sfdisk.8 | 25 +++++++++++++++++++++++++ disk-utils/sfdisk.c | 18 +++++++++++++++--- 2 files changed, 40 insertions(+), 3 deletions(-) commit 62dc0ee83b7043f15d95d57eb464d31407872ed8 Author: Karel Zak Date: Wed Feb 25 12:35:05 2015 +0100 lib/colors: add USAGE_COLORS_DEFAULT Signed-off-by: Karel Zak include/colors.h | 7 +++++++ 1 file changed, 7 insertions(+) commit 81f55ab9043cfa26851a9dbeb356e5dc7f791a45 Author: Karel Zak Date: Wed Feb 25 10:06:40 2015 +0100 build-sys: add --disable-colors-default The current util-linux is to have enabled colorized outputs by default, this default behavior is possible to change by new configure option --disable-colors-default. Signed-off-by: Karel Zak configure.ac | 10 ++++++++++ lib/colors.c | 13 +++++++++++-- 2 files changed, 21 insertions(+), 2 deletions(-) commit cd744d00e60e7e01e532d8a38789007dd5867e4c Author: Ruediger Meier Date: Tue Feb 24 16:26:00 2015 +0100 logger: link libsystemd-daemon.so Noticed on openSUSE 13.1: util-linux-2.26/misc-utils/logger.c:735: undefined reference to `sd_booted' Introduced in d77dc29e. CC: Sami Kerola Signed-off-by: Ruediger Meier misc-utils/Makemodule.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 52a49e9add7b3618c65782b64c48226311dda01a Author: Sami Kerola Date: Sun Feb 22 14:41:45 2015 +0000 logger: move /dev/log to pathnames.h Signed-off-by: Sami Kerola include/pathnames.h | 3 +++ misc-utils/logger.c | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) commit cd2a6f1cfd1ca85aae127fcdb249df46163d1a7c Author: Sami Kerola Date: Sun Feb 22 14:41:40 2015 +0000 rpmatch: use symbolic value when evaluation return codes Signed-off-by: Sami Kerola disk-utils/fdisk.c | 2 +- disk-utils/fsck.minix.c | 6 +++--- disk-utils/sfdisk.c | 2 +- include/rpmatch.h | 4 ++++ login-utils/vipw.c | 2 +- term-utils/mesg.c | 6 +++--- 6 files changed, 13 insertions(+), 9 deletions(-) commit 47d20536e08fd1daa7023a56d6e97ae09cb2ea1b Author: Sami Kerola Date: Sun Feb 22 14:41:39 2015 +0000 eject: use parse_switch() [kzak@redhat.com: - use extended parse_switch()] Signed-off-by: Sami Kerola Signed-off-by: Karel Zak sys-utils/eject.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) commit 30b294c491b4577d5f0e5c94f17cf9e36a8ecb72 Author: Karel Zak Date: Tue Feb 24 12:04:22 2015 +0100 lib/strutils: extend parse_switch() to accept more options * allow to specify more 0|1 pairs * allow to specify error message Signed-off-by: Karel Zak include/strutils.h | 2 +- lib/strutils.c | 30 ++++++++++++++++++++++++------ term-utils/setterm.c | 36 ++++++++++++++++++++++++------------ 3 files changed, 49 insertions(+), 19 deletions(-) commit e5cf14765502931f7a89c95feee712e27f9003cc Author: Sami Kerola Date: Sun Feb 22 14:41:37 2015 +0000 lib/strutils: move parse_switch() from setterm(1) to library To allow sharing the code with other utilities. Signed-off-by: Sami Kerola Signed-off-by: Karel Zak include/strutils.h | 2 ++ lib/strutils.c | 8 ++++++++ term-utils/setterm.c | 16 ---------------- 3 files changed, 10 insertions(+), 16 deletions(-) commit c45c3837b6a9613a02dd15a0ce232cc1d7c99399 Author: Sami Kerola Date: Sun Feb 22 14:41:36 2015 +0000 tunelp: remove unnecessary preprocessor directives The lp.h included earlier in the tunelp.c has the definitions that were checked, so these statements could have not been false and such impossible conditions does not need to be checked. Signed-off-by: Sami Kerola sys-utils/tunelp.c | 8 -------- 1 file changed, 8 deletions(-) commit 7e3c80a7b6d652cf45fbfe2431cb24de74c72185 Author: Sami Kerola Date: Sun Feb 22 14:41:35 2015 +0000 tunelp: remove get_val() in favour of strtol_or_err() Signed-off-by: Sami Kerola sys-utils/Makemodule.am | 1 + sys-utils/tunelp.c | 22 ++++++++-------------- 2 files changed, 9 insertions(+), 14 deletions(-) commit 288cb6f5dd72e4f4fe7dfb45015eaca6d7317995 Author: Sami Kerola Date: Sun Feb 22 14:41:34 2015 +0000 prlimit: tell in --verbose output which pid got the new limit Signed-off-by: Sami Kerola sys-utils/prlimit.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit af17d349fcbb6f42dcac66d13c44e8697410e6de Author: Karel Zak Date: Mon Feb 23 15:45:41 2015 +0100 libblkid: cleanup names, don't copy probing results * cleanup function and variable names (s/vals/values/) * in "safe probe" mode libblkid copies probing result from the first attempt, this is unnecessary, with values list we can just move values to another list rather than copy all. * add new debug messages Signed-off-by: Karel Zak libblkid/src/blkidP.h | 12 ++-- libblkid/src/partitions/partitions.c | 6 +- libblkid/src/probe.c | 108 ++++++++++++++++++++------------- libblkid/src/superblocks/superblocks.c | 40 ++++++------ libblkid/src/topology/topology.c | 2 +- 5 files changed, 100 insertions(+), 68 deletions(-) commit 6c4a7811f85fc64cb0b0fb9f3e266592ed9c40dc Author: Ondrej Oprala Date: Tue Feb 3 16:30:15 2015 +0100 libblkid: make probing data structures more dynamic * replace static probing result array with list * use allocated buffers for probing result variables [kzak@redhat.com: - rename some functions - clean up \0 terminator usage in variables - remove never used code to convert UUID to lower-case - remove possible memory leaks on errors] Signed-off-by: Ondrej Oprala Signed-off-by: Karel Zak libblkid/src/blkidP.h | 40 +++---- libblkid/src/encode.c | 6 + libblkid/src/partitions/partitions.c | 30 ++--- libblkid/src/probe.c | 201 ++++++++++++++++++++++----------- libblkid/src/superblocks/superblocks.c | 186 ++++++++++++++++-------------- 5 files changed, 273 insertions(+), 190 deletions(-) commit 85589c4c4975c3a9c12663cbd5e16904cdbdaac7 Author: Karel Zak Date: Thu Feb 19 14:31:02 2015 +0100 docs: add terminal-colors requests to TODO Signed-off-by: Karel Zak Documentation/TODO | 8 ++++++++ 1 file changed, 8 insertions(+) commit 946522184877d2a05d2697400365994084bbebe4 Author: Karel Zak Date: Thu Feb 19 13:43:42 2015 +0100 tools: add libfdisk docs to kernel.org release generator Signed-off-by: Karel Zak tools/ko-release-gen | 1 + 1 file changed, 1 insertion(+)