Changes between v2.25.2 and v2.26-rc1 -------------------------------------------- commit 32511bfbab3189d62a9275c31dadded425165897 Author: Karel Zak Date: Wed Jan 14 12:51:33 2015 +0100 build-sys: release++ (v2.26-rc1) Signed-off-by: Karel Zak NEWS | 4 ++++ configure.ac | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) commit dec14209b5e28a3713d3a4b939ff337d92630122 Author: Karel Zak Date: Wed Jan 14 12:50:18 2015 +0100 docs: update v2.26-ReleaseNotes Signed-off-by: Karel Zak Documentation/releases/v2.26-ReleaseNotes | 893 ++++++++++++++++++++++++++++++ 1 file changed, 893 insertions(+) commit 2d7dffebac9faab497340b695b6e976e1ccca652 Author: Karel Zak Date: Wed Jan 14 12:07:52 2015 +0100 fdisk: add --output to usage() Signed-off-by: Karel Zak disk-utils/fdisk.c | 2 ++ 1 file changed, 2 insertions(+) commit 722a162913cfdf0c9a2370a9a9011af9f3baa3c7 Author: Karel Zak Date: Wed Jan 14 11:17:11 2015 +0100 docs: update AUTHORS file Signed-off-by: Karel Zak AUTHORS | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) commit 6bbace6dc7ab33aceea4e5ff7d4a2806f2ab3f23 Author: Karel Zak Date: Wed Jan 14 11:08:35 2015 +0100 po: merge changes Signed-off-by: Karel Zak po/ca.po | 9811 ++++++++++-------- po/cs.po | 9874 ++++++++++-------- po/da.po | 9708 +++++++++-------- po/de.po | 9859 ++++++++++-------- po/es.po | 9518 +++++++++-------- po/et.po | 9485 +++++++++-------- po/eu.po | 9280 +++++++++-------- po/fi.po | 9546 +++++++++-------- po/fr.po | 9885 ++++++++++-------- po/gl.po | 8765 +++++++++------- po/hr.po | 8589 ++++++++------- po/hu.po | 9824 ++++++++++-------- po/id.po | 9820 ++++++++++-------- po/it.po | 9811 ++++++++++-------- po/ja.po | 10024 ++++++++++-------- po/nl.po | 9866 ++++++++++-------- po/pl.po | 9540 +++++++++-------- po/pt_BR.po | 9886 ++++++++++-------- po/ru.po | 10656 ++++++++++--------- po/sl.po | 9809 +++++++++-------- po/sv.po | 9821 ++++++++++-------- po/tr.po | 9836 ++++++++++-------- po/uk.po | 9783 +++++++++-------- po/util-linux.pot | 8245 ++++++++------- po/vi.po | 9888 ++++++++++-------- po/zh_CN.po | 9787 +++++++++-------- po/zh_TW.po | 29433 ++++++++++++++++++++++++++++------------------------ 27 files changed, 155601 insertions(+), 124748 deletions(-) commit bc8fce86e79fc64be0b31c8b80de4fda6b61049b Author: Karel Zak Date: Wed Jan 14 10:59:56 2015 +0100 docs: add TODO entry for libblkid Signed-off-by: Karel Zak Documentation/TODO | 7 +++++++ 1 file changed, 7 insertions(+) commit a8d94acdee58060b32bdb00f0dbfdffc64135ca8 Author: Wei-Lun Chao Date: Wed Jan 14 10:49:02 2015 +0100 po: update zh_TW.po (from translationproject.org) po/zh_TW.po | 28041 +++++++++++++++++++++++++++------------------------------- 1 file changed, 13068 insertions(+), 14973 deletions(-) commit 9f35ba8498bd2306c57425c2b9dcf3daef89ddc2 Author: Wylmer Wang Date: Wed Jan 14 10:49:02 2015 +0100 po: update zh_CN.po (from translationproject.org) po/zh_CN.po | 2821 +++++++++++++++++++++++++++-------------------------------- 1 file changed, 1312 insertions(+), 1509 deletions(-) commit a2272d3b66774e9ba6d109f19c747fedb1f2b4c3 Author: Trần Ngọc Quân Date: Wed Jan 14 10:49:01 2015 +0100 po: update vi.po (from translationproject.org) po/vi.po | 1384 +++++++++++++++++++++++++++++++------------------------------- 1 file changed, 701 insertions(+), 683 deletions(-) commit d1ff547a3f56cebf2f0d58415ab695746790f7ef Author: Yuri Chornoivan Date: Wed Jan 14 10:49:01 2015 +0100 po: update uk.po (from translationproject.org) po/uk.po | 1381 ++++++++++++++++++++++++++++++++------------------------------ 1 file changed, 710 insertions(+), 671 deletions(-) commit 0fb0bb4d3da95d98d4547506137f91d50318929d Author: Pavel Maryanov Date: Wed Jan 14 10:49:01 2015 +0100 po: update ru.po (from translationproject.org) po/ru.po | 12604 +++++++++++++++++++++++++++++-------------------------------- 1 file changed, 5995 insertions(+), 6609 deletions(-) commit 069497f270add0f6092a91df4a09626ee2612206 Author: Rafael Ferreira Date: Wed Jan 14 10:49:01 2015 +0100 po: update pt_BR.po (from translationproject.org) po/pt_BR.po | 2772 ++++++++++++++++++++++++++++------------------------------- 1 file changed, 1331 insertions(+), 1441 deletions(-) commit f0baa8c29e350ad8a13de38aa6b044f9674c7fae Author: Jakub Bogusz Date: Wed Jan 14 10:49:01 2015 +0100 po: update pl.po (from translationproject.org) po/pl.po | 1340 +++++++++++++++++++++++++++++++------------------------------- 1 file changed, 670 insertions(+), 670 deletions(-) commit b333a3e21b647fee0ce451b3075bed2164d47b3a Author: Benno Schulenberg Date: Wed Jan 14 10:49:01 2015 +0100 po: update nl.po (from translationproject.org) po/nl.po | 1450 ++++++++++++++++++++++++++++++++------------------------------ 1 file changed, 752 insertions(+), 698 deletions(-) commit 9ea3a6481b95a1366772b063736b1794afd85f1d Author: Takeshi Hamasaki Date: Wed Jan 14 10:49:01 2015 +0100 po: update ja.po (from translationproject.org) po/ja.po | 2315 +++++++++++++++++++++++++++++++++----------------------------- 1 file changed, 1228 insertions(+), 1087 deletions(-) commit d24cc9ed9c471f5e16562c05617b33d407c3c639 Author: David Prévot Date: Wed Jan 14 10:49:01 2015 +0100 po: update fr.po (from translationproject.org) po/fr.po | 1443 ++++++++++++++++++++++++++++++++------------------------------ 1 file changed, 744 insertions(+), 699 deletions(-) commit 9d5bd7b77cb37a20dcf8a7d67012f336a9506eba Author: Lauri Nurmi Date: Wed Jan 14 10:49:01 2015 +0100 po: update fi.po (from translationproject.org) po/fi.po | 1508 +++++++++++++++++++++++++++++++------------------------------- 1 file changed, 754 insertions(+), 754 deletions(-) commit 93aeb03b758cb668339b6cbb3a022364a7a90781 Author: Antonio Ceballos Roa Date: Wed Jan 14 10:49:01 2015 +0100 po: update es.po (from translationproject.org) po/es.po | 6779 +++++++++++++++++++++++++++++++------------------------------- 1 file changed, 3387 insertions(+), 3392 deletions(-) commit 7734be5e60f852bf3e7f8c3f88b0bbed453d6ed8 Author: Mario Blättermann Date: Wed Jan 14 10:49:01 2015 +0100 po: update de.po (from translationproject.org) po/de.po | 1425 ++++++++++++++++++++++++++++++++------------------------------ 1 file changed, 746 insertions(+), 679 deletions(-) commit 98d80d78b5e2b30844681178719189b5460604e7 Author: Joe Hansen Date: Wed Jan 14 10:49:01 2015 +0100 po: update da.po (from translationproject.org) po/da.po | 3364 ++++++++++++++++++++++++++++++-------------------------------- 1 file changed, 1629 insertions(+), 1735 deletions(-) commit 92ec2efbf91d3096a9041f612f6ba02c3871c4d7 Author: Petr Písař Date: Wed Jan 14 10:49:01 2015 +0100 po: update cs.po (from translationproject.org) po/cs.po | 2704 ++++++++++++++++++++++++++++++-------------------------------- 1 file changed, 1298 insertions(+), 1406 deletions(-) commit 7e9dddc67be88e0a6776f32620fa59b6454ee801 Merge: 9732525 1afe041 Author: Karel Zak Date: Wed Jan 14 10:29:44 2015 +0100 Merge branch 'isa' of github.com:jwpi/util-linux * 'isa' of github.com:jwpi/util-linux: hwclock: update man-page for directisa change hwclock: remove automatic ISA fallback commit 1afe0412e07cd20550cdd98708a8a1b5bbd958ed Author: J William Piggott Date: Tue Jan 13 20:31:47 2015 -0500 hwclock: update man-page for directisa change Update man-page for the direct ISA options changes. Signed-off-by: J William Piggott sys-utils/hwclock.8.in | 75 ++++++++++++++++++++++---------------------------- 1 file changed, 33 insertions(+), 42 deletions(-) commit 97c9060b92a1064e192dd0234f4bb0bcced12bda Author: J William Piggott Date: Tue Jan 13 20:29:21 2015 -0500 hwclock: remove automatic ISA fallback The old behavior when hwclock was unable to access the rtc device was to fallback to direct ISA I/O. This was sometimes allowing two processes to access the Hardware Clock at the same time and hanging the system. This is the reason the rtc device driver only allows one process to open it. Now hwclock defaults to using the rtc device and only uses direct ISA when that option is given. Signed-off-by: J William Piggott sys-utils/hwclock.c | 7 ------- 1 file changed, 7 deletions(-) commit 973252578d6cc11cd55b0c76621c92ff95b696ba Author: J William Piggott Date: Tue Jan 13 10:34:59 2015 -0500 docs: fix-up man-pages flaged by checkmans.sh disk-utils/sfdisk.8 Fix font escape login-utils/vipw.8 Delete bogus macro misc-utils/look.1 Delete bogus macro sys-utils/prlimit.1 Delete bogus macro Signed-off-by: J William Piggott disk-utils/sfdisk.8 | 2 +- login-utils/vipw.8 | 1 - misc-utils/look.1 | 1 - sys-utils/prlimit.1 | 1 - 4 files changed, 1 insertion(+), 4 deletions(-) commit b8239769f98b2c3efe5ae334dbfb22dc448079d7 Author: J William Piggott Date: Mon Jan 12 21:14:55 2015 -0500 tools: checkmans.sh add stats Add test results statistics. Fix-up 'KNOWN_REPEATS'. Version bump. Signed-off-by: J William Piggott tools/checkmans.sh | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) commit 7d2ba7ad234d0a33232c0d7728a36eb127f1484b Author: J William Piggott Date: Mon Jan 12 20:30:01 2015 -0500 tools: checkmans.sh clean up 'let' Clean up 'let' issues and loop iteration. Signed-off-by: J William Piggott tools/checkmans.sh | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit 34317b92921b4e26c8f5d22603c5bfa726b775db Author: J William Piggott Date: Mon Jan 12 15:19:45 2015 -0500 tools: checkman.sh portability lexgrog checkman.sh depends upon the man-db package: Add using grog when lexgrog not installed. /dev/null some troff noise. Signed-off-by: J William Piggott tools/checkmans.sh | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) commit d1fd99e8e0d874c3059d085d8d5871f763a40939 Author: J William Piggott Date: Mon Jan 12 14:26:06 2015 -0500 tools: checkman.sh portability checkman.sh fails if 'git' or 'lib' are anywhere in the tested file's path: Change to using relative paths. Improve the 'find' command call. checkman.sh depends upon the man-db package: Remove all instants of the man command and use troff directly to improve portability. Signed-off-by: J William Piggott tools/checkmans.sh | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) commit 2e5bf10e32b00c92a3f7fb8b38d793ea6fc1dff2 Author: Karel Zak Date: Tue Jan 13 16:59:03 2015 +0100 build-sys: add sfdisk.static Signed-off-by: Karel Zak disk-utils/Makemodule.am | 8 ++++++++ 1 file changed, 8 insertions(+) commit 554ee2437a52fe97982f58059459b16d7781b8e6 Author: Karel Zak Date: Tue Jan 13 16:58:46 2015 +0100 tests: update build tests Signed-off-by: Karel Zak tests/expected/build-sys/config-all | 14 ++++++++------ tests/expected/build-sys/config-all-non-nls | 14 ++++++++------ tests/expected/build-sys/config-audit | 14 ++++++++------ tests/expected/build-sys/config-chfnsh-libuser | 14 ++++++++------ tests/expected/build-sys/config-chfnsh-no-password | 14 ++++++++------ tests/expected/build-sys/config-chfnsh-pam | 14 ++++++++------ tests/expected/build-sys/config-core | 14 ++++++++------ tests/expected/build-sys/config-devel | 14 ++++++++------ tests/expected/build-sys/config-devel-non-docs | 14 ++++++++------ tests/expected/build-sys/config-non-libblkid | 14 ++++++++------ tests/expected/build-sys/config-non-libmount | 14 ++++++++------ tests/expected/build-sys/config-non-libs | 7 +++---- tests/expected/build-sys/config-non-libsmartcols | 8 ++++---- tests/expected/build-sys/config-non-libuuid | 8 ++++---- tests/expected/build-sys/config-non-nls | 14 ++++++++------ tests/expected/build-sys/config-selinux | 14 ++++++++------ tests/expected/build-sys/config-slang | 14 ++++++++------ tests/expected/build-sys/config-static | 15 +++++++++------ 18 files changed, 132 insertions(+), 102 deletions(-) commit 1c50f026120e27cb7144fa2b8b6c38b2555168ed Author: Karel Zak Date: Tue Jan 13 13:47:48 2015 +0100 hwclock: exclude also i386 from CMOS auto-probing sys-utils/hwclock.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 791da22d0ed6882ac1dae6cdb334910328a5f6b9 Author: Karel Zak Date: Tue Jan 13 13:46:31 2015 +0100 libfdisk: add version.c Signed-off-by: Karel Zak Makefile.am | 3 + configure.ac | 3 + libfdisk/docs/libfdisk-docs.xml | 2 + libfdisk/docs/libfdisk-sections.txt | 12 +++- libfdisk/src/Makemodule.am | 9 ++- libfdisk/src/libfdisk.h.in | 9 +++ libfdisk/src/libfdisk.sym | 5 +- libfdisk/src/version.c | 125 ++++++++++++++++++++++++++++++++++++ 8 files changed, 165 insertions(+), 3 deletions(-) commit dee59a1ee619448e93bc05520d28615640779f6f Author: Karel Zak Date: Tue Jan 13 13:46:09 2015 +0100 libfdisk: fix some typos Signed-off-by: Karel Zak libfdisk/src/context.c | 2 +- libfdisk/src/label.c | 8 ++++---- libfdisk/src/script.c | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) commit 325165d0c360d7d7c9cd343750f566cd60115026 Author: Karel Zak Date: Tue Jan 13 13:40:25 2015 +0100 libblkid: fix compiler warnings [-Wpointer-sign] Signed-off-by: Karel Zak libblkid/src/superblocks/udf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2473b711822be0e4280c76eba9ec30da1ec5457d Author: Karel Zak Date: Tue Jan 13 12:23:40 2015 +0100 libsmartcols: (docs) improve section descriptions Signed-off-by: Karel Zak libsmartcols/src/cell.c | 2 +- libsmartcols/src/column.c | 2 +- libsmartcols/src/line.c | 2 +- libsmartcols/src/symbols.c | 2 +- libsmartcols/src/table.c | 2 +- libsmartcols/src/table_print.c | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) commit 05cdd0bf45eb29ff6d20a3e9d7018dfd1618a062 Author: Karel Zak Date: Tue Jan 13 12:13:09 2015 +0100 libmount: (docs) add monitor example Signed-off-by: Karel Zak libmount/src/monitor.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 2b6c532e171ca5c3c8b4372d27e43117c2db1cdc Author: Karel Zak Date: Tue Jan 13 12:03:17 2015 +0100 docs: update API docs years Signed-off-by: Karel Zak libfdisk/docs/libfdisk-docs.xml | 2 +- libmount/docs/libmount-docs.xml | 2 +- libsmartcols/docs/libsmartcols-docs.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 0cf8312703d711f7a3e55d47e13266184501672c Author: Karel Zak Date: Tue Jan 13 11:57:15 2015 +0100 libmount: cleanup gtk-docs warnings Signed-off-by: Karel Zak libmount/docs/libmount-sections.txt | 7 ++++++- libmount/src/cache.c | 2 +- libmount/src/libmount.h.in | 2 +- libmount/src/libmount.sym | 2 +- libmount/src/monitor.c | 10 +++++----- 5 files changed, 14 insertions(+), 9 deletions(-) commit fed9b1775dce29a10f1a0f0d081bc8ad75d61765 Author: Karel Zak Date: Tue Jan 13 11:56:57 2015 +0100 libsmartcols: cleanup gtk-docs warnings Signed-off-by: Karel Zak libsmartcols/src/cell.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0c07055c39d38c106782db4ef5e806535641c556 Author: Karel Zak Date: Tue Jan 13 11:45:19 2015 +0100 libfdisk: cleanup gtk-docs warnings Signed-off-by: Karel Zak libfdisk/docs/libfdisk-sections.txt | 18 +++++++++- libfdisk/src/alignment.c | 4 +-- libfdisk/src/label.c | 2 +- libfdisk/src/libfdisk.h.in | 71 +++++++++++++++++++++++-------------- libfdisk/src/partition.c | 6 ++-- libfdisk/src/table.c | 5 +-- 6 files changed, 70 insertions(+), 36 deletions(-) commit a434e2398ae9ac5ccf3ec5ec7d50638a38ae95f6 Author: Karel Zak Date: Tue Jan 13 09:53:46 2015 +0100 raw: fix raw query Bug introduced by commit cd121363. References: https://bugzilla.redhat.com/show_bug.cgi?id=1181444 Signed-off-by: Karel Zak disk-utils/raw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9f109204b25b8102ed484267963bb6e2749f9dd8 Author: Karel Zak Date: Tue Jan 13 09:44:11 2015 +0100 hwclock: don't check CMOS automatically on x86_64 We have enabled CMOS also for x86_64, but it should be available only if --directisa is explicitly specified. Signed-off-by: Karel Zak sys-utils/hwclock.c | 4 ++++ 1 file changed, 4 insertions(+) commit 69a7761b957b70297ab10e6ace2c03facac721ce Author: Lubomir Rintel Date: Sun Dec 28 21:23:37 2014 +0100 unshare: add some examples ...and fix one typo. Signed-off-by: Lubomir Rintel Signed-off-by: Karel Zak sys-utils/unshare.1 | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit d1bfa4ef53e07209ab09a1f911bd00c58d0734fd Author: JWP Date: Fri Jan 9 13:43:38 2015 -0500 hwclock: man regression Fixes merge for commit 2ed1d70 that clobbered commit 98ac774 Signed-off-by: J William Piggott sys-utils/hwclock.8.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5edb0ea6bbd57dd916417737f98c9109dc1ecb5b Author: Karel Zak Date: Mon Jan 12 12:19:54 2015 +0100 setarch: cleanup options usage * call --help, --verbose and --list from one place only * add 'archwrapper' variable to detect when called by symplink * make --list available only got setchar(8) (but no for symlinks) Reported-by: Benno Schulenberg Signed-off-by: Karel Zak sys-utils/setarch.c | 66 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 38 insertions(+), 28 deletions(-) commit 8854b121fd7762c18550a7a4d7b7c849ac98aa52 Author: Benno Schulenberg Date: Sat Jan 10 14:41:33 2015 +0100 docs: mention that setarch may not be able to set all listed architectures [[kzak@redhat.com: - use minus in option name\ Signed-off-by: Benno Schulenberg Signed-off-by: Karel Zak sys-utils/setarch.8 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 1e098672f4a98abc2b0b387025a55e5f9821cba3 Author: Benno Schulenberg Date: Sat Jan 10 14:41:32 2015 +0100 setarch: differentiate between "unrecognized" and "cannot set" When the provided string does not match any architecture that setarch knows about, the response stays "Unrecognized architecture", but when trying to set the specified architecture does not have any effect, then respond with "Kernel cannot set architecture to...". Signed-off-by: Benno Schulenberg sys-utils/setarch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4926bc368352fe4324b4c38121f533ed88dbe320 Author: Karel Zak Date: Mon Jan 12 11:15:55 2015 +0100 partx: don't use "hard drive" in man pages Signed-off-by: Karel Zak disk-utils/addpart.8 | 2 +- disk-utils/delpart.8 | 2 +- disk-utils/resizepart.8 | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit e04b8124070aa8129289898d91a8a7b862291bf4 Author: Benno Schulenberg Date: Sun Jan 11 22:27:58 2015 +0100 docs: make the wording of the partx man page a bit more precise Signed-off-by: Benno Schulenberg disk-utils/partx.8 | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) commit 4b8dfcc8a46b5f88501b5072555c3db1eb2eb0a1 Author: Benno Schulenberg Date: Sun Jan 11 22:27:57 2015 +0100 partx: simplify a --verbose progress message Reported-by: Antonio Ceballos Signed-off-by: Benno Schulenberg disk-utils/partx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3a60b1c26bc216d3fdea1e05aaf9e53b6a2e747d Author: Benno Schulenberg Date: Sun Jan 11 22:27:56 2015 +0100 docs: remove obsolete and unneeded comments from man-page files Transform some of them into copyright lines. Also fix three header lines and snip some trailing whitespace. Signed-off-by: Benno Schulenberg disk-utils/blockdev.8 | 2 -- disk-utils/fsck.8 | 1 - disk-utils/fsck.cramfs.8 | 2 +- disk-utils/fsck.minix.8 | 3 +-- disk-utils/mkfs.8 | 1 - disk-utils/mkfs.cramfs.8 | 2 +- disk-utils/mkswap.8 | 1 - disk-utils/raw.8 | 1 - login-utils/nologin.8 | 3 +-- login-utils/vipw.8 | 2 +- misc-utils/blkid.8 | 4 ---- misc-utils/findfs.8 | 1 - misc-utils/findmnt.8 | 1 - misc-utils/logger.1 | 3 --- misc-utils/lsblk.8 | 1 - misc-utils/lslocks.8 | 1 - misc-utils/namei.1 | 3 --- misc-utils/uuidgen.1 | 4 ---- misc-utils/wipefs.8 | 1 - schedutils/chrt.1 | 3 --- schedutils/taskset.1 | 3 --- sys-utils/blkdiscard.8 | 1 - sys-utils/eject.1 | 2 +- sys-utils/fallocate.1 | 1 - sys-utils/fsfreeze.8 | 2 -- sys-utils/fstab.5 | 9 --------- sys-utils/fstrim.8 | 1 - sys-utils/lscpu.1 | 3 --- sys-utils/mount.8 | 3 --- sys-utils/mountpoint.1 | 2 -- sys-utils/renice.1 | 2 +- sys-utils/setsid.1 | 1 - sys-utils/swapon.8 | 7 ------- sys-utils/tunelp.8 | 5 ++--- sys-utils/unshare.1 | 3 --- term-utils/setterm.1 | 6 +----- term-utils/wall.1 | 2 -- term-utils/write.1 | 2 -- text-utils/hexdump.1 | 2 +- text-utils/more.1 | 3 +-- text-utils/pg.1 | 2 +- text-utils/rev.1 | 4 +--- text-utils/tailf.1 | 13 ++++++------- 43 files changed, 20 insertions(+), 99 deletions(-) commit 4f8d6551d6a9de2b4d699e37eff5de589c4e6d05 Author: Benno Schulenberg Date: Sun Jan 11 22:27:55 2015 +0100 docs: sync the docstring of addpart, delpart and resizepart to the man page Also tweak the wording of those man pages a bit. Signed-off-by: Benno Schulenberg disk-utils/addpart.8 | 19 ++++++++++--------- disk-utils/delpart.8 | 18 ++++++------------ disk-utils/resizepart.8 | 17 +++++++++-------- 3 files changed, 25 insertions(+), 29 deletions(-) commit 08ec8a6fadebd01f74a9ac5860bfd607d9d1b1b5 Author: Karel Zak Date: Mon Jan 12 10:58:00 2015 +0100 partx: add --update to ul_excl_twq list Signed-off-by: Karel Zak disk-utils/partx.8 | 8 +++++--- disk-utils/partx.c | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) commit 4bb82a455461e42644c9b3d8aa1206ad8889ed35 Author: Karel Zak Date: Fri Jan 9 13:05:49 2015 +0100 libfdisk: (gpt) cleanup header size usage Kay reported that Windows 8.1 installed does not recognize GPT created by libfdisk, but parted works as expected. It seems (according to the header hexdump) that the problem is HeaderSize GPT field where libfdisk uses 512 (header + reserved area), but parted uses 92. The both is pretty valid according to the current EFI standard, but 92 is probably more backwardly compatible. I also found places in code where libfdisk gpt driver is inconsistent and uses sometimes all sector and simetimes sizeof(gpt_header) only. The right solution is to read all sector (into zeroized memory) and later write again all sector to the device. Reported-by: Kay Sievers Signed-off-by: Karel Zak disk-utils/sfdisk.8 | 2 +- libfdisk/src/gpt.c | 33 ++++++++++++++++++++++++++------- 2 files changed, 27 insertions(+), 8 deletions(-) commit 46a965679686fe4ec276d311d3c19219e48171fa Merge: cb15645 380f88f Author: Karel Zak Date: Fri Jan 9 10:54:56 2015 +0100 Merge branch 'master' of https://github.com/pali/util-linux * 'master' of https://github.com/pali/util-linux: tests: Add UDF hdd image created by NetBSD newfs_udf (from UDFclient 0.7.7) tests: Add UDF hdd image created by NetBSD newfs_udf (from UDFclient 0.7.5) tests: Add UDF hdd image created by Linux mkudffs with custom params tests: Add UDF hdd image created by Linux mkudffs tests: Add UDF hdd image created by Windows 7 commit cb15645bd3c2b67391cd4e8295abab8a6c878792 Author: JWP Date: Wed Jan 7 23:22:01 2015 -0500 hwclock: man page 'Since v2.26' notes Clean up the 'Since v2.26' man page notes. They were redundant of information already in the manual, and became too verbose. Signed-off-by: J William Piggott sys-utils/hwclock.8.in | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) commit 2ed1d70160dff4b2e1ee814e09e07726d1080b4a Author: JWP Date: Wed Jan 7 23:18:52 2015 -0500 hwclock: update man page for v2.26 rc Authored new section: DATE-TIME CONFIGURATION. Subsections: Keeping Time..., LOCAL vs UTC, POSIX vs 'RIGHT'. Errata and drop outdated language. Updates for v2.26 Signed-off-by: J William Piggott sys-utils/hwclock.8.in | 1134 ++++++++++++++++++++++++++++++++---------------- 1 file changed, 752 insertions(+), 382 deletions(-) commit bf6199673bbca046ceed59002004eb1c1aebaca1 Author: JWP Date: Wed Jan 7 23:15:39 2015 -0500 hwclock: Incorrect UTC defaults Hwclock's default timescale was changed to UTC in: commit 7894bf0f08740f75610990a2ba76af7a7cbce61e Date: Mon Feb 21 13:27:07 2011 +0000 This change was incomplete. With no /etc/adjtime file the current behavior is: hwclock --utc --adjust #Creates a UTC file. hwclock --localtime --adjust #File is not created. That is the opposite of what UTC default should do. With this patch the behavior is: hwclock --utc --adjust #File is not created. hwclock --localtime --adjust #Creates a LOCAL file. 'Creates a xxxx file' means: An /etc/adjtime file is created with zero for all parameters except the Hardware Clock's timescale field, which is set to the value indicated by xxxx. The second item missed in the patch was a test in the save_adjtime() function that defaults to LOCAL. Theoretically we cannot get to the save function without having a value set for adjtime.local_utc, but the test is there so it needs be correct. Signed-off-by: J William Piggott sys-utils/hwclock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cfb8ed1910677bd096dee8404a9e03d5e59ef357 Author: JWP Date: Wed Jan 7 23:13:21 2015 -0500 hwclock: enable --directisa for x86_64 Currently only x86 and Alpha can use --directisa. This patch allows x86_64 machines to use it as well. Signed-off-by: J William Piggott sys-utils/hwclock-cmos.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit e99a6626d6262266f012a20ae69c8e4573ee22fd Author: Karel Zak Date: Thu Jan 8 12:52:43 2015 +0100 nsenter: add --preserve-credentials and cleanup setgroups() usage The new option --preserve-credentials completely disables all operations related to UIGs and GIDs. The patch also calls setgroups() before we enter user namespace (so root can always clear their groups) and after we enter user namespace (to detect /proc/self/setgroups "deny"). If both fail then nsenter complains. Acked-by: "Eric W. Biederman" Signed-off-by: Karel Zak sys-utils/nsenter.1 | 4 ++++ sys-utils/nsenter.c | 27 +++++++++++++++++++++------ 2 files changed, 25 insertions(+), 6 deletions(-) commit 83fb8aa53d15dd7ee2c62bffa4fc04f70646650b Author: Karel Zak Date: Thu Jan 8 12:27:59 2015 +0100 nsenter: keep semantic consistent The current nseneter behavior is inconsistent and depends on way how namespace is specified on command line # nsenter --user vs. # nseneter --user=filename if the namespace is specified by than nsenter does not do additinal setting and actions (e.g. does not call setgroups, setuid). This is bug. Signed-off-by: Karel Zak sys-utils/nsenter.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit fbceefded6645de693d576cd988a703a6f60d207 Author: Karel Zak Date: Thu Jan 8 11:51:58 2015 +0100 unshare: add --setgroups=deny|allow Since Linux 3.19 the file /proc/self/setgroups controls setgroups(2) syscall usage in user namespaces. This patch provides command line knob for this feature. The new --setgroups does not automatically implies --user to avoid complexity, it's user's responsibility to use it in right context. The exception is --map-root-user which is mutually exclusive to --setgroups=allow. CC: "Eric W. Biederman" Signed-off-by: Karel Zak sys-utils/unshare.1 | 15 ++++++++++++++ sys-utils/unshare.c | 56 +++++++++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 65 insertions(+), 6 deletions(-) commit 0bf159413bdb9e324864a422b7aecb081e739119 Author: Eric W. Biederman Date: Wed Dec 17 17:06:03 2014 -0600 unshare: Fix --map-root-user to work on new kernels In rare cases droping groups with setgroups(0, NULL) is an operation that can grant a user additional privileges. User namespaces were allwoing that operation to unprivileged users and that had to be fixed. Update unshare --map-root-user to disable the setgroups operation before setting the gid_map. This is needed as after the security fix gid_map is restricted to privileged users unless setgroups has been disabled. Signed-off-by: "Eric W. Biederman" include/pathnames.h | 1 + sys-utils/unshare.c | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) commit 380f88f10828e37648e56a9fefadd1f4de2dafae Author: Pali Rohár Date: Thu Jan 8 17:50:38 2015 +0100 tests: Add UDF hdd image created by NetBSD newfs_udf (from UDFclient 0.7.7) $ dd if=/dev/zero of=/tmp/test bs=1M count=10 $ newfs_udf -L discname /tmp/test Version from UDFclient 0.7.7 generate default Volume set identifier correctly. tests/expected/blkid/low-probe-udf-hdd-udfclient-0.7.7 | 9 +++++++++ tests/ts/blkid/images-fs/udf-hdd-udfclient-0.7.7.img.bz2 | Bin 0 -> 822 bytes 2 files changed, 9 insertions(+) commit 25596bf6ddd9b5da8fa89a7d573a4d9f3f18d67b Author: Pali Rohár Date: Thu Jan 8 17:46:58 2015 +0100 tests: Add UDF hdd image created by NetBSD newfs_udf (from UDFclient 0.7.5) $ dd if=/dev/zero of=/tmp/test bs=1M count=10 $ newfs_udf -L discname /tmp/test Version from UDFclient 0.7.5 does not generate default Volume set identifier according to OSTA UDF specification. But it is used so for test is usefull. tests/expected/blkid/low-probe-udf-hdd-udfclient-0.7.5 | 9 +++++++++ tests/ts/blkid/images-fs/udf-hdd-udfclient-0.7.5.img.bz2 | Bin 0 -> 816 bytes 2 files changed, 9 insertions(+) commit 38610dba6038b3911808f705e9cb13efc31c9333 Author: Pali Rohár Date: Thu Jan 8 17:29:58 2015 +0100 tests: Add UDF hdd image created by Linux mkudffs with custom params $ dd if=/dev/zero of=/tmp/test bs=1M count=10 $ mkudffs -b 512 --lvid=Label --vid=Label --vsid="Volume set identifier" /tmp/test When calling mkudffs with --vsid param there is bug which cause that garbage from application stack is copied into Volume set identifier after 8th character. Characters 1 -- 16 are used in libblkid for generating UUID, so this is perfect test example that everything is working! tests/expected/blkid/low-probe-udf-hdd-mkudffs2 | 9 +++++++++ tests/ts/blkid/images-fs/udf-hdd-mkudffs2.img.bz2 | Bin 0 -> 1082 bytes 2 files changed, 9 insertions(+) commit 806df9b6b1380440608a98bc4c25dfccd7f8db6a Author: Pali Rohár Date: Thu Jan 8 17:23:32 2015 +0100 tests: Add UDF hdd image created by Linux mkudffs $ dd if=/dev/zero of=/tmp/test bs=1M count=10 $ mkudffs -b 512 /tmp/test tests/expected/blkid/low-probe-udf-hdd-mkudffs | 9 +++++++++ tests/ts/blkid/images-fs/udf-hdd-mkudffs.img.bz2 | Bin 0 -> 1042 bytes 2 files changed, 9 insertions(+) commit eb1ef1dadb11d766c07e78006685fc27ce117625 Author: Pali Rohár Date: Thu Jan 8 17:11:52 2015 +0100 tests: Add UDF hdd image created by Windows 7 tests/expected/blkid/low-probe-udf-hdd-win7 | 9 +++++++++ tests/ts/blkid/images-fs/udf-hdd-win7.img.bz2 | Bin 0 -> 884 bytes 2 files changed, 9 insertions(+) commit 3d9644f30de6eb4bf015f840ad895260f7276f5c Merge: d995151 c4e8acb Author: Karel Zak Date: Thu Jan 8 14:53:01 2015 +0100 Merge branch '2015wk01' of https://github.com/kerolasa/lelux-utiliteetit * '2015wk01' of https://github.com/kerolasa/lelux-utiliteetit: eject: add verbosity to cdrom door lock error libblkid: assume strtoull() is available ipcs: remove FIXME markup ul: remove unexplained TERM=lpr override look: remove dead code docs: make tools/checkmans.sh to pass without warnings build-sys: fix make checkincludes warnings docs: add howto-pull-request.txt docs: small improvements to howto-contribute.txt Conflicts: Documentation/howto-pull-request.txt commit d9951513d0bcf03947b2143e2bd44bd7fb62e98c Merge: 742d772 cb40941 Author: Karel Zak Date: Thu Jan 8 14:36:20 2015 +0100 Merge branch 'master' of https://github.com/pali/util-linux * 'master' of https://github.com/pali/util-linux: tests: update UDF test (add identifiers) libblkid: udf: Fix reading LABEL, add support for UUID and other udf identifiers libblkid: superblocks: Add function blkid_probe_set_utf8_id_label for setting utf8 id label commit 742d7721b22e8191dbc0e2e0a0b827d2708dc6c4 Author: Sami Kerola Date: Wed Jan 7 19:25:39 2015 +0000 docs: add howto-pull-request.txt Reference: http://comments.gmane.org/gmane.linux.utilities.util-linux-ng/10431 Signed-off-by: Sami Kerola Documentation/howto-contribute.txt | 8 +- Documentation/howto-pull-request.txt | 286 +++++++++++++++++++++++++++++++++++ 2 files changed, 292 insertions(+), 2 deletions(-) commit 347da736af497ecf53f1d36c4d1c268981be25a1 Author: Sami Kerola Date: Wed Jan 7 19:25:38 2015 +0000 docs: small improvements to howto-contribute.txt Signed-off-by: Sami Kerola Documentation/howto-contribute.txt | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) commit c4e8acb9d92336aba81c941578485cf81cb49f7c Author: Sami Kerola Date: Wed Jan 7 22:33:09 2015 +0000 eject: add verbosity to cdrom door lock error Signed-off-by: Sami Kerola sys-utils/eject.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit 9385a11d8d5d1468a15e02cb1a74b2472be993bc Author: Sami Kerola Date: Wed Jan 7 22:05:43 2015 +0000 libblkid: assume strtoull() is available The strtoull() is part of ISO/IEC 9899:1999 (aka C99) and the function has been happily used in prlimit(1) since 2011-10-19 without anyone complaining compatibility issues. Reference: http://pubs.opengroup.org/onlinepubs/009695399/functions/strtoul.html Signed-off-by: Sami Kerola configure.ac | 1 - libblkid/src/read.c | 13 +++---------- 2 files changed, 3 insertions(+), 11 deletions(-) commit 587f90b0556af1bede83480fcf637ede2c637ca3 Author: Sami Kerola Date: Wed Jan 7 21:44:44 2015 +0000 ipcs: remove FIXME markup The ipc message q_qbytes information is not in /proc, and it is unlikely it will ever appear to there. Reference: https://lkml.org/lkml/2012/11/25/18 Signed-off-by: Sami Kerola sys-utils/ipcutils.c | 4 ---- 1 file changed, 4 deletions(-) commit 97d8f180b6af194004ef29ddb9a644c8e1fb079e Author: Sami Kerola Date: Wed Jan 7 21:30:54 2015 +0000 ul: remove unexplained TERM=lpr override The FIXME item has been in place since 2011-04-30, and the code has never made sense, so remove it. Signed-off-by: Sami Kerola text-utils/ul.c | 9 --------- 1 file changed, 9 deletions(-) commit 9329e724af186e57020f8c74abff108c0778b280 Author: Sami Kerola Date: Wed Jan 7 21:24:39 2015 +0000 look: remove dead code MAP_FILE is ignored compatibility flag. Reference: http://man7.org/linux/man-pages/man2/mmap.2.html Signed-off-by: Sami Kerola misc-utils/look.c | 10 ---------- 1 file changed, 10 deletions(-) commit 98ac77456e44ebca1e98ab30c58f1e03ee4a342e Author: Sami Kerola Date: Wed Jan 7 19:57:54 2015 +0000 docs: make tools/checkmans.sh to pass without warnings Signed-off-by: Sami Kerola sys-utils/hwclock.8.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4ebac79f015c67aee373c0673496e72c01d18dbd Author: Sami Kerola Date: Wed Jan 7 19:44:26 2015 +0000 build-sys: fix make checkincludes warnings Signed-off-by: Sami Kerola configure.ac | 1 + lib/blkdev.c | 12 ++++-------- term-utils/agetty.c | 7 ++++--- 3 files changed, 9 insertions(+), 11 deletions(-) commit 5de50f26fc2ea08dcd14e97ea4aafc834638b332 Author: Sami Kerola Date: Tue Jan 6 22:37:52 2015 +0000 docs: add howto-pull-request.txt Reference: http://comments.gmane.org/gmane.linux.utilities.util-linux-ng/10431 Signed-off-by: Sami Kerola Documentation/howto-contribute.txt | 8 +- Documentation/howto-pull-request.txt | 286 +++++++++++++++++++++++++++++++++++ 2 files changed, 292 insertions(+), 2 deletions(-) commit 7f9916c21e1b182af496968ce971a30d0e8ad3d0 Author: Sami Kerola Date: Tue Jan 6 20:25:16 2015 +0000 docs: small improvements to howto-contribute.txt Signed-off-by: Sami Kerola Documentation/howto-contribute.txt | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) commit 8501d9befe0a9567ea60428f09f982bee32517ef Author: Karel Zak Date: Wed Jan 7 15:20:22 2015 +0100 libsmartcols: use ASCII art for trees rather than padding Based on patch from Roman Odaisky. References: https://launchpad.net/bugs/1406133 Signed-off-by: Karel Zak libsmartcols/src/table_print.c | 132 ++++++++++++++++++++++++++++++----------- 1 file changed, 97 insertions(+), 35 deletions(-) commit 2fa60c5ec203040c132b27ee0f92f25b5ad75294 Author: Karel Zak Date: Wed Jan 7 10:59:16 2015 +0100 build-sys: support nsenter.static Signed-off-by: Karel Zak configure.ac | 2 +- sys-utils/Makemodule.am | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) commit 730ae9c899719a6e5e7b79f25bd280827d142ae8 Author: Sami Kerola Date: Sat Jan 3 09:20:05 2015 +0000 fsck.minix: fix segmentation fault Return from check_file() and check_file2() functions when maximum name depth is reached. The use unsafe strncpy() is also removed just to be on safe side. Addresses: https://bugs.debian.org/773892 Signed-off-by: Sami Kerola disk-utils/fsck.minix.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 64a265bf8a472a8f42f3da3de168e6b8224847b2 Author: Sami Kerola Date: Sat Jan 3 09:20:04 2015 +0000 lslocks: fix type warning misc-utils/lslocks.c:229:2: warning: format '%x' expects argument of type 'unsigned int *', but argument 3 has type 'int *' [-Wformat=] Reference: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/fs/locks.c?id=5e0f872c7d7e371fbdf09e864eddd24bddfda8fe#n2533 Signed-off-by: Sami Kerola misc-utils/lslocks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7ee26cbf025d915c6c15e2fe877ee92846f5992f Author: Sami Kerola Date: Wed Dec 31 23:01:21 2014 +0000 maint: fix shadow declaration This change fixes all shadow declarations. The worth while to mention fix is with libfdisk sun geometry. It comes from bitops.h cpu_to_be16 macro that further expands from include/bits/byteswap.h that has the shadowing. libfdisk/src/sun.c:961:173: warning: declaration of '__v' shadows a previous local [-Wshadow] libfdisk/src/sun.c:961:69: warning: shadowed declaration is here [-Wshadow] libfdisk/src/sun.c:961:178: warning: declaration of '__x' shadows a previous local [-Wshadow] libfdisk/src/sun.c:961:74: warning: shadowed declaration is here [-Wshadow] That could have caused earlier some unexpected results. Signed-off-by: Sami Kerola disk-utils/cfdisk.c | 6 +++--- disk-utils/fsck.cramfs.c | 47 +++++++++++++++++++++--------------------- libfdisk/src/sun.c | 8 ++++--- libfdisk/src/table.c | 6 +++--- libmount/src/tab_parse.c | 6 +++--- libsmartcols/src/table_print.c | 6 +++--- login-utils/lslogins.c | 32 ++++++++++++++-------------- misc-utils/findmnt.c | 4 ++-- misc-utils/lslocks.c | 4 ++-- sys-utils/swapon.c | 14 ++++++------- sys-utils/zramctl.c | 2 +- 11 files changed, 69 insertions(+), 66 deletions(-) commit 185aa9e5b8c809d4ee73d56256632ed0f739d220 Author: Karel Zak Date: Wed Jan 7 09:57:55 2015 +0100 fallocate: create mode 0666, that's what umask is for User's umask will typically mask the mode down to 0664 or 0644. Reported-by: Peter Cordes Signed-off-by: Karel Zak sys-utils/fallocate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f43fb23a2f80077248753d598be5af2dae8a5a40 Author: Karel Zak Date: Tue Jan 6 16:18:52 2015 +0100 libmount: (monitor) make mnt_monitor_next_changed() usable for epoll version too Signed-off-by: Karel Zak libmount/src/monitor.c | 43 +++++++++++++++++++++++++++++-------------- 1 file changed, 29 insertions(+), 14 deletions(-) commit 8f52496d8edf162565e9b0caf484f4826057cde9 Author: Karel Zak Date: Wed Dec 17 13:09:29 2014 +0100 linmount: (monitor) refresh docs, headers and symbols table Signed-off-by: Karel Zak libmount/docs/libmount-sections.txt | 3 ++- libmount/src/libmount.h.in | 2 ++ libmount/src/libmount.sym | 2 ++ libmount/src/monitor.c | 24 +++++++++++++++++------- 4 files changed, 23 insertions(+), 8 deletions(-) commit 3b2c2ba688ead223db54bc3f027987403523c322 Author: Karel Zak Date: Wed Dec 17 12:50:29 2014 +0100 libmount: (monitor) use inotify for utab lock file It's better than monitor utab directly. The utab is updated by rename(2) and it's really tricky for inotify, because it's necessary to monitor all /run/mount directory and then it's necessary to verify that the renamed file is really "utab". The new concept is without possible false positives and it also triggers the change when utab update is really done. Signed-off-by: Karel Zak libmount/src/monitor.c | 148 +++++++++++++++++++++++++------------------------ 1 file changed, 75 insertions(+), 73 deletions(-) commit 3c5ed29a93f607666111104df9c0e970d132362c Author: Karel Zak Date: Wed Dec 17 10:39:37 2014 +0100 libmount: (monitor) add kernel mountninfo monitoring Signed-off-by: Karel Zak libmount/src/libmount.h.in | 1 - libmount/src/libmount.sym | 1 - libmount/src/monitor.c | 221 +++++++++++++++++++++++++++++++++++---------- 3 files changed, 175 insertions(+), 48 deletions(-) commit 9b4fc141d470b15d0ac772c6226276699c15eba6 Author: Karel Zak Date: Tue Dec 16 15:28:41 2014 +0100 libmount: (monitor) cleanup wait/verify stuff Signed-off-by: Karel Zak libmount/docs/libmount-sections.txt | 6 +- libmount/src/libmount.h.in | 14 +- libmount/src/libmount.sym | 4 + libmount/src/monitor.c | 339 ++++++++++++++++++++++++++++-------- 4 files changed, 286 insertions(+), 77 deletions(-) commit f7ca1a6433eb42eb3cf0e3e7af9e7c1fa989d590 Author: Karel Zak Date: Tue Dec 16 11:25:52 2014 +0100 libmount: make public top-level monitor FD only We need full control on changes evaluation, so it's better to hide all in our private epoll. This change also significantly simplify the API. mn = mnt_new_monitor(); mnt_monitor_enable_userapce(mn, TRUE, NULL); mnt_monitor_enable_kenrel(mn, TRUE); fd = mnt_monitor_get_fd(mn); ... ... while (mnt_monitor_next_changed(mn, &filename, NULL) == 0) printf("%s: change detected\n", filename); Signed-off-by: Karel Zak libmount/src/libmount.h.in | 2 +- libmount/src/libmount.sym | 4 +- libmount/src/monitor.c | 383 ++++++++++++++++++++++++++------------------- 3 files changed, 223 insertions(+), 166 deletions(-) commit 36813a2128948f7f24128213733e03e7172b93f2 Author: Karel Zak Date: Tue Dec 16 09:16:09 2014 +0100 libmount: monitor unref function refactoring Signed-off-by: Karel Zak libmount/src/monitor.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) commit c6b1e56d262680724452ed13a46ff673b6ef5ff6 Author: Karel Zak Date: Mon Dec 15 14:23:54 2014 +0100 libmount: cleanup monitor test Signed-off-by: Karel Zak libmount/src/monitor.c | 60 ++++++++++++++++++++++++++++---------------------- 1 file changed, 34 insertions(+), 26 deletions(-) commit fc79d3ab446522cbcc15b7fd8bb9083bfa356b61 Author: Karel Zak Date: Mon Dec 15 14:13:25 2014 +0100 libmount: split monitor initialization The patch introduces mnt_monitor_enable_*() functions (now for userspace only) to make the API easy to use for high-level purpose. Signed-off-by: Karel Zak libmount/docs/libmount-sections.txt | 2 +- libmount/src/libmount.h.in | 7 +- libmount/src/libmount.sym | 2 +- libmount/src/monitor.c | 288 ++++++++++++++++++++++-------------- 4 files changed, 181 insertions(+), 118 deletions(-) commit 17bf9c1c39b4f35163ec5c443b8bbd5857386ddd Author: Karel Zak Date: Tue Jan 6 11:55:21 2015 +0100 ipcrm: fix usage Signed-off-by: Karel Zak sys-utils/ipcrm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7009af0e0dbce1bac5d16be89a43077badf0f897 Author: Benno Schulenberg Date: Wed Dec 24 17:56:10 2014 +0100 ipc*: use customary fputs() instead of fprintf() with the usage macros Also use the clearer word with the --semaphore option. Signed-off-by: Benno Schulenberg sys-utils/ipcmk.c | 11 ++++++----- sys-utils/ipcrm.c | 12 +++++++----- sys-utils/ipcs.c | 15 +++++++++------ 3 files changed, 22 insertions(+), 16 deletions(-) commit 331d25526132505117b1c9259c0054e0f497bd9b Author: Benno Schulenberg Date: Wed Dec 24 17:56:09 2014 +0100 tailf: slice up the usage text for ease of translation Signed-off-by: Benno Schulenberg text-utils/tailf.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit dfe6a6d0857f56ff96b6eef3e41136026e71d3aa Author: Benno Schulenberg Date: Wed Dec 24 17:56:08 2014 +0100 look: slice up the usage text for ease of translation Also use the standard macros, and correct the synopsis: use angular brackets and show that look accepts multiple files. Signed-off-by: Benno Schulenberg misc-utils/look.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 5f55b39e5825c9d86c585742e2cb026eaba5ae7c Author: Benno Schulenberg Date: Wed Dec 24 17:56:07 2014 +0100 colcrt: slice up the usage text for ease of translation Also use the standard macros for outputting it. Signed-off-by: Benno Schulenberg text-utils/colcrt.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 26b0b857c9a8da0def14ec7f0a76926712aa4be4 Author: Benno Schulenberg Date: Wed Dec 24 17:56:06 2014 +0100 textual: list the options of setarch in a more alphabetical order Signed-off-by: Benno Schulenberg sys-utils/setarch.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 682430494c9dd619cf74b35d289f8bf8d48cbca1 Author: Benno Schulenberg Date: Wed Dec 24 17:56:05 2014 +0100 setarch: make the usage synopsis comprehensible for translators Use two separate strings for the two different forms of setarch, instead of filling in an untranslated word into a single string. Also use the standard angular brackets for nonliteral arguments. Signed-off-by: Benno Schulenberg sys-utils/setarch.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 6ad5b22ca6cbdc45ce3de91153916f0381609786 Author: Benno Schulenberg Date: Wed Dec 24 17:56:04 2014 +0100 docs: restore the alternative form of setarch in its man page Commit c372860ddb4a768f7f6c50cd26d60119370d5cd accidentally removed the alternative form of setarch in which the command name specifies the architecture to be set. Also improve some formatting. Signed-off-by: Benno Schulenberg sys-utils/setarch.8 | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit 4e788f46212d0e5072d0459775df497ea580995f Author: Benno Schulenberg Date: Wed Dec 24 17:56:03 2014 +0100 ipcrm: gettextize the command synopsis of the usage text Signed-off-by: Benno Schulenberg sys-utils/ipcrm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit afd86656dee69a297b832e4e94efa58987fe4aa1 Author: Benno Schulenberg Date: Wed Dec 24 17:56:02 2014 +0100 ipcs: in usage show resource option as nonoptional when used with -i Also, the resource option -a is not valid with -i, so show the valid ones explicitly. Also gettextize the synopsis as a single string, as the two lines are tightly related and other synopses do this too. Signed-off-by: Benno Schulenberg sys-utils/ipcs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 92f1c5ab8d09364682c9c1a39f80a191ff84d0b8 Author: Benno Schulenberg Date: Wed Dec 24 17:56:01 2014 +0100 docs: improve some wordings on the man page of wipefs Signed-off-by: Benno Schulenberg misc-utils/wipefs.8 | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) commit 451dbcfae1406f526208faf6033d6dcc8ac100da Author: Benno Schulenberg Date: Mon Dec 22 22:57:17 2014 +0100 textual: add a docstring to most of the utilities This adds a concise description of a tool to its usage text. A first form of this patch was proposed by Steven Honeyman (see http://www.spinics.net/lists/util-linux-ng/msg09994.html). Signed-off-by: Benno Schulenberg disk-utils/addpart.c | 4 ++++ disk-utils/cfdisk.c | 4 +++- disk-utils/delpart.c | 4 ++++ disk-utils/fdformat.c | 3 +++ disk-utils/fdisk.c | 3 +++ disk-utils/fsck.c | 3 +++ disk-utils/fsck.cramfs.c | 4 ++++ disk-utils/fsck.minix.c | 4 ++++ disk-utils/isosize.c | 4 ++++ disk-utils/mkfs.bfs.c | 4 ++++ disk-utils/mkfs.c | 4 ++++ disk-utils/mkswap.c | 3 +++ disk-utils/partx.c | 3 +++ disk-utils/raw.c | 4 ++++ disk-utils/resizepart.c | 4 ++++ disk-utils/sfdisk.c | 3 +++ disk-utils/swaplabel.c | 4 ++++ login-utils/chfn.c | 4 ++++ login-utils/chsh.c | 4 ++++ login-utils/last.c | 3 +++ login-utils/login.c | 2 ++ login-utils/lslogins.c | 3 +++ login-utils/newgrp.c | 4 ++++ login-utils/nologin.c | 4 +++- login-utils/sulogin.c | 3 +++ login-utils/utmpdump.c | 3 +++ login-utils/vipw.c | 4 ++++ misc-utils/findfs.c | 4 ++++ misc-utils/findmnt.c | 3 +++ misc-utils/getopt.c | 3 +++ misc-utils/kill.c | 3 +++ misc-utils/logger.c | 3 +++ misc-utils/look.c | 4 ++++ misc-utils/lsblk.c | 4 ++++ misc-utils/lslocks.c | 3 +++ misc-utils/mcookie.c | 3 +++ misc-utils/namei.c | 4 ++++ misc-utils/rename.c | 4 ++++ misc-utils/uuidd.c | 3 +++ misc-utils/uuidgen.c | 3 +++ misc-utils/whereis.c | 3 +++ misc-utils/wipefs.c | 4 ++++ schedutils/chrt.c | 2 +- schedutils/ionice.c | 3 +++ schedutils/taskset.c | 4 ++++ sys-utils/blkdiscard.c | 4 ++++ sys-utils/chcpu.c | 3 +++ sys-utils/ctrlaltdel.c | 4 ++++ sys-utils/dmesg.c | 4 ++++ sys-utils/eject.c | 4 +++- sys-utils/fallocate.c | 5 ++++- sys-utils/flock.c | 4 ++++ sys-utils/fsfreeze.c | 4 ++++ sys-utils/fstrim.c | 4 ++++ sys-utils/hwclock.c | 3 +++ sys-utils/ipcmk.c | 5 ++++- sys-utils/ipcrm.c | 6 +++++- sys-utils/ipcs.c | 6 +++++- sys-utils/ldattach.c | 5 ++++- sys-utils/losetup.c | 3 +++ sys-utils/lscpu.c | 3 +++ sys-utils/mount.c | 3 +++ sys-utils/mountpoint.c | 3 +++ sys-utils/nsenter.c | 3 +++ sys-utils/pivot_root.c | 4 ++++ sys-utils/prlimit.c | 3 +++ sys-utils/readprofile.c | 5 ++++- sys-utils/renice.c | 4 ++++ sys-utils/rtcwake.c | 3 +++ sys-utils/setarch.c | 4 ++++ sys-utils/setpriv.c | 3 +++ sys-utils/setsid.c | 3 +++ sys-utils/swapoff.c | 4 +++- sys-utils/swapon.c | 4 +++- sys-utils/switch_root.c | 4 ++++ sys-utils/tunelp.c | 3 +++ sys-utils/umount.c | 3 +++ sys-utils/unshare.c | 3 +++ sys-utils/wdctl.c | 4 +++- sys-utils/zramctl.c | 3 +++ term-utils/agetty.c | 4 ++++ term-utils/mesg.c | 4 ++++ term-utils/script.c | 3 +++ term-utils/scriptreplay.c | 3 +++ term-utils/setterm.c | 4 ++++ term-utils/wall.c | 4 ++++ term-utils/write.c | 3 +++ text-utils/col.c | 3 +++ text-utils/colcrt.c | 4 ++++ text-utils/colrm.c | 4 ++++ text-utils/column.c | 4 ++++ text-utils/hexdump.c | 4 ++++ text-utils/line.c | 4 ++++ text-utils/more.c | 4 ++++ text-utils/pg.c | 4 ++++ text-utils/rev.c | 4 ++++ text-utils/tailf.c | 3 +++ text-utils/ul.c | 5 ++++- 98 files changed, 343 insertions(+), 14 deletions(-) commit 4a98629b293a531e5f17369b77935163b89a5dea Author: Karel Zak Date: Tue Jan 6 11:00:51 2015 +0100 chsh: keep struct options in .rodata Signed-off-by: Karel Zak login-utils/chsh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 84705c8b89d6ae13610ef364bacf4342a90953ad Author: Karel Zak Date: Tue Jan 6 10:57:09 2015 +0100 chsh: simplify get_shell_list() Signed-off-by: Karel Zak login-utils/chsh.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit 1fd15f04b3028276d77155c055e8382127a4b5b0 Author: Sami Kerola Date: Sat Dec 20 12:37:58 2014 +0000 newgrp: set function arguments read-only when possible Signed-off-by: Sami Kerola login-utils/newgrp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 51c52acfb1118b27841a026fb1664691cc7bf6e2 Author: Sami Kerola Date: Sat Dec 20 12:26:17 2014 +0000 newgrp: move shell determination closer where it is used Signed-off-by: Sami Kerola login-utils/newgrp.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 477135dfec163b638b58cdb789949b0863a487a5 Author: Sami Kerola Date: Sat Dec 20 12:23:06 2014 +0000 newgrp: simplify if else clauses The 'if' clauses that have termination as either of the control flow results will never need 'else'. Making the termination to happen true flow is enough. Signed-off-by: Sami Kerola login-utils/newgrp.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 9a5cbe5223264038e5dc8e87e0ec1ba4fd1b160c Author: Sami Kerola Date: Fri Dec 19 22:49:32 2014 +0000 chsh: fail get_shell_list() check when /etc/shells cannot be opened And get rid of stdbool.h true/false usage. Signed-off-by: Sami Kerola login-utils/chsh.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 1df0219f2cf7a34ebc98b96fcbf3aa68bc6f3fd5 Author: Sami Kerola Date: Fri Dec 19 19:56:29 2014 +0000 chsh: simplify check_shell() Shell null check is redundant. The shell can be null only after ask_new_shell returned such, and that is checked earlier in program logic. Secondly the check_shell does not need to return values, in such cases the program can simply exit. Signed-off-by: Sami Kerola login-utils/chsh.c | 49 ++++++++++++++++--------------------------------- 1 file changed, 16 insertions(+), 33 deletions(-) commit e323df25f52018a8adaa5aeaca48c22265f8d637 Author: Sami Kerola Date: Fri Dec 19 19:28:19 2014 +0000 chsh: rewrite function interacting with user to get path to new shell Rename prompt() to ask_new_shell(). Remove fixed size buffer and allocate path to new shell, that should make Hurd people happy. Use strutils.h for white space trimming. Signed-off-by: Sami Kerola login-utils/chsh.c | 43 +++++++++++++++++++------------------------ 1 file changed, 19 insertions(+), 24 deletions(-) commit 68b24d53e15d16c929d2dab02ddf35082910bcc0 Author: Sami Kerola Date: Sun Dec 14 22:58:01 2014 +0000 chsh: clean up parse_argv() Signed-off-by: Sami Kerola login-utils/chsh.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit f64979233f9093bfa1a628eac163ee025e9ab1a4 Author: Sami Kerola Date: Sun Dec 14 23:20:01 2014 +0000 chsh: allow user to set shell to /bin/sh if none is set Earlier setting a /bin/sh was impossible for users that had nothing set as shell, as that was seen as no change. Signed-off-by: Sami Kerola login-utils/chsh.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 561c48582ca8d53c0d811f3471760d1969306935 Author: Sami Kerola Date: Sun Dec 14 23:10:48 2014 +0000 chsh: set few variables read-only and rename one of them This change also improves couple variable initializations. Signed-off-by: Sami Kerola login-utils/chsh.c | 32 +++++++++++++------------------- 1 file changed, 13 insertions(+), 19 deletions(-) commit 1cb122d5913e53338713ad3c4ff04b01e92725ac Author: Sami Kerola Date: Sun Dec 14 22:50:44 2014 +0000 chsh: use getline() to support arbitrarily long lines Use of fgets() can make a single long line to be understood as two entries, and someone could play tricks with the remainder part of the buffer. Signed-off-by: Sami Kerola login-utils/chsh.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 144ae70ef3f1fe2738d4f3ad15a62ae37fb71985 Author: Sami Kerola Date: Sun Dec 14 21:38:56 2014 +0000 chfn, chsh: share illegal_passwd_chars() function Signed-off-by: Sami Kerola login-utils/Makemodule.am | 4 +++- login-utils/ch-common.c | 34 ++++++++++++++++++++++++++++++++++ login-utils/ch-common.h | 6 ++++++ login-utils/chfn.c | 16 +++++----------- login-utils/chsh.c | 18 +++++------------- 5 files changed, 53 insertions(+), 25 deletions(-) commit 5eef61296f9457fb9ad8a655d9415e8b10468999 Author: Sami Kerola Date: Sun Dec 14 20:48:12 2014 +0000 chsh: remove function prototypes Signed-off-by: Sami Kerola login-utils/chsh.c | 290 ++++++++++++++++++++++++++--------------------------- 1 file changed, 143 insertions(+), 147 deletions(-) commit 8c9615a99b730e49c5576dc23a1f5c0e7c0ef725 Author: Karel Zak Date: Mon Jan 5 12:53:50 2015 +0100 cfdisk: improve Dump dialog Signed-off-by: Karel Zak disk-utils/cfdisk.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit 702d0e1cef45bd53d6f63f86c25c95d0352eaa92 Author: Karel Zak Date: Mon Jan 5 12:42:24 2015 +0100 cfdisk: improve menu clean function Signed-off-by: Karel Zak disk-utils/cfdisk.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 7509020126b751fb54e1c212b71b2b3027179a25 Author: Karel Zak Date: Mon Jan 5 12:13:25 2015 +0100 cfdisk: detect too small partition sizes References: https://github.com/karelzak/util-linux/issues/136 Signed-off-by: Karel Zak disk-utils/cfdisk.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) commit bf6c15ed4a3e00ae1f9c18c6d9bbf8589e09a2da Author: Karel Zak Date: Fri Dec 19 15:05:04 2014 +0100 chfn: fix compilation without libuser Signed-off-by: Karel Zak login-utils/chfn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2e28ebff999612bfc02a4f85e297e136efbe514d Author: Karel Zak Date: Fri Dec 19 14:34:03 2014 +0100 more: fix compiler warnings Signed-off-by: Karel Zak text-utils/more.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 47123602e638e737d4804e0dced7194a9cf43b9e Merge: 929c257 e88f005 Author: Karel Zak Date: Fri Dec 19 14:28:42 2014 +0100 Merge remote-tracking branch 'sami/2014wk49' * sami/2014wk49: chfn: make command to obey login.defs CHFN_RESTRICT instructions chfn: remove set_changed_data() and add add_missing() chfn: rename prompt() to ask_new_field() chfn: move new and old finger structs to chfn control struct chfn: clean up parse_argv() chfn: add minimalistic struct chfn_control chfn: simplify parse_passwd() by using strsep() chfn: fix usage() regression chfn: use xasprintf() rather than bunch of strlen() and malloc() calls chfn: rewrite prompt() to use strutils chfn: remove function prototypes lslogins: use hardcoded paths from pathnames.h lslogins: add space to systemd journal header and message lslogins: reject unknown time format arguments lslogins: fix short options lslogins: tell why command failed lslogins: make journald last logs time stamps to honor --time-format lslogins: allow changing password changed and expiration time formats commit 929c257548049f34d357355fc72a6f1540f751cf Author: Karel Zak Date: Fri Dec 19 13:42:41 2014 +0100 ipcs: fix shmctl() usage The function shmctl() has to be called with 'struct shmid_ds', and if you need 'struct shminfo' then the right way is to cast: bad way: struct shm_info info; shmctl(0, SHM_INFO, &info); right way: struct shmid_ds buf; struct shm_info *info; shmctl(0, SHM_INFO, &buf); info = (struct shm_info *) &buf); The patch also fixes bug in ipc_shm_get_limits() where is missing lim->shmmax in code based on shmctl(). Signed-off-by: Karel Zak sys-utils/ipcrm.c | 4 +--- sys-utils/ipcs.c | 16 +++++++++------- sys-utils/ipcutils.c | 12 +++++++----- 3 files changed, 17 insertions(+), 15 deletions(-) commit 7ef338f39de0d9661e5a0e234b89e46546b21e22 Author: Karel Zak Date: Fri Dec 19 13:36:07 2014 +0100 tests: don't check the current ipcs limits The ipcs/limit test checks the current kernel limits, but we have no clue about the current setting, so on on 64bit system it may overflow. It's better to test for well known limits only. For the random setting is there ipcs/limit2 test. Signed-off-by: Karel Zak tests/expected/ipcs/limits | 6 +----- tests/ts/ipcs/functions.sh | 9 ++++++--- tests/ts/ipcs/limits | 5 +---- 3 files changed, 8 insertions(+), 12 deletions(-) commit 4d9a1969f7d6e97ea0605c0a00f69f4d373a6aba Author: Sami Kerola Date: Wed Dec 17 22:57:02 2014 +0000 more: blacklist unsigned integer overflow [AddressSanitizer] The mbrtowc() return values are overflowing by design. Signed-off-by: Sami Kerola text-utils/more.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 3ce29d6d469e9043a37427088e25f8837585f34c Author: Sami Kerola Date: Tue Nov 25 20:04:44 2014 +0000 ipcs: fix two data type errors [AddressSanitizer] ==3218==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7fffa577e2b0 at pc 0x4501f9 bp 0x7fffa577e130 sp 0x7fffa577e108 WRITE of size 112 at 0x7fffa577e2b0 thread T0 #0 0x4501f8 in shmctl /home/users/aadgrand/LLVM/releases/ubuntu/final/llvm.src/projects/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc:2502 #1 0x48bd13 in ipc_shm_get_info /home/travis/build/kerolasa/lelux-utiliteetit/sys-utils/ipcutils.c:157 #2 0x488884 in do_shm /home/travis/build/kerolasa/lelux-utiliteetit/sys-utils/ipcs.c:279 #3 0x4844a8 in main /home/travis/build/kerolasa/lelux-utiliteetit/sys-utils/ipcs.c:175 #4 0x2afb3f8c176c (/lib/x86_64-linux-gnu/libc.so.6+0x2176c) #5 0x48408c in _start (/home/travis/build/kerolasa/lelux-utiliteetit/ipcs+0x48408c) Signed-off-by: Sami Kerola sys-utils/ipcutils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 772420322deb14b2ff9b283ff9905b30e6101967 Author: Sami Kerola Date: Sat Nov 22 09:01:36 2014 +0000 lscpu: blacklist vmware_bdoor() AddressSanitizer check AddressSanitizer is identifying the __asm__ segment as suspicious. ==1215==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x0000004ccffd bp 0x7fff9b7184f0 sp 0x7fff9b7184e0 T0) #0 0x4ccffc in vmware_bdoor /home/src/util-linux/sys-utils/lscpu.c:660 Signed-off-by: Sami Kerola sys-utils/lscpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d763c2308165d40db631bd123f0ddde830de3ffb Author: Sami Kerola Date: Sat Nov 22 08:49:34 2014 +0000 include/c: define UL_ASAN_BLACKLIST address_sanitizer function attribute The UL_ASAN_BLACKLIST allows AddressSanitizer to be switched off for functions that cannot be checked. Reference: http://dxr.mozilla.org/mozilla-central/source/mfbt/Attributes.h Signed-off-by: Sami Kerola include/c.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit e88f005949c43a5ddb5b9284552a15808c65b71a Author: Sami Kerola Date: Sun Dec 14 16:45:50 2014 +0000 chfn: make command to obey login.defs CHFN_RESTRICT instructions Reference: http://man7.org/linux/man-pages/man5/login.defs.5.html Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=138519 Signed-off-by: Sami Kerola login-utils/Makemodule.am | 6 +++- login-utils/chfn.c | 83 +++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 81 insertions(+), 8 deletions(-) commit f723cbf544a7eac2927634f2cb6d802437a2d519 Author: Sami Kerola Date: Wed Dec 17 22:28:49 2014 +0000 chfn: remove set_changed_data() and add add_missing() The add_missing() and find_field() functions are needed when input data is incomplete, such as in case when chfn is instructed to change only selected fields with command line options. Signed-off-by: Sami Kerola login-utils/chfn.c | 79 +++++++++++++++++++++++++++--------------------------- 1 file changed, 39 insertions(+), 40 deletions(-) commit d9e1ac99e420f2521849e336a4e57cce1b875241 Author: Sami Kerola Date: Wed Dec 17 22:28:03 2014 +0000 chfn: rename prompt() to ask_new_field() Signed-off-by: Sami Kerola login-utils/chfn.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 5fe1c32f61d2ba0d1ec91767bf11a978a934f6a3 Author: Sami Kerola Date: Sun Dec 14 17:44:11 2014 +0000 chfn: move new and old finger structs to chfn control struct This change is a little bit messy, and requires a comment the struct finfo should not have 'struct passwd *pw' as it's member. The earlier struct design would have been burden to maintain, and confusing to use. Signed-off-by: Sami Kerola login-utils/chfn.c | 165 ++++++++++++++++++++++++----------------------------- 1 file changed, 76 insertions(+), 89 deletions(-) commit e4efecc4dba2d2efd17f89cdddf1b48c87909c1b Author: Sami Kerola Date: Sun Dec 14 13:56:32 2014 +0000 chfn: clean up parse_argv() Use switch() case ?: for all option parsing, as in most of the other source files. Signed-off-by: Sami Kerola login-utils/chfn.c | 48 ++++++++++++++++++------------------------------ 1 file changed, 18 insertions(+), 30 deletions(-) commit d5fdba03469737c3daa9b03940a91fe13c79e86e Author: Sami Kerola Date: Sun Dec 14 13:48:17 2014 +0000 chfn: add minimalistic struct chfn_control Signed-off-by: Sami Kerola login-utils/chfn.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) commit 58985f6712d4f869eb68bfe1fee8ca2074cf226f Author: Sami Kerola Date: Sun Dec 14 13:28:57 2014 +0000 chfn: simplify parse_passwd() by using strsep() Signed-off-by: Sami Kerola login-utils/chfn.c | 51 +++++++++++++++------------------------------------ 1 file changed, 15 insertions(+), 36 deletions(-) commit 496083bad6c5668d2f615906eb877d63cf5d7c6c Author: Sami Kerola Date: Sun Dec 14 12:31:11 2014 +0000 chfn: fix usage() regression Commit db433bf737a5fd4e1c7cca5e3603934743eebd1c changed -u for --help to -h, that is not true. The -h is short hand for --home-phone. And the --version is accompanied with -v not -V. Signed-off-by: Sami Kerola login-utils/chfn.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1b7a19ebbb61c608265b552f4426bfe01373b1d0 Author: Sami Kerola Date: Sun Dec 14 12:28:26 2014 +0000 chfn: use xasprintf() rather than bunch of strlen() and malloc() calls Signed-off-by: Sami Kerola login-utils/chfn.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 5a57c00af0dec86997ce7b1c97812ec603b83263 Author: Sami Kerola Date: Sun Dec 14 11:37:03 2014 +0000 chfn: rewrite prompt() to use strutils The left and right white space trimming can be done with strutils.h [lr]trim_whitespace() functions. As a minor fix when user input exceeds maxium allowed gecos field length the remaining characters in stdin are purged so that re-prompting works correctly. Additionally the prompt() is made to add message to check_gecos_string(), so that there are less similar strings for translation project to deal. Signed-off-by: Sami Kerola login-utils/chfn.c | 59 ++++++++++++++++++------------------------------------ 1 file changed, 20 insertions(+), 39 deletions(-) commit 2401633559d89d178334dad1da64cd51584d77d5 Author: Sami Kerola Date: Sat Dec 13 22:16:21 2014 +0000 chfn: remove function prototypes Requires resuffling functions order they work without issues. Signed-off-by: Sami Kerola login-utils/chfn.c | 276 ++++++++++++++++++++++++++--------------------------- 1 file changed, 134 insertions(+), 142 deletions(-) commit 4ecc6dbb53c4d55ab8871b1ecccee28a94c5afbf Author: Sami Kerola Date: Sat Dec 13 18:07:44 2014 +0000 lslogins: use hardcoded paths from pathnames.h Signed-off-by: Sami Kerola include/pathnames.h | 1 + login-utils/lslogins.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) commit 77006d95db0b06cda65d82360bbf1cce4a775094 Author: Sami Kerola Date: Sat Dec 13 17:49:20 2014 +0000 lslogins: add space to systemd journal header and message This commit changes journal messages in individual user printout the following way. Dec 13 16:02:05 systemd[324]:Time has been changed (old) Dec 13 16:02:05 systemd[324]: Time has been changed (new) Signed-off-by: Sami Kerola login-utils/lslogins.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) commit cdf3896a0502b2773323ec293ccb4dfdbfc87cf8 Author: Sami Kerola Date: Sat Dec 13 17:11:04 2014 +0000 lslogins: reject unknown time format arguments Signed-off-by: Sami Kerola login-utils/lslogins.c | 40 +++++++++++++++++++--------------------- 1 file changed, 19 insertions(+), 21 deletions(-) commit dfd4359bb0b41bdefc19f11c9c44faaf80561adc Author: Sami Kerola Date: Sat Dec 13 16:58:37 2014 +0000 lslogins: fix short options Usage is promising -e is an option alias of --export, so make it work. And get rid of -x that was accepted, but not in use. Long only enum member OPT_VER was probably a development time idea, that never got to be used. Signed-off-by: Sami Kerola login-utils/lslogins.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 1025d21efe5596b61fb3303d88edd53bd4d4414a Author: Sami Kerola Date: Sat Dec 13 16:41:06 2014 +0000 lslogins: tell why command failed Printing usage() without hint what is wrong does not help an user. Signed-off-by: Sami Kerola login-utils/lslogins.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f838efeb67553490638cf589d3c304b152554dda Author: Sami Kerola Date: Fri Dec 12 23:07:28 2014 +0000 lslogins: make journald last logs time stamps to honor --time-format This makes by default the last logs to have year in output when necessary. Signed-off-by: Sami Kerola login-utils/lslogins.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit aa45b344d374e4cb20747061b1648aead2543080 Author: Sami Kerola Date: Fri Dec 12 22:46:04 2014 +0000 lslogins: allow changing password changed and expiration time formats The password change and expiry has are marked with resolution of a day, so add a new short iso-8601 format. With this system admins can easily find users has not updated their password lately $ lslogins --time-format=iso --user --output=pwd-change,user | sort -n Signed-off-by: Sami Kerola login-utils/lslogins.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 2f8610ee95ebde1e436a7ce38e34a8e8e76cc6df Author: Sami Kerola Date: Sat Nov 22 08:18:17 2014 +0000 strutils: fix unsigned integer overflows [AddressSanitizer] include/strutils.h:174:10: runtime error: unsigned integer overflow: 0 - 1 cannot be represented in type 'size_t' (aka 'unsigned long') include/strutils.h:178:6: runtime error: unsigned integer overflow: 18446744073709551615 + 1 cannot be represented in type 'size_t' (aka 'unsigned long') Signed-off-by: Sami Kerola include/strutils.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 737532efe5a931cf452564624da430ee8e2110eb Author: Sami Kerola Date: Sat Nov 22 08:13:59 2014 +0000 fdisk: (sgi) fix unsigned integer overflow [AddressSanitizer] include/pt-sgi.h:103:7: runtime error: unsigned integer overflow: 0 - 1186450447 cannot be represented in type 'unsigned int' Signed-off-by: Sami Kerola include/pt-sgi.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 95e8d2b3bcc4c276723cbfdb551a4e6152fbb092 Author: Sami Kerola Date: Sat Nov 22 00:31:07 2014 +0000 lib: fix crc32 and crc64 interger overflows [AddressSanitizer] lib/crc32.c:111:11: runtime error: unsigned integer overflow: 0 - 1 cannot be represented in type 'size_t' (aka 'unsigned long') lib/crc64.c:101:12: runtime error: unsigned integer overflow: 0 - 1 cannot be represented in type 'size_t' (aka 'unsigned long') Signed-off-by: Sami Kerola lib/crc32.c | 4 +++- lib/crc64.c | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) commit 26f3a38673b3f78c89eb7f5c4454b107f0af1b48 Author: Sami Kerola Date: Fri Nov 21 23:33:33 2014 +0000 cal: fix signed integer overflow [AddressSanitizer] misc-utils/cal.c:811:16: runtime error: signed integer overflow: 2147483645 + 536870911 cannot be represented in type 'int' Signed-off-by: Sami Kerola misc-utils/cal.c | 6 +- tests/expected/cal/bigyear | 312 +++++++++++++++++++++--------------------- tests/expected/cal/bigyearw | 324 ++++++++++++++++++++++---------------------- 3 files changed, 322 insertions(+), 320 deletions(-) commit efb2fe5f5dc65d0d32444d9ad10e35dc2d6bc3a4 Author: Sami Kerola Date: Fri Nov 21 23:11:31 2014 +0000 lib/mbalign: fix unsigned integer overflow [AddressSanitizer] This error was reported 155 times. lib/mbsalign.c:322:18: runtime error: unsigned integer overflow: 0 - 1 cannot be represented in type 'size_t' (aka 'unsigned long') Signed-off-by: Sami Kerola lib/mbsalign.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit edac3e2c2e7464e972d92e2f083d4a9df15edd0e Author: Benno Schulenberg Date: Sun Dec 14 20:45:33 2014 +0100 sfdisk: in the usage text show -v for --version instead of -V In sfdisk -V is taken by --verify. Use for the description of --version the same indentation as for --help, not that of the other options. Signed-off-by: Benno Schulenberg disk-utils/sfdisk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 689d83de5a7722459fe5e44c8118fa8284a9d758 Author: Benno Schulenberg Date: Sun Dec 14 20:45:32 2014 +0100 docs: fix the grammar and formatting in the man page of sfdisk Signed-off-by: Benno Schulenberg disk-utils/sfdisk.8 | 311 +++++++++++++++++++++++++++------------------------- 1 file changed, 161 insertions(+), 150 deletions(-) commit 7ab71099726396380a40b54d32b3ba7ac04fa518 Author: Benno Schulenberg Date: Sun Dec 14 20:45:31 2014 +0100 docs: adjust some formatting and wordings in a handful of man pages Signed-off-by: Benno Schulenberg disk-utils/partx.8 | 129 +++++++++++++++++++++++++++------------------------ misc-utils/look.1 | 14 +++--- misc-utils/lslocks.8 | 33 ++++++------- misc-utils/mcookie.1 | 36 +++++++------- misc-utils/namei.1 | 36 ++++++++------ misc-utils/rename.1 | 14 +++--- 6 files changed, 137 insertions(+), 125 deletions(-) commit a54b8e245f2a90c8bec58b02b632e4af10a43ede Author: Benno Schulenberg Date: Sun Dec 14 20:45:30 2014 +0100 docs: adjust the grammar, text, sorting and formatting of logger man page The message argument is not an option and should not be listed among those. Describe the optional argument of --rfc5424 better. Use the = and no space for optional option arguments. Don't italicize words unnecessarily. Use bold for literal things. And sort the options alphabetically (apart from -V and -h). Signed-off-by: Benno Schulenberg misc-utils/logger.1 | 258 +++++++++++++++++++++++----------------------------- 1 file changed, 116 insertions(+), 142 deletions(-) commit f49ccec2123f15ce25a2e9d7d83d219c237e755a Author: Benno Schulenberg Date: Sun Dec 14 20:45:29 2014 +0100 docs: don't use bold or italics for "[option]" in synopsis of man pages As per the convention shown in Documentation/howto-man-page.txt. Also make a few other tiny adjustments along the way. Signed-off-by: Benno Schulenberg disk-utils/cfdisk.8 | 2 +- disk-utils/fdformat.8 | 2 +- disk-utils/fdisk.8 | 2 +- disk-utils/isosize.8 | 2 +- disk-utils/mkfs.8 | 2 +- disk-utils/mkfs.bfs.8 | 2 +- disk-utils/mkswap.8 | 2 +- disk-utils/partx.8 | 11 +++++++++-- disk-utils/sfdisk.8 | 18 +++++++++--------- login-utils/last.1 | 10 ++++------ login-utils/lslogins.1 | 5 ++++- misc-utils/cal.1 | 3 ++- misc-utils/findmnt.8 | 10 +++++----- misc-utils/getopt.1 | 6 +++--- misc-utils/logger.1 | 3 ++- misc-utils/look.1 | 5 +++-- misc-utils/lsblk.8 | 2 +- misc-utils/lslocks.8 | 3 ++- misc-utils/mcookie.1 | 2 +- misc-utils/namei.1 | 4 ++-- misc-utils/rename.1 | 3 ++- misc-utils/uuidgen.1 | 2 +- misc-utils/whereis.1 | 2 +- sys-utils/readprofile.8 | 2 +- term-utils/agetty.8 | 6 ++---- 25 files changed, 61 insertions(+), 50 deletions(-) commit 1d855f188f45814cf3bba1172cd4fab025b2540c Author: Benno Schulenberg Date: Sun Dec 14 20:45:28 2014 +0100 docs: improve the sorting of the options in the man page of getopt Signed-off-by: Benno Schulenberg misc-utils/getopt.1 | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit ae769172501659eadd017c9cd1d2f926c7d876d7 Author: Benno Schulenberg Date: Sun Dec 14 20:45:27 2014 +0100 textual: do not start option descriptions with a capital This normalizes the help text of getopt, clarifies one description, and also adjust two comments. Signed-off-by: Benno Schulenberg misc-utils/getopt.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit 61e729bde22609a619e1bdafa47ceff2a68abf92 Author: Benno Schulenberg Date: Sun Dec 14 20:45:26 2014 +0100 docs: fix the grammar of the recent comment about comments Signed-off-by: Benno Schulenberg lib/terminal-colors.d.5 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit ecc5632f09b15d10bb4031750e4e0abf83a71f6e Author: Will Johansson Date: Mon Dec 15 03:51:29 2014 -0800 login: Fix unused variables in login.c if _HAVE_UT_TV isn't defined Wrap around the variable declaration for `tv' with ifdef so the compilers don't warn about unused variables if we're compiling without UT_TV. This happens with the musl libc, since it doesn't define _HAVE_UT_TV, even though it _does_ have the ut_tv field in the utmp struct. Signed-off-by: Will Johansson login-utils/login.c | 2 ++ 1 file changed, 2 insertions(+) commit 01966ce852ac6c46e7e35a8e4f981dea88620ff8 Author: Karel Zak Date: Thu Dec 18 10:30:14 2014 +0100 libmount: allow unspecified source on remount kernel does not require mount source (e.g. device name) on remount, it means that fstab/mtab/mountinfo should be optional in this case. For example: mount -o rw,remount / has to work on system without mounted /proc. Signed-off-by: Karel Zak libmount/src/context.c | 10 +++++++++- sys-utils/mount.8 | 14 ++++++++------ 2 files changed, 17 insertions(+), 7 deletions(-) commit cb409411e765862acdfc401116dd933e3f18aab3 Author: Pali Rohár Date: Mon Dec 15 18:29:23 2014 +0100 tests: update UDF test (add identifiers) tests/expected/blkid/low-probe-udf | 3 +++ 1 file changed, 3 insertions(+) commit 2f2730bc77c972d613cfec421468c84f15749708 Author: Pali Rohár Date: Mon Dec 15 18:28:42 2014 +0100 libblkid: udf: Fix reading LABEL, add support for UUID and other udf identifiers libblkid/src/superblocks/udf.c | 207 ++++++++++++++++++++++++++++++++++++----- 1 file changed, 185 insertions(+), 22 deletions(-) commit 1e9d4d4ab6e5ff5700136a6f2f935ab71bfbaced Author: Pali Rohár Date: Mon Dec 15 16:31:18 2014 +0100 libblkid: superblocks: Add function blkid_probe_set_utf8_id_label for setting utf8 id label libblkid/src/superblocks/superblocks.c | 23 +++++++++++++++++++++++ libblkid/src/superblocks/superblocks.h | 2 ++ 2 files changed, 25 insertions(+) commit fe2c9909cd127b5be0f103b8e633807c6afde000 Author: Will Johansson Date: Tue Dec 9 18:40:31 2014 -0800 login-utils: Enable building util-linux against OpenPAM OpenPAM is compatible with util-linux, with a few changes, namely using OpenPAM's conversation function, openpam_ttyconv. We check for Linux-PAM by querying for security/pam_misc.h, and OpenPAM by querying for security/openpam.h. Signed-off-by: Will Johansson configure.ac | 29 ++++++++++++++++++++++------- include/pamfail.h | 6 +++++- login-utils/Makemodule.am | 22 +++++++++++++++++----- login-utils/auth.c | 5 ++++- login-utils/login.c | 17 +++++++++++++---- login-utils/su-common.c | 11 +++++++++-- 6 files changed, 70 insertions(+), 20 deletions(-) commit 0d75c73d4fc9f638b9fbcab142002acadca9e603 Author: Karel Zak Date: Fri Dec 12 15:17:19 2014 +0100 lslogins: fix -l -g logic Signed-off-by: Karel Zak login-utils/lslogins.c | 70 ++++++++++++++++++++++++++++---------------------- 1 file changed, 40 insertions(+), 30 deletions(-) commit 4a465567f642461331444796055d67c6dd5167d2 Author: Karel Zak Date: Fri Dec 12 14:02:21 2014 +0100 terminal-colors.d: add note about comments to man page Reported-by: Jan Pokorný Signed-off-by: Karel Zak lib/terminal-colors.d.5 | 4 ++++ 1 file changed, 4 insertions(+) commit 4b4e1b10f387760aba8a7975222453a568d65771 Author: Karel Zak Date: Tue Dec 9 12:21:33 2014 +0100 getopt: cleanup add_log_options() Signed-off-by: Karel Zak misc-utils/getopt.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit c29b090fc5bd427b899681013a0d98c3c417ea23 Author: Karel Zak Date: Tue Dec 9 12:17:57 2014 +0100 getopt: rename function to keep code readable Signed-off-by: Karel Zak misc-utils/getopt.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit f7b38b8733dbfc096022368ed33bcc24679a3a2d Author: Karel Zak Date: Tue Dec 9 12:17:22 2014 +0100 getopt: fix compiler warning Signed-off-by: Karel Zak misc-utils/getopt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 57420e537a2631ee2668d6c63b69b9f5703a4ddb Merge: 228bb39 3aa1418 Author: Karel Zak Date: Tue Dec 9 11:53:39 2014 +0100 Merge branch '2014wk48' of git://github.com/kerolasa/lelux-utiliteetit * '2014wk48' of git://github.com/kerolasa/lelux-utiliteetit: getopt: avoid re-terminating long_option list at every update getopt: change --shell argument parsing function getopt: prefer switch-case rather than long if statement getopt: remove unnecessary code getopt: make normalize() print strings getopt: use xstrdup rather than malloc + strcpy getopt: add struct getopt_control and remove global variables getopt: remove function prototypes getopt: make nonoptions optstring comment correct tests: add more getopt tests tests: copy test-suite from Frodo Looijaard's getopt getopt: sync with 1.1.6 release line: use util-linux conventions textual: improve error messages login-utils: use libc error printing facility commit 228bb39a5ef24edc03b4bdd4a42adfd6ccf4cbf4 Author: Sami Kerola Date: Mon Dec 8 22:20:56 2014 +0000 lslogins: align usage() and manual with struct option longopts Short option -G goes together with long option --supp-groups, while neither of -m or --groups-info has worked in a release so remove them from usage() and manual. Signed-off-by: Sami Kerola login-utils/lslogins.1 | 5 +---- login-utils/lslogins.c | 3 +-- 2 files changed, 2 insertions(+), 6 deletions(-) commit 123f0f5bf00635e5dd7e5cbc73f906bf2a0bed9c Author: Sami Kerola Date: Mon Dec 8 22:20:55 2014 +0000 lslogins: fix assertion failure for none existing logins This cange makes the following to retun none-zero value instead of a core dump. $ lslogins qwertyuiopasdfghjklzxcvbnm1234567 lslogins: libsmartcols/src/line.c:362: scols_line_get_cell: Assertion `ln' failed. Aborted (core dumped) Signed-off-by: Sami Kerola login-utils/lslogins.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fad25f02a336c5951fbf43ac6183c28b75f98b06 Author: Cristian Rodríguez Date: Mon Dec 8 17:30:10 2014 -0300 build-sys: hwclock requires -lm hwclock uses fabs and therefore needs libm, otherwise a linking error ocurrs when building with -fno-builtin. sys-utils/Makemodule.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c2e1ebbe84a186f64920e6915838ed92edce5706 Author: Sami Kerola Date: Sun Dec 7 10:13:04 2014 +0000 line: use util-linux conventions This change add --help and --version print outs, checking at exit the stdout write was successful, and as a minor thing the command is made to use wide char functions to read and write inputs. Signed-off-by: Sami Kerola text-utils/line.c | 64 ++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 49 insertions(+), 15 deletions(-) commit 338a6bc55b277598fb9e63a42f442d026b255e59 Author: Sami Kerola Date: Sun Dec 7 10:13:03 2014 +0000 textual: improve error messages Use error printing facilities that add command name in front of the error message, and add explanation that is part of existing translations. Signed-off-by: Sami Kerola disk-utils/blockdev.c | 2 +- disk-utils/mkfs.c | 3 +-- disk-utils/mkfs.cramfs.c | 2 +- text-utils/more.c | 10 ++++------ 4 files changed, 7 insertions(+), 10 deletions(-) commit 58fbb9b2d51e9a0807af90d41695dae6b4c8d506 Author: Sami Kerola Date: Sun Dec 7 10:13:02 2014 +0000 login-utils: use libc error printing facility Signed-off-by: Sami Kerola login-utils/islocal.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 3aa141879fd9fa48ec7d71b9398f680d2adf90f2 Author: Sami Kerola Date: Sun Dec 7 09:55:08 2014 +0000 getopt: avoid re-terminating long_option list at every update Terminating the ctl->long_options list once when adding options is completed is enough. This also allows moving ctl->long_options_nr increment to more appropriate location. CC: Frodo Looijaard Signed-off-by: Sami Kerola misc-utils/getopt.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) commit 80dd38e9fb06ef445d2d75749181098c893aabb6 Author: Sami Kerola Date: Sun Dec 7 00:40:11 2014 +0000 getopt: change --shell argument parsing function Avoid passing getopt_control stucture in when returning a value is enough. CC: Frodo Looijaard Signed-off-by: Sami Kerola misc-utils/getopt.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) commit bb742d73524107ef66cf9c86c6b6e524739d17eb Author: Sami Kerola Date: Sun Dec 7 00:16:56 2014 +0000 getopt: prefer switch-case rather than long if statement And avoid testing same thing time after time. CC: Frodo Looijaard Signed-off-by: Sami Kerola misc-utils/getopt.c | 64 +++++++++++++++++++++++++++++++---------------------- 1 file changed, 37 insertions(+), 27 deletions(-) commit 0640689c209357611bd434091552839634f6af76 Author: Sami Kerola Date: Sat Dec 6 18:21:56 2014 +0000 getopt: remove unnecessary code The control structure is initialized in main(). CC: Frodo Looijaard Signed-off-by: Sami Kerola misc-utils/getopt.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit eba520d8249cb0b444f8b9ebd2ab72d47b42c794 Author: Sami Kerola Date: Sat Dec 6 17:58:16 2014 +0000 getopt: make normalize() print strings A change towards less indirection, and a change to free allocated memory. CC: Frodo Looijaard Signed-off-by: Sami Kerola misc-utils/getopt.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) commit 05ac43f5f8ce008d4909e920aeecf5ecf06d620a Author: Sami Kerola Date: Sat Dec 6 11:50:03 2014 +0000 getopt: use xstrdup rather than malloc + strcpy CC: Frodo Looijaard Signed-off-by: Sami Kerola misc-utils/getopt.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) commit 1dacc901ec55c9158c0c48ca272878808e5336a2 Author: Sami Kerola Date: Sat Dec 6 11:32:46 2014 +0000 getopt: add struct getopt_control and remove global variables CC: Frodo Looijaard Signed-off-by: Sami Kerola misc-utils/getopt.c | 164 ++++++++++++++++++++++++++-------------------------- 1 file changed, 83 insertions(+), 81 deletions(-) commit 5f69b38c5e170369fe78b48a1ef335c7c83ce3ce Author: Sami Kerola Date: Sat Dec 6 16:48:57 2014 +0000 getopt: remove function prototypes Functions are in right order so they do not need prototypes, with effect of not needing to keep function argument changes in sync in two locations. CC: Frodo Looijaard Signed-off-by: Sami Kerola misc-utils/getopt.c | 10 ---------- 1 file changed, 10 deletions(-) commit d01f47f6f5842ac656b0d3fe01a6414af399f1ca Author: Sami Kerola Date: Sat Dec 6 10:47:53 2014 +0000 getopt: make nonoptions optstring comment correct From manual page: 'If the first character of optstring is '-', then each nonoption argv-element is handled as if it were the argument of an option with character code 1.' Reference: http://man7.org/linux/man-pages/man3/getopt.3.html CC: Frodo Looijaard Signed-off-by: Sami Kerola misc-utils/getopt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d458000dea7ff96c63532b317fce631847768877 Author: Sami Kerola Date: Fri Dec 5 22:49:48 2014 +0000 tests: add more getopt tests After importing Frodo's tests I ran coverage to see if something had remained unchecked, and there were couple tests that could be done. CC: Frodo Looijaard Signed-off-by: Sami Kerola tests/expected/misc/getopt3 | 0 tests/expected/misc/getopt3-compatible | 5 +++ tests/expected/misc/getopt3-csh | 2 + tests/expected/misc/getopt3-no-arguments | 3 ++ tests/expected/misc/getopt3-non-option | 4 ++ tests/expected/misc/getopt3-posix_correctly | 4 ++ tests/expected/misc/getopt3-sh | 2 + tests/ts/misc/getopt3 | 63 +++++++++++++++++++++++++++++ 8 files changed, 83 insertions(+) commit 93575f2943332d18e8b49441f9519ba2a093e0c3 Author: Sami Kerola Date: Thu Dec 4 22:39:21 2014 +0000 tests: copy test-suite from Frodo Looijaard's getopt The test cases and their names are the same, but the surrounding testing facility with Frodo's svn and util-linux are pretty different so this is not exactly 1:1 copy. Reference: svn://svn.frodo.looijaard.name/public/getopt/trunk/tests CC: Frodo Looijaard Signed-off-by: Sami Kerola tests/expected/misc/getopt2 | 19 +++ .../expected/misc/getopt2-alternative_option_clash | 2 + .../expected/misc/getopt2-alternative_option_long | 2 + .../expected/misc/getopt2-alternative_option_short | 2 + tests/expected/misc/getopt2-invalid_getopt_option | 3 + tests/expected/misc/getopt2-invocation_model_one | 2 + .../misc/getopt2-invocation_model_three_as_one | 2 + .../misc/getopt2-invocation_model_two_as_one | 2 + .../misc/getopt2-invocation_without_parameters | 3 + .../expected/misc/getopt2-long_option_ambiguous_1 | 3 + tests/expected/misc/getopt2-longopts | 2 + tests/expected/misc/getopt2-name_option_long | 4 + tests/expected/misc/getopt2-name_option_short | 4 + tests/expected/misc/getopt2-quiet_option_long | 2 + tests/expected/misc/getopt2-quiet_option_short | 2 + .../expected/misc/getopt2-quiet_output_option_long | 5 + .../misc/getopt2-quiet_output_option_short | 5 + .../expected/misc/getopt2-same_long_short_options | 2 + .../expected/misc/getopt2-test_for_enhanced_getopt | 1 + tests/expected/misc/getopt2-unknown_options | 4 + tests/expected/misc/getopt2-unquoted_option_bash | 5 + tests/expected/misc/getopt2-unquoted_option_tcsh | 5 + tests/expected/misc/getopt2-weird_quoting_bash | 5 + tests/expected/misc/getopt2-weird_quoting_tcsh | 2 + tests/ts/misc/getopt2 | 176 +++++++++++++++++++++ 25 files changed, 264 insertions(+) commit b5f3078e1474aedc7004fef85c2fe86d589302d7 Author: Sami Kerola Date: Thu Dec 4 22:04:08 2014 +0000 getopt: sync with 1.1.6 release Reference: http://www.spinics.net/lists/util-linux-ng/msg10556.html CC: Frodo Looijaard Signed-off-by: Sami Kerola misc-utils/getopt.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) commit bdfcdfc5b537775f92a9228032dcfbe05395c07d Author: Sami Kerola Date: Thu Dec 4 21:49:13 2014 +0000 line: use util-linux conventions This change add --help and --version print outs, checking at exit the stdout write was successful, and as a minor thing the command is made to use wide char functions to read and write inputs. Signed-off-by: Sami Kerola text-utils/line.c | 64 ++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 49 insertions(+), 15 deletions(-) commit 497cc314856f274c790296116fba321425b503a8 Author: Sami Kerola Date: Thu Dec 4 21:10:44 2014 +0000 textual: improve error messages Use error printing facilities that add command name in front of the error message, and add explanation that is part of existing translations. Signed-off-by: Sami Kerola disk-utils/blockdev.c | 2 +- disk-utils/mkfs.c | 3 +-- disk-utils/mkfs.cramfs.c | 2 +- text-utils/more.c | 10 ++++------ 4 files changed, 7 insertions(+), 10 deletions(-) commit 6573c8f628aee65b528cffa6bc630f6d89d87aca Author: Sami Kerola Date: Sun Nov 30 18:10:57 2014 +0000 login-utils: use libc error printing facility Signed-off-by: Sami Kerola login-utils/islocal.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 372112e908e73a9737ad28ee7e33da271654baff Author: Karel Zak Date: Fri Dec 5 15:30:04 2014 +0100 libmount: add new libmnt_monitor API It's usually enough to us [e]poll() to monitor kernel mount table, but there is no way how to monitor changes in userspace mount options (e.g. _netdev). The management of these mount options is completely hidden in libmount and /rub/mount/utab is private libmount file. This patch introduces new libmnt_mount API to monitor also userspace mount table. Signed-off-by: Karel Zak include/fileutils.h | 6 + libmount/docs/libmount-docs.xml | 1 + libmount/docs/libmount-sections.txt | 12 + libmount/src/Makemodule.am | 9 +- libmount/src/init.c | 2 + libmount/src/libmount.h.in | 18 ++ libmount/src/libmount.sym | 10 + libmount/src/monitor.c | 421 ++++++++++++++++++++++++++++++++++++ libmount/src/mountP.h | 2 + libmount/src/tab_diff.c | 4 +- 10 files changed, 482 insertions(+), 3 deletions(-) commit 109df14fad4e9570e26950913ebace6c79289400 Author: Sebastian Krahmer Date: Fri Dec 5 10:06:42 2014 +0100 libblkid: fix potential bufer overflows While digging deeper into libblk probing, I found that some computations might wrap and allocate too few buffer space which then overflows. In particular on 32bit systems (chromebook) where size_t is 32bit, this is problematic (for 64bit the result fits into the calloc size_t). Signed-off-by: Karel Zak libblkid/src/partitions/gpt.c | 12 ++++++++---- libblkid/src/probe.c | 7 +++++++ libblkid/src/superblocks/zfs.c | 3 +++ 3 files changed, 18 insertions(+), 4 deletions(-) commit 764b697c56660d3d7207b985ff6b0730df387954 Author: Karel Zak Date: Thu Dec 4 13:06:03 2014 +0100 libfdisk: fix bug in cmp_numbers() and partitions sorting Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1170191 Signed-off-by: Karel Zak include/c.h | 2 +- libfdisk/src/partition.c | 10 +++++----- libfdisk/src/table.c | 39 +++++++++++++++++++++++++++++++++++++-- 3 files changed, 43 insertions(+), 8 deletions(-) commit bbfc24298f5a5811246b7f484479526e3a0b8688 Author: Karel Zak Date: Thu Dec 4 12:24:31 2014 +0100 libfdisk: remove 'end' from struct fdisk_partition This struct member duplicate "start+size". Signed-off-by: Karel Zak libfdisk/docs/libfdisk-sections.txt | 2 ++ libfdisk/src/bsd.c | 1 - libfdisk/src/dos.c | 1 - libfdisk/src/fdiskP.h | 1 - libfdisk/src/gpt.c | 1 - libfdisk/src/libfdisk.h.in | 3 +++ libfdisk/src/libfdisk.sym | 2 ++ libfdisk/src/partition.c | 49 ++++++++++++++++++++++++++++--------- libfdisk/src/sgi.c | 1 - libfdisk/src/sun.c | 1 - libfdisk/src/table.c | 38 ++++++++++++++++++++++------ 11 files changed, 75 insertions(+), 25 deletions(-) commit 0073a4cff2ef7670e4f657b1a6eaf519997edddc Author: Karel Zak Date: Thu Dec 4 11:41:51 2014 +0100 libfdisk: rename sector_t to fdisk_sector_t .. just to avoid too generic names for public API. Signed-off-by: Karel Zak disk-utils/fdisk.c | 12 ++++--- libfdisk/src/alignment.c | 32 +++++++++---------- libfdisk/src/ask.c | 2 +- libfdisk/src/bsd.c | 12 +++---- libfdisk/src/context.c | 14 ++++---- libfdisk/src/dos.c | 80 +++++++++++++++++++++++----------------------- libfdisk/src/fdiskP.h | 22 ++++++------- libfdisk/src/libfdisk.h.in | 32 +++++++++++-------- libfdisk/src/partition.c | 11 ++++--- libfdisk/src/sgi.c | 8 ++--- libfdisk/src/sun.c | 16 ++++++---- libfdisk/src/table.c | 15 ++++----- 12 files changed, 132 insertions(+), 124 deletions(-) commit 19ff8ff7c448e4e88e602dde0af4230bff5b4daa Author: Karel Zak Date: Thu Dec 4 10:27:39 2014 +0100 libfdisk: fix cfdisk freespace analyze The problem is how fdisk_partition_cmp_start() compare numbers, the function returns result from "a->start - b->start", unfortunately the numbers are uint64, but function returns "int". Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1170191 Signed-off-by: Karel Zak include/c.h | 8 ++++++++ libfdisk/src/alignment.c | 4 ++++ libfdisk/src/dos.c | 2 +- libfdisk/src/gpt.c | 2 +- libfdisk/src/partition.c | 12 +++++++++++- libfdisk/src/table.c | 6 ++++++ 6 files changed, 31 insertions(+), 3 deletions(-) commit 7f14ee1b551e839a4ae081c8d2b7633ca40a5823 Author: Karel Zak Date: Tue Dec 2 11:38:15 2014 +0100 lsblk: add SUBSYSTEMS column $ lsblk -oNAME,SIZE,TYPE,SUBSYSTEMS /dev/sr0 NAME SIZE TYPE SUBSYSTEMS sr0 7.8M rom block:scsi:usb:pci Signed-off-by: Karel Zak misc-utils/lsblk.c | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) commit a3c9c674c56c130b5c1bf5faac8a2edc42a309ff Author: Karel Zak Date: Tue Dec 2 11:09:31 2014 +0100 docs: update TODO file Signed-off-by: Karel Zak Documentation/TODO | 5 ----- 1 file changed, 5 deletions(-) commit 483987c275e461f4118a89d3be013698845d702b Author: Karel Zak Date: Tue Dec 2 11:09:04 2014 +0100 lsblk: add HOTPLUG column Signed-off-by: Karel Zak misc-utils/lsblk.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit bc265f7cfa1018df129336bd79bb6817d335be5f Author: Karel Zak Date: Tue Dec 2 11:00:19 2014 +0100 eject: use sysfs API to detect hotplug Signed-off-by: Karel Zak sys-utils/eject.c | 106 +----------------------------------------------------- 1 file changed, 1 insertion(+), 105 deletions(-) commit e017ef8bb921d8faa681dfefc58209c6d8b38de5 Author: Karel Zak Date: Tue Dec 2 10:59:48 2014 +0100 lib/sysfs: add subsystem and hotplug detection Signed-off-by: Karel Zak include/sysfs.h | 4 ++ lib/sysfs.c | 153 +++++++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 156 insertions(+), 1 deletion(-) commit dc43cb6a5be94cb0d861fc4b57fd500fc3852a12 Author: Karel Zak Date: Fri Nov 28 13:29:15 2014 +0100 docs: update TODO file Signed-off-by: Karel Zak Documentation/TODO | 5 +++++ 1 file changed, 5 insertions(+) commit 89e90ae7b2826110ea28c1c0eb8e7c56c3907bdc Author: Karel Zak Date: Thu Nov 27 13:39:35 2014 +0100 libblkid: care about unsafe chars in cache The high-level libblkid API uses /run/blkid/blkid.tab cache to store probing results. The cache format is devname and unfortunately the cache code does not escape quotation marks: # mkfs.ext4 -L 'AAA"BBB' # cat /run/blkid/blkid.tab ... /dev/sdb1 such string is later incorrectly parsed and blkid(8) returns nonsenses. And for use-cases like # eval $(blkid -o export /dev/sdb1) it's also insecure. Note that mount, udevd and blkid -p are based on low-level libblkid API, it bypass the cache and directly read data from the devices. The current udevd upstream does not depend on blkid(8) output at all, it's directly linked with the library and all unsafe chars are encoded by \x notation. # mkfs.ext4 -L 'X"`/tmp/foo` "' /dev/sdb1 # udevadm info --export-db | grep LABEL ... E: ID_FS_LABEL=X__/tmp/foo___ E: ID_FS_LABEL_ENC=X\x22\x60\x2ftmp\x2ffoo\x60\x20\x22 Signed-off-by: Karel Zak libblkid/src/read.c | 21 ++++++++++++++++++--- libblkid/src/save.c | 22 +++++++++++++++++++++- misc-utils/blkid.8 | 5 ++++- misc-utils/blkid.c | 4 ++-- 4 files changed, 45 insertions(+), 7 deletions(-) commit cca51b9e45460e05bf5da81be80a26a70a120704 Author: Karel Zak Date: Thu Nov 27 13:36:09 2014 +0100 include/carefulputc: encode also ' and $ in fputs_quoted() output This change is important for commands linked with libsmartcols (e.g. lsblk(1)) to make it more safe for crazy scenarios like eval $(lsblk --fs --pairs /dev/sdb1) where the command returns NAME="value" from filesystem LABELS (etc.) Signed-off-by: Karel Zak include/carefulputc.h | 2 ++ 1 file changed, 2 insertions(+) commit 705854f30773e463cd61796bc896f0c0053aa36d Author: Karel Zak Date: Wed Nov 26 19:13:57 2014 +0100 libfdisk: add API docs Signed-off-by: Karel Zak configure.ac | 4 +- libfdisk/Makemodule.am | 5 + libfdisk/docs/.gitignore | 18 +++ libfdisk/docs/Makefile.am | 93 +++++++++++ libfdisk/docs/libfdisk-docs.xml | 62 ++++++++ libfdisk/docs/libfdisk-sections.txt | 301 ++++++++++++++++++++++++++++++++++++ libfdisk/docs/version.xml.in | 1 + libfdisk/src/alignment.c | 8 +- libfdisk/src/ask.c | 15 +- libfdisk/src/bsd.c | 4 +- libfdisk/src/context.c | 11 +- libfdisk/src/dos.c | 4 +- libfdisk/src/gpt.c | 4 +- libfdisk/src/label.c | 28 ++-- libfdisk/src/libfdisk.h.in | 12 +- libfdisk/src/partition.c | 12 +- libfdisk/src/parttype.c | 4 +- libfdisk/src/script.c | 13 +- libfdisk/src/sgi.c | 4 +- libfdisk/src/sun.c | 4 +- libfdisk/src/table.c | 8 +- libfdisk/src/utils.c | 4 +- 22 files changed, 557 insertions(+), 62 deletions(-) commit a1ef792fda428eff141d4c844942c09f69e67088 Author: Karel Zak Date: Wed Nov 26 17:33:07 2014 +0100 libfdisk: rename and move function Signed-off-by: Karel Zak disk-utils/cfdisk.c | 2 +- disk-utils/fdisk-menu.c | 18 +++++++++--------- disk-utils/sfdisk.c | 4 ++-- libfdisk/src/ask.c | 22 ++++++++++++++++++++++ libfdisk/src/context.c | 20 -------------------- libfdisk/src/label.c | 4 ++-- libfdisk/src/libfdisk.h.in | 15 ++++++++------- libfdisk/src/libfdisk.sym | 2 +- 8 files changed, 45 insertions(+), 42 deletions(-) commit 5bc118c3c2f72c64fecf7f850abb0d8f2fab2633 Author: Karel Zak Date: Wed Nov 26 16:53:48 2014 +0100 libsmartcols: fix docs namespace Signed-off-by: Karel Zak libsmartcols/docs/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ed79557e1d37586297b07d50777d272356b06990 Author: Karel Zak Date: Wed Nov 26 13:20:16 2014 +0100 build-sys: add fdisk.pc Signed-off-by: Karel Zak Makefile.am | 2 ++ configure.ac | 4 ++++ libfdisk/Makemodule.am | 2 ++ libfdisk/fdisk.pc.in | 11 +++++++++++ 4 files changed, 19 insertions(+) commit c820e3ffcfdfa6309cf89979226460d6c1233212 Author: Karel Zak Date: Wed Nov 26 12:51:15 2014 +0100 build-sys: add fdiskP.h to sources Signed-off-by: Karel Zak libfdisk/src/Makemodule.am | 1 + 1 file changed, 1 insertion(+) commit 0bb4c979c68ec8ffeadc3315f26c883f19c98d1e Author: Karel Zak Date: Wed Nov 26 12:45:24 2014 +0100 build-sys: create a regular shared libfdisk.so - symbols versioning - SONAME from configure.ac - library version to header file - modify build-sys to compile and install shared lib Signed-off-by: Karel Zak Makefile.am | 7 +- configure.ac | 22 +- libfdisk/Makemodule.am | 2 + libfdisk/src/.gitignore | 1 + libfdisk/src/Makemodule.am | 70 ++++-- libfdisk/src/libfdisk.h | 564 -------------------------------------------- libfdisk/src/libfdisk.h.in | 571 +++++++++++++++++++++++++++++++++++++++++++++ libfdisk/src/libfdisk.sym | 232 ++++++++++++++++++ 8 files changed, 879 insertions(+), 590 deletions(-) commit 784467ad2d27a5fc2393027f9b0421f5f5e8feff Author: Karel Zak Date: Wed Nov 26 12:38:53 2014 +0100 blkdiscard: fix compiler warning Signed-off-by: Karel Zak sys-utils/blkdiscard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e857e9940a9dc4b2d5c699901d84b4508d80199b Author: Karel Zak Date: Wed Nov 26 12:14:18 2014 +0100 build-sys: cleanup in libmount Makemodule Signed-off-by: Karel Zak libmount/src/Makemodule.am | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit a78dba34a4a19250b53707377ba99a7a7fa7cfcd Author: Karel Zak Date: Wed Nov 26 11:55:45 2014 +0100 libfdisk: add comments to header file Signed-off-by: Karel Zak libfdisk/src/libfdisk.h | 74 ++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 70 insertions(+), 4 deletions(-) commit 77e46d1c06f6c5c3abf0812826822f5c16442b1e Author: Karel Zak Date: Wed Nov 26 11:45:00 2014 +0100 libfdisk: add docs for SGI functions libfdisk/src/sgi.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit fd979f5be7857b9fd448cc58aaac322fdf12c83c Author: Karel Zak Date: Wed Nov 26 11:34:57 2014 +0100 libfdisk: add docs for SUN functions libfdisk/src/sun.c | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 53 insertions(+), 1 deletion(-) commit 4e76cecd6f2aaaaba332ec6fec85b0d0b3c76b9a Author: Karel Zak Date: Wed Nov 26 11:26:31 2014 +0100 libfdisk: cleanup fdisk_partition_to_string() comment libfdisk/src/partition.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 0e679d79e273896012738e0a2a4fbb5b3a9556b0 Author: Karel Zak Date: Wed Nov 26 11:23:27 2014 +0100 libfdisk: fix typo libfdisk/src/label.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 7ab7af75786c519eb64e7a9257b9bd95dd0cd1fd Author: Karel Zak Date: Wed Nov 26 11:21:16 2014 +0100 libfdisk: add docs for iterator libfdisk/src/iter.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 5d54d9f55b158e697aa0d54e511815c7e8dd5236 Author: Karel Zak Date: Wed Nov 26 11:13:11 2014 +0100 libfdisk: add docs for init functions libfdisk/src/init.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 0077e7cd95c1a4b00ff8e6537af69b0bc4b896b9 Author: Karel Zak Date: Wed Nov 26 11:11:19 2014 +0100 libfdisk: add docs for GPT functions libfdisk/src/gpt.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit b7d101a20d1dedebb10e0734ab1dc4c2728288b5 Author: Karel Zak Date: Wed Nov 26 11:00:43 2014 +0100 libfdisk: add docs for DOS functions libfdisk/src/dos.c | 26 +++++++++++++++++++++++--- libfdisk/src/fdiskP.h | 5 +++++ libfdisk/src/libfdisk.h | 11 +++-------- 3 files changed, 31 insertions(+), 11 deletions(-) commit a4e6a45e54e10567aaa7a501e3e69bf533440193 Author: Karel Zak Date: Wed Nov 26 10:28:37 2014 +0100 libfdisk: add docs for BSD functions libfdisk/src/bsd.c | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) commit 1c01e44f15b9c75fb8086c85be68d6e042908f50 Author: Karel Zak Date: Tue Nov 25 14:36:50 2014 +0100 libfdisk: cleanup ask API, add comments Signed-off-by: Karel Zak libfdisk/src/ask.c | 242 +++++++++++++++++++++++++++++++++++++++++------- libfdisk/src/fdiskP.h | 19 +++- libfdisk/src/libfdisk.h | 100 +++++++------------- 3 files changed, 260 insertions(+), 101 deletions(-) commit 0477369af46fd909960a752df63f989a932bc764 Author: Karel Zak Date: Fri Nov 21 15:31:55 2014 +0100 libfdisk: remove flags from fdisk_ask API We don't use it for anything usable, lets kill this over-engineering. Signed-off-by: Karel Zak disk-utils/fdisk-menu.c | 6 ++--- disk-utils/fdisk.c | 2 +- libfdisk/src/ask.c | 65 +++++++++++++++++++++++-------------------------- libfdisk/src/bsd.c | 12 +++------ libfdisk/src/dos.c | 9 +++---- libfdisk/src/fdiskP.h | 1 - libfdisk/src/gpt.c | 20 ++++++--------- libfdisk/src/libfdisk.h | 9 ------- libfdisk/src/sgi.c | 6 ++--- libfdisk/src/sun.c | 3 +-- 10 files changed, 51 insertions(+), 82 deletions(-) commit 41525ce0622e490cc904b79fc2d3296c81ae091c Author: Karel Zak Date: Fri Nov 21 13:57:14 2014 +0100 ldattach: add fallback for N_GSM0710 Addresses: https://github.com/karelzak/util-linux/issues/133 Signed-off-by: Karel Zak sys-utils/ldattach.c | 3 +++ 1 file changed, 3 insertions(+) commit 6508db29ded734ac4ff5e5e19486c143c9eb3d89 Author: Karel Zak Date: Fri Nov 21 12:23:47 2014 +0100 lib/colors: use static buffers when parse scheme * use static buffers when parse scheme colors * cleanup deallocation on error in sequence parser Signed-off-by: Karel Zak lib/colors.c | 48 +++++++++++++++++++++++++++++------------------- 1 file changed, 29 insertions(+), 19 deletions(-) commit 90d5285d8c21897d3fc0caed4691c88f15d0131b Author: Karel Zak Date: Fri Nov 21 11:38:11 2014 +0100 agetty: use futimens, check for all in configure.ac It seems better to warn about --reload in ./configure if futimens or inotify_init1 are missing. The patch also replaces futimes() with futimens() to make the code compatible with Uclibc. Addresses: https://github.com/karelzak/util-linux/issues/133 Signed-off-by: Karel Zak configure.ac | 8 +++++++- term-utils/agetty.c | 8 +------- 2 files changed, 8 insertions(+), 8 deletions(-) commit a3d834888e912f29def6cb1c37d1793736ce81cd Author: Karel Zak Date: Fri Nov 21 11:03:08 2014 +0100 libfdisk: add ref.counting to ask API Signed-off-by: Karel Zak libfdisk/src/ask.c | 67 ++++++++++++++++++++++++++++++++++++++++-------- libfdisk/src/bsd.c | 4 +-- libfdisk/src/dos.c | 6 ++--- libfdisk/src/fdiskP.h | 2 ++ libfdisk/src/gpt.c | 2 +- libfdisk/src/libfdisk.h | 3 ++- libfdisk/src/partition.c | 4 +-- libfdisk/src/sgi.c | 4 +-- libfdisk/src/sun.c | 4 +-- 9 files changed, 72 insertions(+), 24 deletions(-) commit 3c5ee57cd3e604bc728d261351abf69b2800980e Author: Karel Zak Date: Fri Nov 21 09:42:23 2014 +0100 agetty: fix typo Signed-off-by: Karel Zak libfdisk/src/alignment.c | 6 +++--- libfdisk/src/context.c | 4 ++++ libfdisk/src/label.c | 4 +++- libfdisk/src/partition.c | 12 ++++++++++++ libfdisk/src/parttype.c | 9 ++++++++- libfdisk/src/script.c | 12 ++++++++++++ libfdisk/src/table.c | 10 ++++++++++ libfdisk/src/utils.c | 8 +++++++- term-utils/agetty.c | 2 +- 9 files changed, 60 insertions(+), 7 deletions(-) commit 914047b498a377944699b59ec93deddd4de9d63d Author: Karel Zak Date: Fri Nov 21 09:03:00 2014 +0100 agetty: keep the current baud before try 9600 on serial lines Signed-off-by: Karel Zak term-utils/agetty.8 | 6 ++++-- term-utils/agetty.c | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) commit 14da9b1f3da60d1c77a9a18fc3c4c9298839ae0e Author: Karel Zak Date: Fri Nov 21 08:43:14 2014 +0100 agetty: don't ignore TERM Fix command line parsing to not ignore term setting if no baud specified, for example: /sbin/agetty ttyS0 vt100 Signed-off-by: Karel Zak term-utils/agetty.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit adc9f78cfcfbeedeb8577da2fa2834daeb99c0b1 Author: Karel Zak Date: Thu Nov 20 14:01:03 2014 +0100 build-sys: cleanup library symbol files Signed-off-by: Karel Zak libblkid/src/Makemodule.am | 6 +- libblkid/src/blkid.sym | 164 ------------------------------------- libblkid/src/libblkid.sym | 166 ++++++++++++++++++++++++++++++++++++++ libmount/src/libmount.sym | 9 ++- libsmartcols/src/libsmartcols.sym | 2 + libuuid/src/Makemodule.am | 6 +- libuuid/src/libuuid.sym | 48 +++++++++++ libuuid/src/uuid.sym | 46 ----------- 8 files changed, 228 insertions(+), 219 deletions(-) commit 9146a00823925f318fb7b71f0db0feb0d71d06ba Author: Karel Zak Date: Thu Nov 20 13:28:41 2014 +0100 ibfdisk: (gpt) allow to maximize partition enlarge second partition: # echo ',+' | ./sfdisk -N2 /dev/sdb ... Disk /dev/sdb: 100 MiB, 104857600 bytes, 204800 sectors Old situation: Device Start End Sectors Size Type /dev/sdb1 2048 22527 20480 10M Linux filesystem /dev/sdb2 22528 43007 20480 10M Linux filesystem New situation: Device Start End Sectors Size Type /dev/sdb1 2048 22527 20480 10M Linux filesystem /dev/sdb2 22528 204766 182239 89M Linux filesystem Signed-off-by: Karel Zak libfdisk/src/gpt.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) commit 333c3761383d6dd166f032080055e9333b09628c Author: Karel Zak Date: Thu Nov 20 13:11:38 2014 +0100 libfdisk: (dos) allow to maximize partition The struct fdisk_partition has special flag "end_follow_default" to make the partition large as much as possible. This patch makes this flag usable for fdisk_set_partition() function. Command line example (enlarge the first partition): # echo ',+' | ./sfdisk -N1 /dev/sdb ... Disk /dev/sdb: 100 MiB, 104857600 bytes, 204800 sectors ... Old situation: Device Boot Start End Sectors Size Id Type /dev/sdb1 2048 22527 20480 10M 83 Linux ^^^^^ New situation: Device Boot Start End Sectors Size Id Type /dev/sdb1 2048 204799 202752 99M 83 Linux ^^^^^^ Signed-off-by: Karel Zak disk-utils/sfdisk.c | 2 + libfdisk/src/dos.c | 121 +++++++++++++++++++++++++++++++++++++++++----------- 2 files changed, 98 insertions(+), 25 deletions(-) commit 8410cdd38ad06d0904ec3ba252336fecc4aff067 Author: Karel Zak Date: Thu Nov 20 10:56:03 2014 +0100 aggety: always set default serial line speed * makes speeds table usage more robust * don't call next_speed() for empty speeds table to avoid division by zero * default to 9600 when port baud unspecified Addresses: https://github.com/karelzak/util-linux/pull/131 Signed-off-by: Karel Zak term-utils/agetty.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit bbf0ff70f08c91e6d430b501ab2d8d4702b8fe92 Author: Karel Zak Date: Wed Nov 19 16:50:08 2014 +0100 libmount: fix lock test to use real time to sync Signed-off-by: Karel Zak libmount/src/lock.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 6f7eba20aff93f4a583dd81d16e2a8cd4a4e39c9 Author: Karel Zak Date: Wed Nov 19 15:45:42 2014 +0100 login: ignore SIGXFSZ when write to lastlog the lastlog file is huge and on systems with large UIDs, it's so huge that it generates SIGXFSZ when the FSIZE limit is too small. Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1165702 Signed-off-by: Karel Zak login-utils/login.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 9b825f81940b18f6db2e43063431aef30e89a0fa Author: Karel Zak Date: Wed Nov 19 14:43:38 2014 +0100 blkid: add hint about lsblk to the man page Signed-off-by: Karel Zak misc-utils/blkid.8 | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit a72de3cf64e740624f579bc25e7f003be2d66172 Author: Andreas Henriksson Date: Wed Nov 19 12:03:35 2014 +0100 lib/colors: fix double free on error path The error path was a bit unclear on the semantics. The seq argument would get freed but not the name argument. Then the caller frees them both when the function returns an error. This fixes the problem my making the function not touch the arguments unless we're going to return success. Also improve the description for this function to make it more obvious what the callers should expect. Addresses: CID#77487 (on scan.coverity.com for JIghtuse/util-linux) Signed-off-by: Andreas Henriksson lib/colors.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit cd2876d252215fb3fbe46f787cb37cd4fbd64e53 Author: Karel Zak Date: Wed Nov 19 11:54:47 2014 +0100 build-sys: move all around clock_gettime() to monotonic.c Signed-off-by: Karel Zak include/Makemodule.am | 2 +- include/boottime.h | 9 ------ include/monotonic.h | 11 ++++++++ include/timeutils.h | 2 -- lib/boottime.c | 43 ----------------------------- lib/monotonic.c | 68 ++++++++++++++++++++++++++++++++++++++++++++++ lib/timeutils.c | 23 ---------------- libmount/src/Makemodule.am | 1 + libmount/src/lock.c | 2 +- login-utils/Makemodule.am | 2 +- login-utils/last.c | 2 +- sys-utils/Makemodule.am | 6 ++-- sys-utils/dmesg.c | 2 +- sys-utils/eject.c | 2 +- 14 files changed, 89 insertions(+), 86 deletions(-) commit a4830f617ed018705ce6874abee1cae84fdddc3e Author: Karel Zak Date: Wed Nov 19 11:23:05 2014 +0100 build-sys: use CLOCKGETTIME_LIBS Signed-off-by: Karel Zak libmount/src/Makemodule.am | 4 ++-- sys-utils/Makemodule.am | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit edda9f8a15d25a6c208a444c41e994421b73c0a3 Author: Karel Zak Date: Wed Nov 19 11:10:55 2014 +0100 libmount: fix utab entry on remount mount(8) command does not set ROOT= field to utab entry on remount, for example: mount -oremount,_netdev /mnt Reported-by: Chris Leech Signed-off-by: Karel Zak libmount/src/context.c | 3 +++ 1 file changed, 3 insertions(+) commit 7deae03fb4a70ed64881ef92b9f456ed41897c6d Author: Karel Zak Date: Wed Nov 19 11:07:40 2014 +0100 libmount: add private mnt_context_get_mtab_for_target() Signed-off-by: Karel Zak libmount/src/context.c | 65 +++++++++++++++++++++++++++++++++++++++---- libmount/src/context_umount.c | 41 ++++----------------------- libmount/src/mountP.h | 3 ++ 3 files changed, 69 insertions(+), 40 deletions(-) commit e713e11d4c468efd19b6532821d2003eafa7ca94 Author: Karel Zak Date: Wed Nov 19 11:07:11 2014 +0100 libmount: reuse allocated fs in parser Signed-off-by: Karel Zak libmount/src/tab_parse.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) commit a504eaed651d1648bbe2f47562537effdda76367 Author: Karel Zak Date: Wed Nov 19 11:06:24 2014 +0100 libmount: improve mnt_reset_fs() Signed-off-by: Karel Zak libmount/src/fs.c | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) commit 700031ade7cbcdcecf1205f98f50ed0da57c7493 Author: Karel Zak Date: Tue Nov 18 14:35:21 2014 +0100 misc: use monotonic time rater than gettimeofday Based on patch Alexander Samilovskih Signed-off-by: Karel Zak include/timeutils.h | 3 +++ lib/timeutils.c | 23 +++++++++++++++++++++++ libmount/src/lock.c | 9 +++++---- sys-utils/blkdiscard.c | 7 ++++--- sys-utils/eject.c | 5 +++-- 5 files changed, 38 insertions(+), 9 deletions(-) commit 570a9300144beeb4f5fd26860196ed2538a773b6 Author: Nikolay Sivov Date: Tue Nov 18 14:14:47 2014 +0100 uuidd: Fixed a typo in daemon logging message Signed-off-by: Nikolay Sivov misc-utils/uuidd.rc.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9779f598316b3d14ac53b999570b3382faeead7a Author: Ville Skyttä Date: Sat Nov 15 22:41:43 2014 +0200 docs: Spelling fixes Signed-off-by: Ville Skyttä Signed-off-by: Karel Zak AUTHORS | 2 +- misc-utils/logger.1 | 2 +- sys-utils/mount.8 | 2 +- tests/functions.sh | 2 +- tests/run.sh | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) commit 396a6d7df5a034ea39b7a1917c7a5f68b9d00a2b Author: Ville Skyttä Date: Sat Nov 15 22:36:04 2014 +0200 bash-completion: Invoke actual commands to be completed, not basenames Addresses partially: http://bugs.debian.org/769462 Signed-off-by: Ville Skyttä bash-completion/chsh | 2 +- bash-completion/eject | 2 +- bash-completion/findmnt | 8 ++++---- bash-completion/losetup | 4 ++-- bash-completion/lsblk | 2 +- bash-completion/setarch | 2 +- bash-completion/setpriv | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) commit 8596f6391461bac53f5bab48f8c8b17a7c459f28 Author: Karel Zak Date: Tue Nov 18 13:48:34 2014 +0100 ldattach: GSM0710 support, add intro modem command Patch add: --intro-command string : send command to modem --pause value : define delay between intro command and ldattach Based on patch from Martin Schmid Signed-off-by: Karel Zak configure.ac | 1 + sys-utils/ldattach.8 | 11 ++++++ sys-utils/ldattach.c | 95 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 3 files changed, 105 insertions(+), 2 deletions(-) commit acec6eec4e29f5951bee5b5db9534566abec27bb Author: Sami Kerola Date: Tue Nov 11 21:34:30 2014 +0000 mkswap: remove memory leaks [LeakSanitizer] [valgrind] ==18922==ERROR: LeakSanitizer: detected memory leaks Direct leak of 8 byte(s) in 1 object(s) allocated from: #0 0x49d12b in __interceptor_malloc (/home/src/util-linux/.libs/lt-mkswap+0x49d12b) #1 0x7faf2a5069c9 in __GI___strdup (/usr/lib/libc.so.6+0x819c9) #2 0xffff96e7e33 () SUMMARY: AddressSanitizer: 8 byte(s) leaked in 1 allocation(s). And another one that valgrind found. ==6316== 8 bytes in 1 blocks are definitely lost in loss record 1 of 1 ==6316== at 0x4C29F90: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==6316== by 0x5E3F9C9: strdup (in /usr/lib/libc-2.20.so) ==6316== by 0x43A25F: size_to_human_string (strutils.c:495) ==6316== by 0x42B35C: main (mkswap.c:488) Signed-off-by: Sami Kerola disk-utils/mkswap.c | 2 ++ 1 file changed, 2 insertions(+) commit 0a477d331be13f08ce70c8d1e67d58905b320379 Author: Sami Kerola Date: Sun Nov 9 21:54:27 2014 +0000 tests: mark python libmount tests known to fail with AddressSanitizer The tests fail with an error similar to this. Traceback (most recent call last): File "/home/src/util-linux/libmount/python/test_mount_tab_update.py", line 7, in import pylibmount as mnt ImportError: /home/src/util-linux/.libs/libuuid.so.1: undefined symbol: __asan_option_detect_stack_use_after_return It might be possible to build ASAN-DSO and set LD_PRELOAD, but this solution is not officially supported. See the reference for details. Reference: https://code.google.com/p/address-sanitizer/wiki/AsanAsDso Signed-off-by: Sami Kerola tests/ts/libmount/tabfiles-py | 4 ++++ tests/ts/libmount/tabfiles-tags | 4 ++++ tests/ts/libmount/tabfiles-tags-py | 4 ++++ tests/ts/libmount/update-py | 6 +++++- 4 files changed, 17 insertions(+), 1 deletion(-) commit 883b8def0a5713c5cae2c6d3f80494219dc053af Author: Sami Kerola Date: Sun Nov 9 21:22:52 2014 +0000 tests: skip kill -SEGV test when running AddressSanitizer Sending signal indicating invalid memory reference makes AddressSanitizer to report false positive test failure. Signed-off-by: Sami Kerola tests/ts/kill/name_to_number | 3 +++ 1 file changed, 3 insertions(+) commit e3c27186e86e964d1b0b6aab7e52c598c3f1ba97 Author: Sami Kerola Date: Sun Nov 9 15:26:05 2014 +0000 libmount: fix memory overflow [AddressSanitizer] ==10918==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7fffd795b680 at pc 0x0000004447c6 bp 0x7fffd795b3e0 sp 0x7fffd795ab78 WRITE of size 129 at 0x7fffd795b680 thread T0 #0 0x4447c5 in scanf_common(void*, int, bool, char const*, __va_list_tag*) (/home/src/util-linux/.libs/lt-mount+0x4447c5) #1 0x445892 in sscanf (/home/src/util-linux/.libs/lt-mount+0x445892) #2 0x7fe78709a3d3 in get_filesystems /home/src/util-linux/libmount/src/utils.c:581:7 #3 0x7fe78709a1ba in mnt_get_filesystems /home/src/util-linux/libmount/src/utils.c:622:7 #4 0x7fe7870aa78f in do_mount_by_pattern /home/src/util-linux/libmount/src/context_mount.c:833:7 #5 0x7fe7870a9534 in mnt_context_do_mount /home/src/util-linux/libmount/src/context_mount.c:951:9 #6 0x7fe7870aab2b in mnt_context_mount /home/src/util-linux/libmount/src/context_mount.c:1051:8 #7 0x4ba9f5 in main /home/src/util-linux/sys-utils/mount.c:1107:7 #8 0x7fe785caa03f in __libc_start_main (/usr/lib/libc.so.6+0x2003f) #9 0x4b9f9c in _start (/home/src/util-linux/.libs/lt-mount+0x4b9f9c) Signed-off-by: Sami Kerola Signed-off-by: Karel Zak libmount/src/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 41cd150303d5afa8b26c93f5c089e7bd8e4d9172 Author: Sami Kerola Date: Sun Nov 2 22:26:48 2014 +0000 tests: fix memory leak [AddressSanitizer] Signed-off-by: Sami Kerola lib/cpuset.c | 1 + 1 file changed, 1 insertion(+) commit 4f310faee0721d52bd9c68dac88c9169f09b5e72 Author: Sami Kerola Date: Sun Nov 2 22:06:15 2014 +0000 build-sys: make scanf_cv_alloc_modifier to work [LeakSanitizer] The tests failed with following message in config.log ERROR: LeakSanitizer: detected memory leaks Direct leak of 2 byte(s) in 1 object(s) allocated from: #0 0x49a40e in realloc (/home/src/util-linux/conftest+0x49a40e) #1 0x7fbe48633e69 in __GI__IO_vfscanf (/usr/lib/libc.so.6+0x56e69) #2 0x7fbe48649786 in _IO_vsscanf (/usr/lib/libc.so.6+0x6c786) which knocked out libmount from build, and commands depending on it. The reason this change makes sense is that AddressSanitizer seems like a good addition to set of tools that util-linux package can use, when and if needed. Reference: https://code.google.com/p/address-sanitizer/wiki/AddressSanitizer Reviewed-by: Mike Frysinger Signed-off-by: Sami Kerola configure.ac | 1 + 1 file changed, 1 insertion(+) commit 6cbf75e56ef70f2213ae0c7f025289a176ed5039 Author: Tobias Stoeckmann Date: Sun Oct 26 18:41:24 2014 +0100 lscpu: theoretical buffer overflow there is a theoretical buffer overflow possible in the hypervisor parsing code of lscpu. It would require a proc entry to return way more than expected so it's no high priority. But better be safe than sorry. At first I thought about switching to fgets but there is another code file that adds a format specifier. The diff is less intrusive that way, too. Signed-off-by: Karel Zak sys-utils/lscpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 96f7a117b3b68ec0bc94a1aa165092fc8591ee6f Author: Gabriele Giacone <1o5g4r8o@gmail.com> Date: Tue Nov 18 02:13:22 2014 +0100 libfdisk: fix partition names on GNU Hurd. libfdisk/src/utils.c | 4 ++++ 1 file changed, 4 insertions(+) commit 44374b10d1f0001cac887cf8c7d4dafca986b860 Author: Boris Egorov Date: Fri Nov 14 11:27:16 2014 +0600 libfdisk: fix get_partition_unused_primary() Was: Mentioned function returns -1 if adding of primary partition is impossible. Caller treats this value as size_t (res variable) and then compares it for negative values, totally ignoring errors. Becomes: Now function takes address to variable and fills it with partition number. Caller treats return value as int and use it appropriately. [kzak@redhat.com: - don't mix return code and partno at all] Signed-off-by: Boris Egorov Signed-off-by: Karel Zak libfdisk/src/dos.c | 50 +++++++++++++++++++++++++++----------------------- 1 file changed, 27 insertions(+), 23 deletions(-) commit 1ce1a112c434ce133cb9fb5b43bcfb033497aab3 Author: Boris Egorov Date: Wed Nov 12 21:49:01 2014 +0600 fdisk: missing break in switch Signed-off-by: Boris Egorov Signed-off-by: Karel Zak disk-utils/fdisk.c | 1 + 1 file changed, 1 insertion(+) commit ad1ac445dadc806c493c2339e634478bab5128af Author: Boris Egorov Date: Wed Nov 12 21:49:01 2014 +0600 libblkid: (nilfs) fix typo Signed-off-by: Boris Egorov Signed-off-by: Karel Zak libblkid/src/superblocks/nilfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit df48a721613f30a607d8616f5d8808d11ebfab25 Author: Benno Schulenberg Date: Sun Nov 9 20:29:26 2014 +0100 hwclock: improve wording and formatting of man page Signed-off-by: Benno Schulenberg sys-utils/hwclock.8.in | 74 +++++++++++++++++++++++++------------------------- 1 file changed, 37 insertions(+), 37 deletions(-) commit d0bdf18434bf116e2154b4895e0c3e0c815dbabf Author: Karel Zak Date: Thu Nov 13 14:37:05 2014 +0100 libfdisk: (dos) be sure that sorted EBR list is terminated Signed-off-by: Karel Zak libfdisk/src/dos.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 2248aaf98f27f5ef70b932dda37a48d8bfa0a32b Author: Karel Zak Date: Thu Nov 13 14:17:47 2014 +0100 libfdisk: fix table_add_freespace(), add debug messages Signed-off-by: Karel Zak libfdisk/src/dos.c | 2 +- libfdisk/src/table.c | 23 +++++++++++++++++++---- 2 files changed, 20 insertions(+), 5 deletions(-) commit 5c04b408505dfa60b7d129cb7f87ac6c67ec870a Author: Karel Zak Date: Thu Nov 13 12:52:03 2014 +0100 cfdisk: cleanup menuitem draw functions Signed-off-by: Karel Zak disk-utils/cfdisk.c | 74 +++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 55 insertions(+), 19 deletions(-) commit 5cb9918d595e4a512e3c6b9fcdb8450b96d228a4 Author: Karel Zak Date: Thu Nov 13 11:19:58 2014 +0100 cfdisk: remove [Load] from menu This functionality will be rarely used, so it does not make sense to waste screen space with this menu item. It's enough to provide this functionality in "Select label type" dialog (cfdisk --zero and then 'L' command). Signed-off-by: Karel Zak disk-utils/cfdisk.8 | 14 +++++++------- disk-utils/cfdisk.c | 13 ------------- disk-utils/fdisk-menu.c | 4 ++-- 3 files changed, 9 insertions(+), 22 deletions(-) commit a89eafed85874a57de4eb20dc244ce6da9f9c0c3 Author: Karel Zak Date: Wed Nov 12 16:12:39 2014 +0100 cfdisk: add support for sfdisk scripts Signed-off-by: Karel Zak disk-utils/cfdisk.8 | 13 ++++++ disk-utils/cfdisk.c | 112 +++++++++++++++++++++++++++++++++++++++++++++++- disk-utils/fdisk-menu.c | 4 +- 3 files changed, 125 insertions(+), 4 deletions(-) commit a30e4ef423c8c57d4510d6353f3b00080a7290e8 Author: Karel Zak Date: Wed Nov 12 11:15:06 2014 +0100 fdisk: add support for sfdisk scripts New commands 'I' and 'O' allows to read and write sfdisk compatible scripts by fdisk. It means that you can save your work (partition table) and later use it (in fdisk, sfdisk or cfdisk) to create a new partition table. Signed-off-by: Karel Zak disk-utils/fdisk-menu.c | 78 +++++++++++++++++++++++++++++++++++++++++++++++++ disk-utils/fdisk.8 | 13 +++++++++ 2 files changed, 91 insertions(+) commit 623732997241f1c7d0f23fba88ab79849c6794f9 Author: Karel Zak Date: Wed Nov 12 10:34:13 2014 +0100 libfdisk: fix script parser, add debug messages Signed-off-by: Karel Zak libfdisk/src/script.c | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) commit 4a4616b22e21f3c05030dc05d98016fcb15a2ee9 Author: Karel Zak Date: Mon Nov 10 14:01:09 2014 +0100 libfdisk: (gpt) don't offer first sector before the first partion The GPT first usable LBA is usually aligned to grain (1MiB), but for small (<=4MiB) devices we strictly follow sector sizes. In this case there is a small space in front of the aligned begin of the first partition. This useless space should not be offered for the next partitions. Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 32768 bytes Disklabel type: gpt Disk identifier: 041E2D54-AD0C-4C7E-A50D-363D23058D47 Device Start End Size Type /dev/sdb1 40 2087 1M Linux filesystem Command (m for help): n Partition number (2-128, default 2): First sector (34-8158, default 2088): ^^ first usable LBA is 34, but first aligned (recommended) LBA is 40, we use it for the first partition. All this is correct, but the space before the first partition should be ignored. Fixed version: Command (m for help): n Partition number (2-128, default 2): First sector (2088-8158, default 2088): ^^^^ Note this problem does not exist for "normal" (large) devices where first usable LBA is aligned to grain. Reported-by: Boaz Harrosh Signed-off-by: Karel Zak libfdisk/src/gpt.c | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) commit 8ccfcf70dad4e005d6fe05cd5ed99524a775f15d Author: Karel Zak Date: Mon Nov 10 12:22:55 2014 +0100 libfdisk: (gpt) make mode more readable * use check_ prefix for checking functions * use plural in function names where we work with more partitions than one * always use "ents" when when we work with gpt entries array Signed-off-by: Karel Zak libfdisk/src/gpt.c | 82 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 43 insertions(+), 39 deletions(-) commit a56b70f8ffb658a5a722c47cf77ea04c143fa0d9 Author: Samuel Thibault Date: Sun Nov 9 03:19:01 2014 +0100 libfdisk: fdisk_read_firstsector should seek to offset 0 The current offset of cxt->dev_fd may not be still 0, notably when blkdev_get_size has to resort to using blkdev_find_size Signed-off-by: Samuel Thibault Date: Mon Nov 10 11:46:46 2014 +0100 tests: simplify and update swaplabel test Signed-off-by: Karel Zak tests/expected/misc/swaplabel | 4 ++-- tests/ts/misc/swaplabel | 8 ++------ 2 files changed, 4 insertions(+), 8 deletions(-) commit 64d0cee6c00abb3efa89d53879c0bba15f7eb805 Author: Karel Zak Date: Mon Nov 10 11:29:42 2014 +0100 include/statfs_magic: use macro rather than type for f_type Signed-off-by: Karel Zak include/statfs_magic.h | 4 ++-- sys-utils/switch_root.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 9a83b03c7307715b45b143f203f9bf8b0bcf7a5d Author: Karel Zak Date: Fri Nov 7 14:03:35 2014 +0100 mkswap: make final report more human readable Signed-off-by: Karel Zak disk-utils/mkswap.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 3ba01c145c861e5e0a94b5fc85f284f3d7b87285 Author: Karel Zak Date: Fri Nov 7 13:55:37 2014 +0100 mkswap: device write code refactoring Signed-off-by: Karel Zak disk-utils/mkswap.c | 39 ++++++++++++++++++++++++++------------- 1 file changed, 26 insertions(+), 13 deletions(-) commit fabf29f4fe41ab65e43e3254b4db9f191b95f5ac Author: Karel Zak Date: Fri Nov 7 13:46:42 2014 +0100 mkswap: device open code refactoring Signed-off-by: Karel Zak disk-utils/mkswap.c | 93 ++++++++++++++++++++++++++++------------------------- 1 file changed, 50 insertions(+), 43 deletions(-) commit 99f78758aadd91147bbc4d62f76fddb412d6063e Author: Karel Zak Date: Fri Nov 7 13:35:50 2014 +0100 mkswap: always use header from control struct Signed-off-by: Karel Zak disk-utils/mkswap.c | 58 +++++++++++++++++++++++++++++++++++------------------ 1 file changed, 39 insertions(+), 19 deletions(-) commit 8591859cd7a0ceb479375f5f56d25e12479adbd3 Author: Karel Zak Date: Fri Nov 7 13:25:11 2014 +0100 mkswap: coding style improvements Signed-off-by: Karel Zak disk-utils/mkswap.c | 97 +++++++++++++++++++++-------------------------------- 1 file changed, 39 insertions(+), 58 deletions(-) commit f4cae17663bb1b603ea244748f3dbe0ba1ad746b Author: Benno Schulenberg Date: Mon Nov 3 22:17:17 2014 +0100 swapon: reword some usage strings Also remove some inconsistent periods and properly punctuate the closing sentence. Signed-off-by: Benno Schulenberg sys-utils/swapon.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 24930e7088f878cf2aba5e7337e6485c028f4a1e Author: Benno Schulenberg Date: Mon Nov 3 22:17:16 2014 +0100 docs: fix some wording, grammar and formatting in man page of swapon Signed-off-by: Benno Schulenberg disk-utils/fsck.8 | 2 +- sys-utils/swapon.8 | 26 +++++++++++++------------- 2 files changed, 14 insertions(+), 14 deletions(-) commit d68f402c5406edf2b5680b1fa716835f947e0947 Author: Sami Kerola Date: Sun Nov 2 20:26:31 2014 +0000 mkswap: various minor improvement Use correct data type in page_bad(), and add information to error message how many bad pages were seen. In check_blocks() move initialization to variable introduction, fix typo, and avoid memset() when array initializer can do the job. In main() use correct initializer for pointer. Move swap file specific actions to same location, and add warning when request too --check is dismissed by command. At the end remove momory leak. Signed-off-by: Sami Kerola disk-utils/mkswap.c | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) commit 076ba5a6967d8509da25e0a426ea65ac3f61473e Author: Sami Kerola Date: Sun Nov 2 20:26:30 2014 +0000 mkswap: set variable only when it's value is known Avoid updating ctl->pagesize twice when user does specify page size. Signed-off-by: Sami Kerola disk-utils/mkswap.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) commit 6af18227525923e5f2c5dc32da996ec165607891 Author: Sami Kerola Date: Sun Nov 2 20:26:29 2014 +0000 mkswap: make remaining functions to take control structure as argument The wipe_device() and new_prober(). Signed-off-by: Sami Kerola disk-utils/mkswap.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit de3822c39c298b3a0e91abf6329d5aaef176b37a Author: Sami Kerola Date: Sun Nov 2 20:26:28 2014 +0000 mkswap: add struct mkswap_control to remove global variables Signed-off-by: Sami Kerola disk-utils/mkswap.c | 229 ++++++++++++++++++++++++++-------------------------- 1 file changed, 115 insertions(+), 114 deletions(-) commit 3d5c8ba1c9f0e2eada689204bc8e2d429611b0c9 Author: Sami Kerola Date: Sun Nov 2 20:26:27 2014 +0000 mkswap: use err() rather than perror() && exit() The messsages in err() are verified from po/util-linux.pot to be already part of translations. Signed-off-by: Sami Kerola disk-utils/mkswap.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) commit c181617cfbe9e442b66de35fd45ffffc0c85500a Author: Sami Kerola Date: Sun Nov 2 20:26:26 2014 +0000 mkswap: remove unnecessary size check Signed-off-by: Sami Kerola disk-utils/mkswap.c | 6 ------ include/swapheader.h | 2 -- 2 files changed, 8 deletions(-) commit a1466ab2b25189e2102f37d3ffe8d2dd1c7bc3e8 Author: Sami Kerola Date: Sun Nov 2 20:26:25 2014 +0000 mkswap: remove system architecture specific max swap size checks Since kernel version 2.3.4 (June 1999) all architectures has used uint32_t as maximum number or pages in a swap device or file, there is no longer need to support systems earlier than that. Signed-off-by: Sami Kerola disk-utils/mkswap.c | 140 ++-------------------------------------------------- 1 file changed, 3 insertions(+), 137 deletions(-) commit b549e9410437425a7c9f379d03dc333fc13c2864 Author: Karel Zak Date: Fri Nov 7 12:29:17 2014 +0100 tests: update fdisk tests Signed-off-by: Karel Zak tests/expected/fdisk/bsd | 2 ++ tests/expected/fdisk/mbr-dos-mode | 2 ++ tests/expected/fdisk/mbr-nondos-mode | 3 +++ tests/expected/fdisk/mbr-sort | 2 ++ tests/expected/sfdisk/dos-explicit-size | 8 ++++++++ tests/expected/sfdisk/dos-read-dump | 3 +++ tests/expected/sfdisk/gpt-list-pmbr | 2 ++ 7 files changed, 22 insertions(+) commit 52f2fd9bcc9bbc2a0234114f11870d943de76652 Author: Karel Zak Date: Fri Nov 7 12:08:11 2014 +0100 swapoff: swapoff swap files by LABEL and UUID # swapon --show=NAME,UUID NAME UUID /dev/sda3 8d52fca3-bf48-41d6-b826-2315e518a305 /home/fs-images/2g.img 6fa72b96-b802-441f-a31c-091d65c0212c # swapoff UUID=6fa72b96-b802-441f-a31c-091d65c0212c swapoff: cannot find the device for UUID=6fa72b96-b802-441f-a31c-091d65c0212c Reported-by: Sami Kerola Signed-off-by: Karel Zak sys-utils/Makemodule.am | 13 +++++++-- sys-utils/swapoff.c | 74 +++++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 73 insertions(+), 14 deletions(-) commit c747564764e612cbdd225701e67f0516fa3c66d4 Author: Karel Zak Date: Fri Nov 7 10:42:49 2014 +0100 fdisk: fix and improve -l warnings Signed-off-by: Karel Zak disk-utils/fdisk-list.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit d5206b9667f4fa5fb0b4b0d56c5f1927aaf74b8f Author: Karel Zak Date: Fri Nov 7 09:33:57 2014 +0100 sfdisk: fix version typos in man page Reported-by: JWP Signed-off-by: Karel Zak disk-utils/sfdisk.8 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 8f806bb1ea30f15db7ca36d1cfa79349f8115302 Author: Karel Zak Date: Thu Nov 6 12:50:27 2014 +0100 switch_root: improve statfs->f_type portability __SWORD_TYPE is not available everywhere, for example it's not defined by musl libc. It also seems that __SWORD_TYPE is not used for f_type on some architectures (s390x). Reported-by: Natanael Copa Signed-off-by: Karel Zak include/statfs_magic.h | 11 +++++++++++ sys-utils/switch_root.c | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) commit 9cf4f909110d9d230486ee335918615bab6065da Author: Karel Zak Date: Tue Nov 4 15:36:05 2014 +0100 lib/loopdev: remove test program All is already covered by losetup and mount. The test program has never been used in our regression tests. Signed-off-by: Karel Zak lib/Makemodule.am | 5 -- lib/loopdev.c | 149 ------------------------------------------------------ 2 files changed, 154 deletions(-) commit 0bf037402a444dfa2156218de53cf8c2277a5490 Author: Karel Zak Date: Tue Nov 4 14:08:45 2014 +0100 lib/loopdev: replace custom DBG() with include/debug.h Signed-off-by: Karel Zak include/loopdev.h | 2 - lib/loopdev.c | 190 +++++++++++++++++++---------------------- libmount/src/context_loopdev.c | 2 - sys-utils/losetup.8 | 3 + sys-utils/mount.8 | 2 + 5 files changed, 93 insertions(+), 106 deletions(-) commit 74d70957b4f92a27c9057cba75eac1afea0e020d Author: Karel Zak Date: Mon Nov 3 13:54:40 2014 +0100 tests: cleanup libmount debug test Signed-off-by: Karel Zak libmount/src/init.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 68e422ecae151d0e382fcb8a81d8d9c37d977a0b Author: Karel Zak Date: Mon Nov 3 13:13:54 2014 +0100 docs: update info about env debug variables Signed-off-by: Karel Zak Documentation/howto-debug.txt | 6 ++++-- disk-utils/cfdisk.8 | 8 ++++++++ disk-utils/fdisk.8 | 7 ++++++- disk-utils/fsck.8 | 8 ++++---- disk-utils/mkswap.8 | 4 ++-- disk-utils/partx.8 | 4 ++-- disk-utils/sfdisk.8 | 8 ++++++++ disk-utils/swaplabel.8 | 4 ++-- lib/terminal-colors.d.5 | 3 ++- misc-utils/blkid.8 | 2 +- misc-utils/findfs.8 | 4 ++-- misc-utils/findmnt.8 | 6 ++++-- misc-utils/lsblk.8 | 7 ++++++- misc-utils/wipefs.8 | 3 ++- sys-utils/mount.8 | 10 ++++++---- sys-utils/mountpoint.1 | 4 ++-- sys-utils/swapon.8 | 2 ++ sys-utils/umount.8 | 8 ++++---- 18 files changed, 67 insertions(+), 31 deletions(-) commit 4dcea3206121b430e5e8a3c5a808bd358a11d0b6 Author: Karel Zak Date: Mon Nov 3 13:13:32 2014 +0100 libfdisk: clean up debug, add help debug mask Signed-off-by: Karel Zak libfdisk/src/fdiskP.h | 26 +++++++++++++------------- libfdisk/src/init.c | 36 ++++++++++++++++++++++++------------ 2 files changed, 37 insertions(+), 25 deletions(-) commit 2deb7cc34725cc1e67072da9bb63fbea0ebc64ba Author: Karel Zak Date: Mon Nov 3 13:13:22 2014 +0100 libsmartcols: clean up debug, add help debug mask Signed-off-by: Karel Zak libsmartcols/src/init.c | 29 +++++++++++++++++++---------- libsmartcols/src/smartcolsP.h | 1 + 2 files changed, 20 insertions(+), 10 deletions(-) commit 3533341614bc42282df4eb6104d2e212e74660fc Author: Karel Zak Date: Mon Nov 3 13:13:12 2014 +0100 libmount: clean up debug, add help debug mask Signed-off-by: Karel Zak libmount/src/init.c | 33 ++++++++++++++++++++------------- libmount/src/mountP.h | 10 +++++----- 2 files changed, 25 insertions(+), 18 deletions(-) commit b7da851e5a022937ea4d8b777da5551f7e3a2966 Author: Karel Zak Date: Mon Nov 3 13:12:20 2014 +0100 libblkid: clean up debug, add "help" debug mask Signed-off-by: Karel Zak libblkid/src/blkidP.h | 32 ++++++++++++++++---------------- libblkid/src/init.c | 40 +++++++++++++++++++++++----------------- libblkid/src/resolve.c | 4 ++-- 3 files changed, 41 insertions(+), 35 deletions(-) commit ef316a27de3537098bf3ee2657542bb0ea682847 Author: Karel Zak Date: Mon Nov 3 12:51:17 2014 +0100 include/debug: improve and cleanup * use ul_debug_ prefix for all routines * support _DEBUG=all also for programs without debug mask names (so we can avoid 0xffff mask in man pages) * add function to print debug help Signed-off-by: Karel Zak include/debug.h | 87 ++++++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 70 insertions(+), 17 deletions(-) commit 03b5e5975ac6f02ce55ceaa6ad4b010c0abc0ff8 Author: Karel Zak Date: Mon Nov 3 10:11:58 2014 +0100 swapon: improve man page notes about holes Signed-off-by: Karel Zak sys-utils/swapon.8 | 48 ++++++++++++++++++++++++++++++++---------------- 1 file changed, 32 insertions(+), 16 deletions(-) commit 54f2e4563d6c7064df9f2a201ffe928709c29333 Author: Karel Zak Date: Fri Oct 31 10:58:27 2014 +0100 swapon: remove extra word from usage Reported-by: Benno Schulenberg Signed-off-by: Karel Zak sys-utils/swapon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 169b85c9f22091431823f4b9d013b2c436cb07fb Author: Bernhard Voelker Date: Fri Oct 31 08:22:00 2014 +0100 findmnt: document --uniq option in man page * misc-utils/findmnt.8: Add an entry for the -U, --uniq option added in commit v2.24-132-gbebdda3. misc-utils/findmnt.8 | 4 ++++ 1 file changed, 4 insertions(+) commit 7235e70391a80d2c9284552bafcb6385adfaff06 Author: Natanael Copa Date: Wed Oct 29 09:04:27 2014 +0000 hexdump: use 'll' format modifier instead of the non-standard 'q'. The printf(3) man page says about 'q': ("quad". 4.4BSD and Linux libc5 only. Don't use.) This is a synonym for ll. This fixes hexdump with musl libc. Signed-off-by: Natanael Copa text-utils/hexdump-parse.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 72a2a3f5d7cb56e0054b69f54bfc86e9e4a4ced9 Author: Mike Frysinger Date: Wed Oct 29 00:19:03 2014 -0400 libmount: improve kernel command line parsing The current command line parser will stop at the first occurrence of an option, however the kernel does the opposite. So if you have: root=/dev/sda1 root=/dev/sda2 When you look for "root", the kernel will use /dev/sda2, but util-linux uses /dev/sda1. Further, if args are passed to custom init programs, the parser will pick those up as kernel options. So if you have: root=/dev/sda1 -- /foo bar=yes The kernel will stop at the "--" and pass the rest to userland. But if you look for "bar", util-linux will incorrectly return "yes". Ultimately, there's no way for util-linux to exactly parse the command line the same way as the kernel -- we don't know exactly which ones the kernel picks up and which it passes on to userland (either as env vars or as command line args). The kernel passes all unrecognized options. These updates are simple best effort. URL: https://bugs.gentoo.org/526754 Signed-off-by: Mike Frysinger libmount/src/utils.c | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) commit 6ee8e19489ca2523aca65ab935af5efb90b50930 Author: Benno Schulenberg Date: Mon Oct 27 22:18:12 2014 +0100 textual: slice up the usage text of swapon for ease of translation A new option was added recently; seize this opportunity to cut the usage text into small and easily managed chunks. Signed-off-by: Benno Schulenberg sys-utils/swapon.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit b1301d78651fdf1ac072645a4bb3b06ad60f6df2 Author: Benno Schulenberg Date: Mon Oct 27 22:18:11 2014 +0100 docs: fix some wording and formatting in man page of swapon Signed-off-by: Benno Schulenberg sys-utils/swapon.8 | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 2e6f289a4ecf02048c3e46a6201f184442ddc4c6 Author: Benno Schulenberg Date: Mon Oct 27 22:18:10 2014 +0100 docs: spelling, wording, and grammar fixes in the man page of whereis Signed-off-by: Benno Schulenberg misc-utils/whereis.1 | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) commit e3da3b39b5deb72bcff51cc146334ff117588aac Author: Sami Kerola Date: Sun Oct 26 22:07:09 2014 +0000 bash-completion: use swapon label and uuid listing support Simplifies the script, and makes swapoff to work for files when get requests by label or uuid. Signed-off-by: Sami Kerola bash-completion/swapoff | 22 +++------------------- bash-completion/swapon | 2 +- 2 files changed, 4 insertions(+), 20 deletions(-) commit 53154dae39cd16924c97754589ed5396a91946bd Author: Sami Kerola Date: Sun Oct 26 22:07:08 2014 +0000 bash-completion: stop being clever when listing block devices Various commands such as blkid, cfdisk, fdisk, delpart, and so on listed only partitions and missed for example disks and volume groups. The right thing to do is to list all block devices in all for all commands performing operations with them. This might occasionally list unexpected devices that I think is lesser bad than missing some. Addresses: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=764488 Signed-off-by: Sami Kerola bash-completion/addpart | 4 +--- bash-completion/blkdiscard | 4 +--- bash-completion/blkid | 6 +----- bash-completion/blockdev | 2 +- bash-completion/cfdisk | 6 +----- bash-completion/delpart | 6 +----- bash-completion/fdisk | 12 ++---------- bash-completion/fsck | 3 +-- bash-completion/fsck.minix | 3 +-- bash-completion/lsblk | 3 +-- bash-completion/mkfs | 3 +-- bash-completion/mkfs.bfs | 3 +-- bash-completion/mkfs.minix | 3 +-- bash-completion/partx | 6 +----- bash-completion/resizepart | 6 +----- bash-completion/sfdisk | 6 +----- bash-completion/wipefs | 4 +--- 17 files changed, 18 insertions(+), 62 deletions(-) commit b35c37274c93745fd8d7a05d02a85fbde8110ab0 Author: Sami Kerola Date: Sun Oct 26 22:07:07 2014 +0000 fstrim: initialize path variable Reading the code this initialization is not necessary, so the change is mostly about silencing a compiler warning and ensuring the program keeps on working if there is a future bug that could make uninitialized 'path' reachable to use. sys-utils/fstrim.c:247: warning: 'path' may be used uninitialized in this function Signed-off-by: Sami Kerola sys-utils/fstrim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5d36513976e30d4f38a52818b603526b1f8b164d Author: Sami Kerola Date: Sun Oct 26 22:07:06 2014 +0000 sfdisk: return deterministic value from sfdisk_deinit() disk-utils/sfdisk.c:222:9: warning: variable 'rc' is uninitialized when used here [-Wuninitialized] return rc; disk-utils/sfdisk.c:208:8: note: initialize the variable 'rc' to silence this warning int rc; Signed-off-by: Sami Kerola disk-utils/sfdisk.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 346dc42381aa035d404ae8c3faa4734ab64f828f Author: Mike Frysinger Date: Fri Oct 24 12:26:12 2014 -0400 bash-completion: fix runuser install The runuser symlink used to depend on su being enabled, but a refactoring broke that. So if you build with runuser enabled but not su, you end up with a broken symlink. Rework the logic so it works in both cases. Signed-off-by: Mike Frysinger bash-completion/Makemodule.am | 4 ++++ 1 file changed, 4 insertions(+) commit 8fc4a88630ac5c89c143f607c3ca719172163924 Author: Karel Zak Date: Mon Oct 27 11:05:06 2014 +0100 build-sys: properly check for -lrt Signed-off-by: Karel Zak configure.ac | 10 ++++++++++ include/boottime.h | 2 +- login-utils/Makemodule.am | 2 +- sys-utils/Makemodule.am | 4 ++-- 4 files changed, 14 insertions(+), 4 deletions(-) commit c0dedab013e1e69159a0c98690e0bd97821a46f2 Author: Karel Zak Date: Mon Oct 27 10:47:32 2014 +0100 build-sys: old glibc requires -lrt clock_gettime() Signed-off-by: Karel Zak sys-utils/Makemodule.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4f55368cc5c458f2cef32bce6984b59157cb654e Author: Karel Zak Date: Mon Oct 27 10:00:19 2014 +0100 blkdiscard: fix includes Signed-off-by: Karel Zak sys-utils/blkdiscard.c | 2 ++ 1 file changed, 2 insertions(+) commit 8f59654a4066d64bad7b23f6ddcc7b709d012d18 Author: Karel Zak Date: Mon Oct 27 09:42:51 2014 +0100 blkdiscard: update man page Signed-off-by: Karel Zak sys-utils/blkdiscard.8 | 5 +++++ 1 file changed, 5 insertions(+) commit c472a7e35ae40652bdcf66c08a23bd50d48d1884 Author: Federico Simoncelli Date: Fri Oct 24 15:13:55 2014 +0000 blkdiscard: add support for steps and progress Signed-off-by: Federico Simoncelli sys-utils/blkdiscard.c | 57 ++++++++++++++++++++++++++++++--------- tests/expected/blkdiscard/offsets | 23 ++++++++++++++++ tests/ts/blkdiscard/offsets | 27 +++++++++++++++++++ 3 files changed, 94 insertions(+), 13 deletions(-) commit d7ce9acb338f70e65712e1edfd34c13207a33d05 Author: Federico Simoncelli Date: Fri Oct 24 15:13:54 2014 +0000 blkdiscard: fail on sector misalignment sys-utils/blkdiscard.c | 12 +++++++++--- tests/expected/blkdiscard/offsets | 12 ++++++------ 2 files changed, 15 insertions(+), 9 deletions(-) commit f4822fdfc5c129b2dbb6c439f5bc2fd63e1e3a79 Author: Federico Simoncelli Date: Fri Oct 24 15:13:53 2014 +0000 tests: add blkdiscard offsets test Signed-off-by: Federico Simoncelli tests/commands.sh | 1 + tests/expected/blkdiscard/offsets | 16 ++++++++++ tests/ts/blkdiscard/offsets | 62 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 79 insertions(+) commit 819d9a2975de6869f2ae12d551881bb9b732f2e4 Author: Karel Zak Date: Fri Oct 24 11:19:23 2014 +0200 include/debug: fix typo Signed-off-by: Karel Zak disk-utils/cfdisk.c | 2 +- disk-utils/fdisk.c | 2 +- disk-utils/sfdisk.c | 2 +- include/debug.h | 2 +- lib/colors.c | 2 +- libblkid/src/init.c | 2 +- libfdisk/src/init.c | 2 +- libmount/src/init.c | 2 +- misc-utils/whereis.c | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) commit 16714abef2087ee324d8773c0d83def2ec95e5e3 Author: Karel Zak Date: Thu Oct 23 14:43:31 2014 +0200 blkid: remove extra trailing spaces in output $ blkid | egrep -i 'sda.*label' | cat -A /dev/sda2: UUID="8382f307-fb43-489f-ab38-8d4cf37ca88c" SEC_TYPE="ext2" TYPE="ext3" LABEL="test" $ /dev/sda5: UUID="0b46d673-8c23-4709-b92c-3fdf460e1dd4" TYPE="ext3" LABEL="rescue" SEC_TYPE="ext2" $ /dev/sda6: UUID="cb9d814f-d885-435b-8e6d-ac17c0ac5aa1" TYPE="ext3" LABEL="root" $ /dev/sda8: UUID="1e2851bd-cc6f-4d72-bf9f-c6fa754155b1" TYPE="ext3" LABEL="data" SEC_TYPE="ext2" $ /dev/sda9: UUID="d16a2f42-9a50-4489-a788-8624c832a7f3" TYPE="ext3" LABEL="storage" SEC_TYPE="ext2" $ /dev/sda7: TYPE="swap" LABEL="swap" UUID="8393acfa-d4bd-40fc-8eb9-5ccd8d85e103" $ Addresses: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=586179 Signed-off-by: Karel Zak misc-utils/blkid.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit f4802c901134c56718e0c47308536c7eb2d552ae Author: Karel Zak Date: Thu Oct 23 14:29:45 2014 +0200 whereis: reset search mask more carefully # whereis -m cal -M /usr/share/man/man1/ -f ls cal: /usr/share/man/man1/cal.1.gz /usr/share/man/man1p/cal.1p.gz ls: /usr/bin/ls /usr/share/man/man1/ls.1.gz the -M also resets the search mask, so for 'ls' it returns also binaries. That's bug. Expected result is: # ./whereis -m cal -M /usr/share/man/man1/ -f ls cal: /usr/share/man/man1/cal.1.gz /usr/share/man/man1p/cal.1p.gz ls: /usr/share/man/man1/ls.1.gz the search mask has to be sensitive only to -b -m -s options, otherwise the semantic is pretty messy. Signed-off-by: Karel Zak misc-utils/whereis.1 | 27 ++++++++++++++++++++++++--- misc-utils/whereis.c | 35 +++++++++++++++++++++-------------- 2 files changed, 45 insertions(+), 17 deletions(-) commit 3635f53ca2587bea133d3f56022ef42c88797f97 Author: Karel Zak Date: Thu Oct 23 13:44:00 2014 +0200 whereis: cleanup debug stuff, fix argv[] usage * use debug stuff from include/debug.h and make whereis(1) sensitive to WHEREIS_DEBUG=0xffff mask * fix problem with argv[] usage # whereis -b -m -M /usr/share/man/man1 -B /usr/bin -f gcc bin: /usr/local/bin gcc: /usr/bin/gcc /usr/lib/gcc /usr/libexec/gcc /usr/share/man/man1/gcc.1.gz the code ignores "-B" and /usr/bin is interpreted as search pattern, expected result is: # whereis -b -m -M /usr/share/man/man1 -B /usr/bin -f gcc gcc: /usr/share/man/man1/gcc.1.gz /usr/bin/gcc Addresses: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=765306 Signed-off-by: Karel Zak include/debug.h | 2 +- misc-utils/whereis.c | 107 +++++++++++++++++++++++++++++++++++---------------- 2 files changed, 75 insertions(+), 34 deletions(-) commit fd211531e8b079380c3b041a4768005b63c42d78 Author: Karel Zak Date: Thu Oct 23 12:03:31 2014 +0200 fdisk: add section about sizes to the man page Addresses: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=594005 Signed-off-by: Karel Zak disk-utils/fdisk.8 | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 2ceaf42a2d3dd6b529c0f720bec99fece6de2403 Author: Karel Zak Date: Thu Oct 23 11:35:18 2014 +0200 docs: remove obsolete READMEs for (s)fdisk Documentation/fdisk.txt | 581 ----------------------------------------------- Documentation/sfdisk.txt | 264 --------------------- 2 files changed, 845 deletions(-) commit b73cc3902bbc9ae48fc704d16fc79b3687e31f50 Author: Karel Zak Date: Wed Oct 22 17:25:19 2014 +0200 terminal-colors.d: add debug stuff Signed-off-by: Karel Zak lib/colors.c | 72 ++++++++++++++++++++++++++++++++++++++++--------- lib/terminal-colors.d.5 | 3 +++ 2 files changed, 63 insertions(+), 12 deletions(-) commit eb728f96aaab659f30b240eccf98ebb175208b30 Author: Karel Zak Date: Wed Oct 22 16:36:55 2014 +0200 terminal-colors.d: fix filter by name Addresses: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=766077 Signed-off-by: Karel Zak lib/colors.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 65c3359633b3aa39efe59015b217a511eed409c6 Author: Karel Zak Date: Wed Oct 22 10:34:09 2014 +0200 docs: update TODO file Signed-off-by: Karel Zak Documentation/TODO | 8 -------- 1 file changed, 8 deletions(-) commit 04c107ebeb509d664ea18270fe186513dc04fc1b Author: Karel Zak Date: Tue Oct 21 14:24:00 2014 +0200 docs: update TODO file Signed-off-by: Karel Zak Documentation/TODO | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit bbb4c273e9b97268ed07520a203d887a2cb15044 Author: J William Piggott Date: Mon Oct 20 15:22:24 2014 -0400 hwclock: Reduce drift factor update period To facilitate the calculation of 'cold' vs 'warm' Hardware Clock drift factor the limit on the update period needs to be less than 8 hours. 4 hours should be enough drift to allow calculations that are not grossly out of range. For example, with a workstation that is shutdown every night the cold drift factor can be significantly different than a drift factor based on a 24 hour period. Signed-off-by: J William Piggott sys-utils/hwclock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 66af1c0f449645658fb66ca9f6473fe910eec753 Author: J William Piggott Date: Mon Oct 20 14:48:07 2014 -0400 hwclock: fix superfluous 'if' statement and typo Signed-off-by: J William Piggott sys-utils/hwclock.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 5cb71d2bcad3374a8357ac43c7bd8bde60351c15 Author: J William Piggott Date: Mon Oct 20 14:07:27 2014 -0400 hwclock: adjust wording of v2.26 notes Signed-off-by: J William Piggott sys-utils/hwclock.8.in | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit f0f2be20eda68f1aaceeed4df602940e03627ba1 Author: Sami Kerola Date: Wed Oct 15 22:19:28 2014 +0100 sfdisk: fix compiler warnings about uninitialized variables warning: 'str' may be used uninitialized in this function [-Wmaybe-uninitialized] Signed-off-by: Sami Kerola disk-utils/sfdisk.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d07b223788739d07badaa635a34d9d48aa8e14c8 Author: Sami Kerola Date: Wed Oct 15 22:19:27 2014 +0100 ul: fix filter() indentation Content of the while() loop missed one indentation step. Signed-off-by: Sami Kerola text-utils/ul.c | 160 ++++++++++++++++++++++++++------------------------------ 1 file changed, 75 insertions(+), 85 deletions(-) commit d8c1fc7ac4ffd8f2d9bdc652312fde020b825a8b Author: Sami Kerola Date: Wed Oct 15 22:19:26 2014 +0100 setterm: fix dubious one-bit signed bitfield [smatch scan] term-utils/setterm.c:165:24: error: dubious one-bit signed bitfield Signed-off-by: Sami Kerola term-utils/setterm.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 6f7f155c0c73702457218e8fa8d08e88ea55b85f Author: Sami Kerola Date: Wed Oct 15 22:19:25 2014 +0100 eject: move unreachable code to preprocessor #else block [smatch scan] eject.c:466 toggle_tray() info: ignoring unreachable code. Signed-off-by: Sami Kerola sys-utils/eject.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 732ac3a52a25be71d6dd963b6ec53455b0acb906 Author: Karel Zak Date: Mon Oct 20 14:01:25 2014 +0200 hwclock: add notes about default behavior changes Signed-off-by: Karel Zak sys-utils/hwclock.8.in | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit fc56c36368287714608ebbefd92f1d66bee37f71 Author: Karel Zak Date: Mon Oct 20 13:31:36 2014 +0200 hwclock: cleanup man and usage() Signed-off-by: Karel Zak sys-utils/hwclock.8.in | 36 ++++++++++++++++++------------------ sys-utils/hwclock.c | 7 ++++--- 2 files changed, 22 insertions(+), 21 deletions(-) commit e2c1eb9913e9479c7d7009f5f46404fd9c4180f5 Merge: e07fdac cd95027 Author: Karel Zak Date: Mon Oct 20 11:41:38 2014 +0200 Merge branch 'master' of https://github.com/jwpi/util-linux into hwclock commit e07fdac476cb1c52962ec82a1b12c6afc111bd08 Author: Karel Zak Date: Mon Oct 20 10:59:08 2014 +0200 swapon: add -o for compatibility with mount The new option allows to specify swap options by fstab compatible string. The concept is the same as for mount(8). swapon -o pri=1,discard=pages,nofail /dev/sda2 The advantage is that tools (like systmed) that parses fstab can call swapon without translation from fstab options to swapon(8) command line options. Signed-off-by: Karel Zak sys-utils/swapon.8 | 18 ++++++++--- sys-utils/swapon.c | 89 +++++++++++++++++++++++++++++++++++++++++------------- 2 files changed, 82 insertions(+), 25 deletions(-) commit ba986e815c36d733724ce5fa9914a2c9ac4f7432 Author: Karel Zak Date: Fri Oct 17 08:52:00 2014 +0200 mount: don't ignore mtab for --bind -o remount Reported-by: Phillip Susi Signed-off-by: Karel Zak sys-utils/mount.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 7190b9b2ce6cb6fde249005fa46c3819263ba296 Author: Karel Zak Date: Thu Oct 16 13:15:06 2014 +0200 libfdisk: add more comments Signed-off-by: Karel Zak libfdisk/src/alignment.c | 70 +++++++++++++++++++++++++------ libfdisk/src/context.c | 107 +++++++++++++++++++++++++++++------------------ libfdisk/src/fdiskP.h | 1 - libfdisk/src/libfdisk.h | 2 +- 4 files changed, 126 insertions(+), 54 deletions(-) commit cd950279f19f2c685047705d4cc1820cc1566769 Author: J William Piggott Date: Wed Oct 15 16:14:37 2014 -0400 hwclock: Add --update-drift option MAN Update hwclock man page for the hwclock: Add --update-drift option patch. Signed-off-by: J William Piggott sys-utils/hwclock.8.in | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) commit f276d71a3ef6a65299deb5e14a188e0a786ecebd Author: J William Piggott Date: Wed Oct 15 15:48:17 2014 -0400 hwclock: Add --update-drift option There are cases where we need to refresh the timestamps in the adjtime file without updating the drift factor. For example, with ntpd and an Eleven Minute Mode kernel, we need to call systohc at shutdown to facilitate drift correction. With the current behavior hwclock will clobber the drift factor to near zero, because the Hardware Clock and System Clock are synced by Eleven Minute Mode. What actually needs to be done is refresh the adjtime file timestamps and not calculate a new drift factor. Because it is a manual process to craft a good Hardware Clock drift factor, that is, there is no automated method that will produce a good drift factor, this patch changes the default drift calculation behavior to off, and it is turned on by using the --update-drift option. Once we have a good drift factor for a given machine we do not want anything clobbering it, including an administrator forgetting to turn off recalculation. A system administrator should make a concious effort in telling hwclock with the --update-drift option that (s)he wants to recalculate the drift factor. Without using the --update-drift option with calibrate operations only the timestamps are refreshed in the adjtime file. With the --update-drift option the old default behavior of refreshing the timestamps and updating the drift factor is performed. Signed-off-by: J William Piggott sys-utils/hwclock.c | 56 +++++++++++++++++++++++++++++++++-------------------- 1 file changed, 35 insertions(+), 21 deletions(-) commit 8db424dcbcd9dde3c1ed6b3027e8e98b9fda3d21 Author: J William Piggott Date: Thu Sep 25 10:31:54 2014 -0400 hwclock: persistent_clock_is_local MAN Update hwclock man page for the hwclock: persistent_clock_is_local patch. Signed-off-by: J William Piggott sys-utils/hwclock.8.in | 63 ++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 48 insertions(+), 15 deletions(-) commit d17a12a3685945e7d5579db491543d223618d060 Author: J William Piggott Date: Thu Sep 25 07:38:25 2014 -0400 hwclock: persistent_clock_is_local When hctosys is used at boot time, making it the first caller of settimeofday, the responsibility of setting persistent_clock_is_local is thrust upon it. Currently hctosys always leaves this variable uninitialized. This causes a Hardware Clock configured to use the local timescale to be clobbered with the UTC timescale by the kernel's NTP eleven minute mode. This patch fixes this hctosys bug, by having it properly set persistent_clock_is_local according to the time scale configured for the Hardware Clock. It does this via the kernel warp_clock function but this in inconsequential, because we set the system time immediately afterward. Signed-off-by: J William Piggott sys-utils/hwclock.c | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) commit cb7efbc12de4bd9468344875af7b17cc19adcc50 Author: J William Piggott Date: Wed Oct 15 14:37:08 2014 -0400 hwclock: hctosys drift compensation II MAN Update hwclock man page for the hwclock: hctosys drift compensation II patch. Signed-off-by: J William Piggott sys-utils/hwclock.8.in | 50 +++++++++++++++++++++++++++++++++----------------- 1 file changed, 33 insertions(+), 17 deletions(-) commit ede32597f5de3c51321ae86b96e6789c6eca5d8f Author: J William Piggott Date: Wed Oct 15 14:32:31 2014 -0400 hwclock: hctosys drift compensation II COMMENTS Update source comments and --help output for the hwclock: hctosys drift compensation II patch. Signed-off-by: J William Piggott sys-utils/hwclock.c | 59 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 33 insertions(+), 26 deletions(-) commit 2794995ad94f35b19284636224f1cfb9dca046a4 Author: J William Piggott Date: Wed Oct 15 14:21:13 2014 -0400 hwclock: hctosys drift compensation II Allowing hctosys to drift compensate facilitates: More precise setting of the System Clock early in the boot process when --adjust cannot be used because the file system is not writeable. Applies sub second drift corrections immediately, where as --adjust cannot. Reduces boot time by not calling hwclock multiple times, e.g., --hctosys early before fsck when the file system is read-only, then --adjust later when the file system is read-write and --hctosys again for drift correction. Use of --adjust elsewhere may no longer be necessary. Part II After the original submission of this patch I realized that now all operations except --systz require drift corrected Hardware Clock time. Therefore, it should be done only once early in the process. Upon implementation of that premise many improvements were facilitated: * Adds drift correction to --hctosys. * Adds setting system time with sub-second precision. * Adds --get, a drift corrected 'show' operation. * Improves drift factor calculation precision while greatly simplifying its algorithm. * Fixes --show bug, printing integer sub-seconds, and now uses a more intuitive positive value. * Fixes --predict bug, drift correction must be negated to predict future RTC time. * Reduces the number of function arguments and lines of code. Signed-off-by: J William Piggott sys-utils/hwclock.c | 205 +++++++++++++++++++++++----------------------------- 1 file changed, 91 insertions(+), 114 deletions(-) commit dfc6db2a3558d2a2cedbeb381e2cc8feda41a214 Author: Karel Zak Date: Wed Oct 15 14:10:25 2014 +0200 libfdisk: cleanup parttype API * add reference counting * add functions to set allocated types Signed-off-by: Karel Zak disk-utils/sfdisk.c | 2 +- libfdisk/src/dos.c | 2 +- libfdisk/src/fdiskP.h | 3 +- libfdisk/src/gpt.c | 2 +- libfdisk/src/libfdisk.h | 19 +++-- libfdisk/src/partition.c | 28 ++++-- libfdisk/src/parttype.c | 216 ++++++++++++++++++++++++++++++++++++----------- libfdisk/src/script.c | 4 +- 8 files changed, 209 insertions(+), 67 deletions(-) commit 0123bd1a8703476135f2db9e80d7db3c0c793977 Author: Karel Zak Date: Wed Oct 15 13:06:23 2014 +0200 libfdisk: cleanup partno API Signed-off-by: Karel Zak libfdisk/src/fdiskP.h | 5 ++ libfdisk/src/libfdisk.h | 15 +++-- libfdisk/src/partition.c | 150 +++++++++++++++++++++++++++++++++-------------- libfdisk/src/table.c | 4 +- 4 files changed, 123 insertions(+), 51 deletions(-) commit ecf40cda764496d3d1b29435ea64a65335ae0acf Author: Karel Zak Date: Wed Oct 15 12:17:40 2014 +0200 libfdisk: make it possible to use zero for size and start The zero may be valid size and start of the partition. This patch introduces: fdisk_partition_has_start() fdisk_partition_has_size() fdisk_partition_unset_size() fdisk_partition_unset_start() to make it possible to work with zero. The feature is internally implemented by magic constant ((type) -1) for undefined sizes and offsets. Signed-off-by: Karel Zak disk-utils/cfdisk.c | 3 +- disk-utils/fdisk-list.c | 2 + disk-utils/sfdisk.c | 2 +- libfdisk/src/bsd.c | 16 +-- libfdisk/src/dos.c | 56 ++++++---- libfdisk/src/fdiskP.h | 24 ++--- libfdisk/src/gpt.c | 23 +++-- libfdisk/src/label.c | 11 +- libfdisk/src/libfdisk.h | 22 ++-- libfdisk/src/partition.c | 263 +++++++++++++++++++++++++++++------------------ libfdisk/src/script.c | 6 +- libfdisk/src/sgi.c | 8 +- libfdisk/src/sun.c | 8 +- libfdisk/src/table.c | 11 +- 14 files changed, 277 insertions(+), 178 deletions(-) commit 6311e178452fc3789a0255fe141ea598c24f3f3d Author: Karel Zak Date: Wed Oct 15 12:11:05 2014 +0200 tests: check for wipefs and helpers in fdisk tests Signed-off-by: Karel Zak tests/ts/fdisk/bsd | 1 + tests/ts/sfdisk/dos | 1 + 2 files changed, 2 insertions(+) commit 06d199e89a5c9d1f98e985fc6d584049e232ed08 Author: Karel Zak Date: Tue Oct 14 19:52:04 2014 +0200 tests: update bsd test Signed-off-by: Karel Zak tests/expected/fdisk/bsd | 6 ++---- tests/ts/fdisk/bsd | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) commit 150d98ee3f24bfdc5b181b195e865657d8c6245c Author: Karel Zak Date: Tue Oct 14 19:46:17 2014 +0200 libfdisk: (dos) set partition start/size only when requested libfdisk/src/dos.c | 21 ++++++++++++++++----- libfdisk/src/fdiskP.h | 4 +++- libfdisk/src/partition.c | 4 +++- 3 files changed, 22 insertions(+), 7 deletions(-) commit 38e5ef659f5dcfd758eec57d9b9390ef3b5676e6 Author: Karel Zak Date: Tue Oct 14 18:01:38 2014 +0200 tests: update fdisk formatting Signed-off-by: Karel Zak tests/expected/blkid/md-raid0-whole | 1 - tests/expected/blkid/md-raid1-part | 1 - tests/expected/blkid/md-raid1-whole | 1 - tests/expected/fdisk/gpt | 6 ------ 4 files changed, 9 deletions(-) commit 13633a81dfeb2804c8baa7a5c93aa988f47a08e5 Author: Karel Zak Date: Tue Oct 14 17:59:41 2014 +0200 libfdisk: cleanup context devname usage Signed-off-by: Karel Zak libfdisk/src/context.c | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) commit 0c344037f0df8130cddd332ba78da4915e03fa68 Author: Karel Zak Date: Tue Oct 14 17:26:27 2014 +0200 libfdisk: (gpt) fix N-1 error for partition size The same bug like on dos.c, the limits for the "last sector" dialog are already with "-1". Signed-off-by: Karel Zak libfdisk/src/gpt.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 3df4adac3e65e9e203c547d2f749e0c7cbab29a5 Author: Karel Zak Date: Tue Oct 14 17:10:11 2014 +0200 tests: update fdisk formatting fdisk --list does no more use extra linebreak (\n) before and after partition table entries. Signed-off-by: Karel Zak tests/expected/fdisk/align-512-4K | 1 - tests/expected/fdisk/align-512-4K-63 | 1 - tests/expected/fdisk/align-512-4K-md | 2 -- tests/expected/fdisk/align-512-512 | 1 - tests/expected/fdisk/align-512-512-topology | 1 - tests/expected/fdisk/mbr-dos-mode | 9 --------- tests/expected/fdisk/mbr-nondos-mode | 10 ---------- tests/expected/fdisk/mbr-sort | 3 --- tests/expected/fdisk/oddinput | 1 - tests/expected/fdisk/sunlabel | 11 ----------- tests/ts/fdisk/bsd | 4 ++-- tests/ts/fdisk/gpt | 2 +- tests/ts/fdisk/mbr-dos-mode | 2 +- tests/ts/fdisk/mbr-nondos-mode | 2 +- tests/ts/fdisk/mbr-sort | 2 +- 15 files changed, 6 insertions(+), 46 deletions(-) commit a389baf116834b2664288ef7934dd0fd80b1c836 Author: Karel Zak Date: Tue Oct 14 16:44:54 2014 +0200 libfdisk: (dos) fix N-1 error for partition size Signed-off-by: Karel Zak libfdisk/src/dos.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit b1c524aeed52edbb813b87c14a7e407e44525f16 Author: Karel Zak Date: Tue Oct 14 14:46:11 2014 +0200 libfdisk: fix script unit test Signed-off-by: Karel Zak libfdisk/src/script.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 0c75b6a470e3627b32c2b3dec2ae8eb07fa9160f Author: Karel Zak Date: Tue Oct 14 12:14:05 2014 +0200 blkdiscard: fix err->errx() Signed-off-by: Karel Zak sys-utils/blkdiscard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 032228c9af6fbda5177c47c3d410386895957555 Author: Andreas Henriksson Date: Tue Oct 14 12:07:21 2014 +0200 script: may be hangs Signed-off-by: Karel Zak term-utils/script.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 303884a4955db8b00d0eecf3b59a8c70895897b8 Author: Raphael S. Carvalho Date: Wed Oct 8 21:46:07 2014 -0300 blkdiscard: fix underflow when offset is greater than device size If offset (range[0]) is greater than device size (blksize), the variable 'end' will be greater than blksize, and range[1] (length) will be recalculated. The underflow happens when subtracting range[0] (offset) from blksize, thus range[1] will be the result of an underflow. The bug leads to unwanted behavior from the program, where range[1] is likely to be a high number and then will discard a considerable amount of blocks from the device. The fix consists of exitting the program with an error message when the condition stated above is true. Spotted while auditing the code. Signed-off-by: Raphael S. Carvalho sys-utils/blkdiscard.c | 2 ++ 1 file changed, 2 insertions(+) commit e71b0aadaa20b21e909f16dcf77c84b63173044e Author: Helmut Grohne Date: Tue Oct 7 23:07:19 2014 +0200 build-sys: check for libtoolize rather than libtool The system libtool program has architecture dependent behaviour. It is therefore unavailable in cross build environments. The only place it was used in util-linux is autogen.sh to determine the availability of libtool. All other places correctly use libtoolize or $(top_builddir)/libtool. Signed-off-by: Helmut Grohne autogen.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9ed38607d744467b94fadb4b1d4af21e6e89d86d Author: Benno Schulenberg Date: Wed Oct 1 21:35:17 2014 +0200 textual: grammarize an informative message, and tweak some comments Also add two clarifying comments for translators. Signed-off-by: Benno Schulenberg libfdisk/src/gpt.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 10e1d2e5f7e516344d9ba87e25da4dccee13913d Author: Søren Holm Date: Wed Oct 1 16:14:02 2014 +0200 libmount: provide version as int for better compiletime test Signed-off-by: Søren Holm Makefile.am | 3 +++ configure.ac | 3 +++ libmount/src/libmount.h.in | 3 +++ 3 files changed, 9 insertions(+) commit 33ecab2b9cb77dd34fed1e6cf6394b88ef880f35 Author: Karel Zak Date: Tue Oct 14 10:20:19 2014 +0200 dmesg: improve reltime colors [ +0.004034] sd 113:0:0:0: [sdb] Attached SCSI disk [Oct10 13:04] sdb: unknown partition table [ +0.034011] sdb: sdb1 sdb2 sdb3 sdb4 < sdb5 sdb6 > .. the "Oct10 13:04" is possible to colorize by "timebreak" scheme (default is bold green). Signed-off-by: Karel Zak sys-utils/dmesg.1 | 4 ++++ sys-utils/dmesg.c | 3 +++ 2 files changed, 7 insertions(+) commit 3692c28d0615e5668caaada36f4b0391f51910df Author: Karel Zak Date: Mon Oct 13 13:30:28 2014 +0200 tests: add PMBR sfdisk test Signed-off-by: Karel Zak disk-utils/sfdisk.c | 2 +- tests/expected/sfdisk/gpt-list-pmbr | 9 +++++++++ tests/ts/sfdisk/gpt | 6 ++++++ 3 files changed, 16 insertions(+), 1 deletion(-) commit 0aa57f186867b5ca259704a4d2a83b2235779056 Author: Karel Zak Date: Fri Oct 10 12:56:45 2014 +0200 tests: add sfdisk GPT tests Signed-off-by: Karel Zak tests/expected/sfdisk/gpt | 0 tests/expected/sfdisk/gpt-all-defaults | 28 +++++++++ tests/expected/sfdisk/gpt-attrs | 5 ++ tests/expected/sfdisk/gpt-label | 6 ++ tests/expected/sfdisk/gpt-read-dump | 39 ++++++++++++ tests/expected/sfdisk/gpt-type | 5 ++ tests/expected/sfdisk/gpt-uuid | 1 + tests/expected/sfdisk/gpt-write-dump | 9 +++ tests/ts/sfdisk/gpt | 106 +++++++++++++++++++++++++++++++++ 9 files changed, 199 insertions(+) commit 2ce7b95985ebfe3dddbc12f43bf6b5336eaeed83 Author: Karel Zak Date: Fri Oct 10 12:53:12 2014 +0200 libfdisk: fix script next_token() Signed-off-by: Karel Zak libfdisk/src/script.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 90dc69e40a6777185f0d7185f697e33ba7afe647 Author: Karel Zak Date: Fri Oct 10 12:52:24 2014 +0200 sfdisk: leave on error Signed-off-by: Karel Zak disk-utils/sfdisk.8 | 2 +- disk-utils/sfdisk.c | 17 ++++++++++------- 2 files changed, 11 insertions(+), 8 deletions(-) commit 2d2cb0251d021e9a7a9c9584d33d223e74096f1a Author: Karel Zak Date: Fri Oct 10 12:24:10 2014 +0200 libfdisk: make script header parser more pedantic Signed-off-by: Karel Zak libfdisk/src/script.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 9368018ff0d484ceaeda02b200ee71627f4d4580 Author: Karel Zak Date: Thu Oct 9 14:08:59 2014 +0200 tests: test cazy sizes for sfdisk Signed-off-by: Karel Zak tests/expected/sfdisk/dos-explicit-size | 31 +++++++++++++++++++++++++++++++ tests/ts/sfdisk/dos | 21 +++++++++++++++++++++ 2 files changed, 52 insertions(+) commit 28d79d9b0d8c96519029472e02d66596daacf7b2 Author: Karel Zak Date: Thu Oct 9 14:03:45 2014 +0200 libfdisk: (dos) reset logical partition stuff after error Signed-off-by: Karel Zak libfdisk/src/dos.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) commit 2f34f1c77f65dc254efe5e4a380302772397933d Author: Karel Zak Date: Thu Oct 9 13:21:04 2014 +0200 tests: update sfdisk tests Signed-off-by: Karel Zak tests/expected/sfdisk/dos-activate | 26 +++++++++++------- tests/expected/sfdisk/dos-read-dump | 48 ++++++++++++++++++--------------- tests/expected/sfdisk/dos-simple-commas | 48 ++++++++++++++++----------------- tests/expected/sfdisk/dos-simple-space | 38 +++++++++++++------------- tests/expected/sfdisk/dos-write-dump | 16 ++++++----- tests/ts/sfdisk/dos | 15 ++++++----- 6 files changed, 103 insertions(+), 88 deletions(-) commit 8f48195846a83f309ef79a1185eb5df42e8b5451 Author: Karel Zak Date: Thu Oct 9 13:03:52 2014 +0200 libfdisk: cleanup script dump Signed-off-by: Karel Zak libfdisk/src/script.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 05af8bd4f060ea39fcf31516459ae5f57e13121b Author: Karel Zak Date: Thu Oct 9 12:23:59 2014 +0200 sfdisk: ask on EOF Signed-off-by: Karel Zak disk-utils/cfdisk.c | 2 +- disk-utils/sfdisk.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit bcdeacd7962a84f59aa805bd2b4ea3a213ff86d4 Author: Karel Zak Date: Thu Oct 9 12:10:36 2014 +0200 libfdisk: (dos) follow explicit sizes * this patch add to dos driver support for fdisk_partition->size_explicit to avoid unexpected last sector alignment for sizes explicitly specified in sectors * add support for small "first LBA", the current default is to use 1MiB offset for the first partition and for each EBR. This is not backwardly compatible and it makes impossible to apply sfdisk scripts/dumps from old systems, because original offset can be smaller than 2048 sectors (old sfdisk default is 1 sector). The solution is on the fly to detect this situation and change fdisk_context->first_lba to 1 sector. Nasty. Signed-off-by: Karel Zak libfdisk/src/dos.c | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) commit 18b266cea329b803a58af50254769f3de4eab9d9 Author: Karel Zak Date: Thu Oct 9 12:10:09 2014 +0200 libfdisk: (gpt) follow explicit size, fiz size+1 buf Signed-off-by: Karel Zak libfdisk/src/gpt.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 9b0b9fb1bff7b4ddd6669a2a57fe4561df376f04 Author: Karel Zak Date: Thu Oct 9 12:09:07 2014 +0200 libfdisk: follow explicitly specified partition size Signed-off-by: Karel Zak disk-utils/cfdisk.c | 13 ++++++++++--- disk-utils/fdisk.c | 2 +- libfdisk/src/script.c | 8 ++++++-- 3 files changed, 17 insertions(+), 6 deletions(-) commit 6d37c2ce9a3e4a257c438a24a6293b48bb9e51fd Author: Karel Zak Date: Thu Oct 9 12:06:52 2014 +0200 libfdisk: add functions to play nasty games with first/last LBA Signed-off-by: Karel Zak libfdisk/src/context.c | 56 +++++++++++++++++++++++++++++++++++++++++++++++++ libfdisk/src/libfdisk.h | 5 +++++ 2 files changed, 61 insertions(+) commit 6d812a4859326b6f6d3ba214f117d759b35b181a Author: Karel Zak Date: Thu Oct 9 12:03:32 2014 +0200 fdisk: reset cached output fields when change disk label Signed-off-by: Karel Zak disk-utils/fdisk-list.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) commit 892c89eb76e7c274cade8cbd8b4cdc5f5f5c9790 Author: Karel Zak Date: Thu Oct 9 12:02:17 2014 +0200 libfdisk: allow to specify partition size by explicit number of sectors Signed-off-by: Karel Zak libfdisk/src/fdiskP.h | 1 + libfdisk/src/libfdisk.h | 1 + libfdisk/src/partition.c | 22 +++++++++++++++++++++- 3 files changed, 23 insertions(+), 1 deletion(-) commit 0a9ac4d2f5be71c22e01b43e636653434a1d71f7 Author: Karel Zak Date: Wed Oct 8 13:11:59 2014 +0200 libfdisk: use skip_blank() in scripts Signed-off-by: Karel Zak libfdisk/src/script.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 8be199ea2b5aa88edb851dda83c300f3bbf1d56f Author: Karel Zak Date: Wed Oct 8 13:00:56 2014 +0200 sfdisk: cleanup isatty() usage Signed-off-by: Karel Zak disk-utils/sfdisk.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit a536cf71063d2a5460222a5782ef5d5582d2400e Author: Karel Zak Date: Wed Oct 8 13:00:19 2014 +0200 libfdisk: (dos) don't inform about logical partition Signed-off-by: Karel Zak libfdisk/src/dos.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 4e8ee117c49b31c590dd063a1fe382fc11ca602f Author: Karel Zak Date: Wed Oct 8 12:59:50 2014 +0200 libfdisk: consolidate script parser code Signed-off-by: Karel Zak libfdisk/src/script.c | 144 ++++++++++++++++++++++---------------------------- 1 file changed, 62 insertions(+), 82 deletions(-) commit d79634cfa801d778afe6d717f289976fd1f667ab Author: Karel Zak Date: Tue Oct 7 15:33:18 2014 +0200 libfdisk: fix script parser Signed-off-by: Karel Zak libfdisk/src/script.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 50f7514e9dd4d87201f6db5629cf9b6cffddf5eb Author: Karel Zak Date: Tue Oct 7 15:32:09 2014 +0200 libfdisk: (dos) fix booable flag usage Signed-off-by: Karel Zak libfdisk/src/dos.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e1422de3d83326b6cd6e559b0f6653a451e7ef92 Author: Karel Zak Date: Mon Oct 6 14:53:25 2014 +0200 sfdisk: add --label-nested for hybrid GPT regular disk label: # sfdisk --list /dev/sdb .. Disklabel type: gpt Disk identifier: 9DF9A9F1-0654-4E7A-9A5E-36E66D60FD79 Device Start End Sectors Size Type /dev/sdb1 2048 22527 20480 10M Linux filesystem /dev/sdb2 22528 43007 20480 10M Linux swap /dev/sdb3 43008 204766 161759 79M Linux filesystem nested (PMBR): # sfdisk --list --label-nested dos /dev/sdb ... Disklabel type: dos Disk identifier: 0x00000000 Device Boot Start End Sectors Size Id Type /dev/sdb1 1 204799 204799 100M ee GPT and for example: # sfdisk --label-nested dos /dev/sdb < disk-utils/sfdisk.8 | 4 ++++ disk-utils/sfdisk.c | 24 +++++++++++++++++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) commit 11eee4c4773842bbb960b08fef024c345ee55f1e Author: Karel Zak Date: Mon Oct 6 13:32:43 2014 +0200 libfdisk: propagate assign-device operation to parent Let's make it possible to use fdisk_assign_device() for nested contexts. Signed-off-by: Karel Zak libfdisk/src/context.c | 142 ++++++++++++++++++++++++++++++++++++++----------- libfdisk/src/utils.c | 3 +- 2 files changed, 112 insertions(+), 33 deletions(-) commit a8a4887bcd9def0bf912c41f8b314993565d10ad Author: Karel Zak Date: Fri Oct 3 14:47:05 2014 +0200 libfdisk: fix sun and sgi to be usable from sfdisk Signed-off-by: Karel Zak disk-utils/sfdisk.8 | 6 ++++++ disk-utils/sfdisk.c | 7 ++++++- libfdisk/src/sgi.c | 17 +++++++++++------ libfdisk/src/sun.c | 11 +++++++---- 4 files changed, 30 insertions(+), 11 deletions(-) commit f5aa7b613d13e4bd5b5b972cfa61e3c50ed4ada9 Author: Karel Zak Date: Fri Oct 3 12:42:54 2014 +0200 fdisk: fix typo Signed-off-by: Karel Zak disk-utils/fdisk-list.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 01f9286cb1e9c891b678af122d50bb2e9e99142e Author: Karel Zak Date: Fri Oct 3 12:40:19 2014 +0200 sfdisk: add --output for print command(s) Signed-off-by: Karel Zak disk-utils/sfdisk.8 | 18 +++++++++++++----- disk-utils/sfdisk.c | 12 +++++++++++- 2 files changed, 24 insertions(+), 6 deletions(-) commit fff8ad5882308825a131c645e4d28bcaef943351 Author: Karel Zak Date: Fri Oct 3 12:40:04 2014 +0200 fdisk: add --output for print command(s) Signed-off-by: Karel Zak disk-utils/fdisk-list.c | 118 +++++++++++++++++++++++++++++++++++++++++++++++- disk-utils/fdisk-list.h | 3 ++ disk-utils/fdisk.8 | 8 ++++ disk-utils/fdisk.c | 11 ++++- 4 files changed, 137 insertions(+), 3 deletions(-) commit eac3aac95bfcaee3cc4cbc784a7b8b73e37fcd9c Author: Karel Zak Date: Fri Oct 3 12:12:23 2014 +0200 libfdisk: add fdisk_label_get_field_by_name() and const for labels Signed-off-by: Karel Zak libfdisk/src/label.c | 39 ++++++++++++++++++++++++++++++++------- libfdisk/src/libfdisk.h | 32 +++++++++++++++++++------------- libfdisk/src/parttype.c | 16 ++++++++-------- 3 files changed, 59 insertions(+), 28 deletions(-) commit 00665c3fe1fa8a9b30bfe82045208ce6fb3ade03 Author: Karel Zak Date: Fri Oct 3 12:11:31 2014 +0200 libfdisk: (gpt) remove 'Cylinders' Signed-off-by: Karel Zak libfdisk/src/gpt.c | 1 - 1 file changed, 1 deletion(-) commit bc9e8547093beb91d2360c62a0ba324a028d229c Author: Karel Zak Date: Thu Oct 2 15:49:24 2014 +0200 sfdisk: add --part-attrs Signed-off-by: Karel Zak disk-utils/sfdisk.8 | 10 ++++++++- disk-utils/sfdisk.c | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+), 1 deletion(-) commit c77ba5316f60ed0bdd255b18400f1e8347f3bfb2 Author: Karel Zak Date: Thu Oct 2 15:49:05 2014 +0200 libfdisk: (gpt) parse attr bits Signed-off-by: Karel Zak libfdisk/src/gpt.c | 76 ++++++++++++++++++++++++++++++++++++++++++++++++ libfdisk/src/libfdisk.h | 1 + libfdisk/src/partition.c | 16 ++++++++++ 3 files changed, 93 insertions(+) commit b4b8438901727027a1d06943cd9b4b405263fdbd Author: Karel Zak Date: Thu Oct 2 15:48:04 2014 +0200 build-sys: add hint about 'make' Signed-off-by: Karel Zak configure.ac | 2 ++ 1 file changed, 2 insertions(+) commit 95085ec5d6c3f68641892279c2e10d24eb713ebd Author: Karel Zak Date: Thu Oct 2 14:44:49 2014 +0200 libfdisk: (dos) use script label-id Signed-off-by: Karel Zak libfdisk/src/dos.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) commit e36fb07af63005f26a1e9d0017ea54ea6b02e77f Author: Karel Zak Date: Thu Oct 2 13:43:52 2014 +0200 sfdisk: cleanup option names Rename options to --part-{label,uuid,type} to be compatible with another tools (like lsblk, parts, etc). Signed-off-by: Karel Zak disk-utils/sfdisk.8 | 26 +++++++++--------- disk-utils/sfdisk.c | 77 ++++++++++++++++++++++++++++++----------------------- 2 files changed, 57 insertions(+), 46 deletions(-) commit 351fad50697a1bce65c08b4f97910411b777f5ae Author: Karel Zak Date: Thu Oct 2 13:22:56 2014 +0200 sfdisk: add --name Signed-off-by: Karel Zak disk-utils/sfdisk.8 | 5 +++ disk-utils/sfdisk.c | 126 +++++++++++++++++++++++++++++++++++++++------------- 2 files changed, 99 insertions(+), 32 deletions(-) commit 3a5bdedf6a6fc072e6ee84b3264783048233aac8 Author: Karel Zak Date: Thu Oct 2 13:00:35 2014 +0200 sfdisk: add --uuid command Signed-off-by: Karel Zak disk-utils/sfdisk.8 | 4 ++ disk-utils/sfdisk.c | 127 +++++++++++++++++++++++++++++++++++++++++++--------- 2 files changed, 111 insertions(+), 20 deletions(-) commit 9a79aa6e7afbee64efa52d638b1b0c2f1b828f67 Author: Karel Zak Date: Thu Oct 2 12:18:31 2014 +0200 sfdisk: more update to the man page Signed-off-by: Karel Zak disk-utils/sfdisk.8 | 266 +++++++++++++++++++++++++++++++++++++++++--------- libfdisk/src/script.c | 2 +- 2 files changed, 223 insertions(+), 45 deletions(-) commit 5aac742940f5a493d4cb06d4aff24e4abcc73b56 Author: Karel Zak Date: Tue Sep 23 15:14:44 2014 +0200 sfdisk: update man page Signed-off-by: Karel Zak disk-utils/sfdisk.8 | 714 ++++++++-------------------------------------------- 1 file changed, 103 insertions(+), 611 deletions(-) commit 347a7f775649f4431800023b36484e882962c06d Author: Karel Zak Date: Tue Sep 23 12:28:01 2014 +0200 sfdisk: add --append Signed-off-by: Karel Zak disk-utils/sfdisk.c | 46 +++++++++++++++++++++++++++++++++++++++------- libfdisk/src/context.c | 2 ++ libfdisk/src/script.c | 4 +++- 3 files changed, 44 insertions(+), 8 deletions(-) commit e54b1c6fcb42cee06d2b72f110844ff9ed98415d Author: Karel Zak Date: Tue Sep 23 11:39:02 2014 +0200 sfdisk: be sensitive to PT limits Signed-off-by: Karel Zak disk-utils/sfdisk.c | 43 +++++++++++++++++++++++++++++++++++++++++-- libfdisk/src/libfdisk.h | 2 +- libfdisk/src/table.c | 2 +- 3 files changed, 43 insertions(+), 4 deletions(-) commit ab02d87e4f9acdc1cb35805e93bf24c819ad035a Author: Karel Zak Date: Fri Sep 19 11:31:07 2014 +0200 sfdisk: add --backup and --backup-file The option --backup force sfdisk to store *all* fragments of the partition table (including MBR partition tables store in the extended partitions) to $HOME/sfdisk--.bak The options -O, -backup-file allows to override the default path, but sfdisk still appends -.bak to the . The backup files always contain only raw data from the device, so it's possible to use dd(1) to restore original data on the device. The original sfdisk also supported -O , but semantic was little bit different: - all was based on 512-byte sectors - all sectors was stored to the one file in format |||... this original concept makes the backup files specific to sfdisk and with dependence on sector size. The new concept is the same we already use for wipefs(8) backup files. Example (disk with GPT): # sfdisk /dev/sda --backup Welcome to sfdisk (util-linux 2.25.202-f4deb-dirty). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. Backup files: PMBR (offset 0, size 512): /root/sfdisk-sda-0x00000000.bak GPT Header (offset 512, size 512): /root/sfdisk-sda-0x00000200.bak GPT Entries (offset 1024, size 16384): /root/sfdisk-sda-0x00000400.bak Signed-off-by: Karel Zak disk-utils/sfdisk.c | 126 ++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 113 insertions(+), 13 deletions(-) commit db48b6a1898b0415872a118fb03b31242cc8a334 Author: Karel Zak Date: Fri Sep 19 10:30:14 2014 +0200 sfdisk: add --no-reread and --force and also check if the device is in use. Signed-off-by: Karel Zak disk-utils/sfdisk.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 50 insertions(+), 2 deletions(-) commit f01f252857af23f7827f4727a345709466d20576 Author: Karel Zak Date: Thu Sep 18 12:31:52 2014 +0200 sfdisk: add --no-act Signed-off-by: Karel Zak disk-utils/sfdisk.c | 40 ++++++++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 14 deletions(-) commit 35ce145f6adc8ca15555bf976fd69af41879e161 Author: Karel Zak Date: Thu Sep 18 11:56:49 2014 +0200 sfdisk: add deprecated --Linux The sfdisk does not care about compatibility with classic DOS partitioning, and it does not warn about incompatibility with DOS at all. It means that --Linux is default and it's unnecessary to use this option. It's the same situation like with "--unit S", these options are very probably often used in scripts, and these all is default now. So for backward compatibility new sfdisk accepts these options on command line, but prints "option is deprecated" warning message. Signed-off-by: Karel Zak Documentation/deprecated.txt | 7 ++++++- disk-utils/sfdisk.c | 11 +++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) commit f0edb076ed1cfbad293c94d15e2c340a3975b85b Author: Karel Zak Date: Thu Sep 18 10:43:19 2014 +0200 sfdisk: add --quiet Note that original sfdisk implementation suppressed warning messages for --quiet. Now we keep warning and error messages visible, but suppress extra info messages only (for example to make it more usable in scripts). IMHO suppress warnings is bad idea. Signed-off-by: Karel Zak disk-utils/sfdisk.c | 42 ++++++++++++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 14 deletions(-) commit d420a7f9f68b3ede82df572ae398d6eb3b8424da Author: Karel Zak Date: Thu Sep 18 10:21:35 2014 +0200 sfdisk: add --unit and --show-geometry, update deprecated.txt Signed-off-by: Karel Zak Documentation/deprecated.txt | 20 +++++++++--- disk-utils/sfdisk.c | 74 +++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 85 insertions(+), 9 deletions(-) commit ea50ba5bf188dc02812e062678479ded1e727d1c Author: Karel Zak Date: Wed Sep 17 15:25:02 2014 +0200 libfdisk: remove old label drives' API for parttypes Signed-off-by: Karel Zak libfdisk/src/fdiskP.h | 9 ----- libfdisk/src/label.c | 9 +++-- libfdisk/src/sun.c | 99 ++++++++++++++++++++++++++++++--------------------- 3 files changed, 62 insertions(+), 55 deletions(-) commit 71c895fc62f26269947885854187075667c213a7 Author: Karel Zak Date: Wed Sep 17 13:53:16 2014 +0200 libfdisk: (sgi) add set_part() API Signed-off-by: Karel Zak libfdisk/src/sgi.c | 80 ++++++++++++++++++++++++++++++++---------------------- 1 file changed, 48 insertions(+), 32 deletions(-) commit 7f63194ac6c0af6835cbf026b370f971872eb1f2 Author: Karel Zak Date: Wed Sep 17 13:43:14 2014 +0200 libfdisk: (bsd) add set_part() API Signed-off-by: Karel Zak libfdisk/src/bsd.c | 87 +++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 64 insertions(+), 23 deletions(-) commit b305ad406555c7b478fb00f5e649dd1b12ba1c1e Author: Karel Zak Date: Wed Sep 17 13:14:01 2014 +0200 libfdisk: use new set_part API in fdisk_set_partition_type() Signed-off-by: Karel Zak libfdisk/src/dos.c | 55 ---------------------------------------------------- libfdisk/src/gpt.c | 26 ------------------------- libfdisk/src/label.c | 12 +++++++++--- 3 files changed, 9 insertions(+), 84 deletions(-) commit a48c09853cb95cb00c418cd148ed2b93ba03ce51 Author: Karel Zak Date: Wed Sep 17 13:10:14 2014 +0200 libfdisk: (gpt) check string_to_guid() Signed-off-by: Karel Zak libfdisk/src/gpt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 21ca986d716ebc061cbca9696fdafb3376b526f3 Author: Karel Zak Date: Wed Sep 17 12:56:39 2014 +0200 sfdisk: cleanup sync() usage, fix --activate * use sync() only if we change disk layout * don't use sync() when we change details (like partition type) Signed-off-by: Karel Zak disk-utils/sfdisk.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit 2aeff7618e3e62b9cea594b2a23ae27b71022a35 Author: Karel Zak Date: Wed Sep 17 12:54:05 2014 +0200 linfdisk: cleanup fsync usage * always use fsync() if the device open read-write * use sync() on demand Signed-off-by: Karel Zak libfdisk/src/context.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 2e73a998f4e8e5a330b9539d55ff6677a0df9d65 Author: Karel Zak Date: Wed Sep 17 12:24:33 2014 +0200 sfdisk: use fdisk_set_partition_type() This is more simple than the generic fdisk_set_partition() API. Signed-off-by: Karel Zak disk-utils/sfdisk.c | 29 +++++++++-------------------- 1 file changed, 9 insertions(+), 20 deletions(-) commit 43a1ccecda669b841a1734c6da0d48f1c544b0e6 Author: Karel Zak Date: Mon Sep 15 13:02:04 2014 +0200 sfdisk: cleanup usage() and long options Signed-off-by: Karel Zak disk-utils/sfdisk.c | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) commit 8eab3194ce1737a167812d5e84d83b0dfc253fac Author: Karel Zak Date: Mon Sep 15 12:37:52 2014 +0200 sfdisk: add --parttype The patch also makes --{id,change-id,print-id} deprecated in favour of --parttype. The original --id is too generic option name and the --print-id and --change-id are unnecessary and inconsistent with another sfdisk options (e.g. we don't have --change-bootable) Signed-off-by: Karel Zak disk-utils/sfdisk.c | 145 ++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 134 insertions(+), 11 deletions(-) commit d2c47697e149d406af266c9d59f140c24ee890ad Author: Karel Zak Date: Thu Sep 11 15:28:15 2014 +0200 sfdisk: add --verify Signed-off-by: Karel Zak disk-utils/fdisk-list.c | 12 ++++--- disk-utils/fdisk-list.h | 4 +-- disk-utils/fdisk.c | 4 +-- disk-utils/sfdisk.c | 91 +++++++++++++++++++++++++++++++++++++++++++------ 4 files changed, 91 insertions(+), 20 deletions(-) commit 058dd97a1c954a3ecb342080ef517ddc3b6aefbe Author: Karel Zak Date: Thu Sep 11 14:41:46 2014 +0200 sfdisk: add --list-types Signed-off-by: Karel Zak disk-utils/sfdisk.c | 47 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) commit 2aa36b73720ede440f5ef2bc7e96848b1295ab91 Author: Karel Zak Date: Thu Sep 11 14:23:50 2014 +0200 sfdisk: add missing stuff to usage() Signed-off-by: Karel Zak disk-utils/sfdisk.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit d151447ba127f52d03fc1b01205e237e24e419e6 Author: Karel Zak Date: Thu Sep 11 14:13:57 2014 +0200 sfdisk: make dump format usable on stdin Signed-off-by: Karel Zak libfdisk/src/script.c | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) commit 6936c081aba8cc590fdebfcc38574f09aecb5503 Author: Karel Zak Date: Thu Sep 11 13:53:35 2014 +0200 libfdisk: (gpt) use generic API to change UUID and name Signed-off-by: Karel Zak disk-utils/fdisk-menu.c | 30 +++++++++++++- libfdisk/src/gpt.c | 101 +++++++----------------------------------------- libfdisk/src/libfdisk.h | 2 - 3 files changed, 43 insertions(+), 90 deletions(-) commit b0a484a880415655de9f0fc5d99eb7c19046a5de Author: Karel Zak Date: Thu Sep 11 13:34:15 2014 +0200 libfdisk: (gpt) implement fdisk_set_partition() backend Signed-off-by: Karel Zak libfdisk/src/gpt.c | 117 ++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 84 insertions(+), 33 deletions(-) commit 0ecf3ab50467da70bafbf3f9e19301e16409b662 Author: Karel Zak Date: Thu Sep 11 12:52:49 2014 +0200 libfdisk: (dos) implement fdisk_set_partition() backend Signed-off-by: Karel Zak disk-utils/sfdisk.c | 83 +---------------------------------------------------- libfdisk/src/dos.c | 53 ++++++++++++++++++++++++++++++---- 2 files changed, 49 insertions(+), 87 deletions(-) commit 0dad2177852708f7840b600e1db888828c8c521e Author: Karel Zak Date: Thu Sep 11 12:48:56 2014 +0200 libfdisk: add fdisk_set_partition() Signed-off-by: Karel Zak libfdisk/src/fdiskP.h | 3 +++ libfdisk/src/libfdisk.h | 2 ++ libfdisk/src/partition.c | 28 ++++++++++++++++++++++++++++ 3 files changed, 33 insertions(+) commit e11c66844999f8165b5b17a35ea3c61ff8f30402 Author: Karel Zak Date: Thu Sep 11 11:48:06 2014 +0200 libfdisk: cleanup internal drivers' API Signed-off-by: Karel Zak libfdisk/src/bsd.c | 2 +- libfdisk/src/dos.c | 2 +- libfdisk/src/fdiskP.h | 21 +++++++++---------- libfdisk/src/gpt.c | 3 +-- libfdisk/src/libfdisk.h | 4 ++-- libfdisk/src/partition.c | 52 +++++++++++++++++++++++++----------------------- libfdisk/src/sgi.c | 3 +-- libfdisk/src/sun.c | 3 +-- 8 files changed, 45 insertions(+), 45 deletions(-) commit b4df449f539a7eeb55dd3e036c875b5bb19f89e3 Author: Karel Zak Date: Wed Sep 10 14:31:28 2014 +0200 sfdisk: support -N for primary partitions Signed-off-by: Karel Zak disk-utils/sfdisk.c | 114 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 110 insertions(+), 4 deletions(-) commit 78049787a5872e530f7975db656343ccafeb9eaf Author: Karel Zak Date: Wed Sep 10 14:31:08 2014 +0200 libfdisk: add fdisk_copy_parttype() Signed-off-by: Karel Zak libfdisk/src/libfdisk.h | 6 ++++-- libfdisk/src/partition.c | 5 +++-- libfdisk/src/parttype.c | 53 ++++++++++++++++++++++++++++++++++-------------- 3 files changed, 45 insertions(+), 19 deletions(-) commit e881349460a4bd9f151038cc18536963c22abc6b Author: Karel Zak Date: Wed Sep 10 13:18:15 2014 +0200 sfdisk: require confirmation before write to the device Signed-off-by: Karel Zak disk-utils/sfdisk.c | 156 +++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 119 insertions(+), 37 deletions(-) commit 2d12903265367101c51d1b47d98a1457d93cd8ed Author: Karel Zak Date: Wed Sep 10 12:51:25 2014 +0200 libfdisk: make yes/no dialogs more robust Signed-off-by: Karel Zak disk-utils/fdisk.c | 16 ++++++++++++---- libfdisk/src/ask.c | 2 +- 2 files changed, 13 insertions(+), 5 deletions(-) commit 3186f4a92719ac97c6a1a12ef3a2a417a0cd9bf0 Author: Karel Zak Date: Tue Sep 9 15:51:19 2014 +0200 sfdisk: improve UI Signed-off-by: Karel Zak disk-utils/sfdisk.c | 140 ++++++++++++++++++++++++++++++++++++------------ libfdisk/src/context.c | 3 +- libfdisk/src/dos.c | 2 + libfdisk/src/libfdisk.h | 1 + libfdisk/src/script.c | 15 +++++- libfdisk/src/table.c | 6 ++- 6 files changed, 128 insertions(+), 39 deletions(-) commit d5bee4bb59b4e78cdc85800b75f15d70def79c4a Author: Karel Zak Date: Tue Sep 9 13:36:16 2014 +0200 libfdisk: cleanup script size= code Signed-off-by: Karel Zak disk-utils/sfdisk.c | 14 ++++++++++---- libfdisk/src/script.c | 34 ++++++++++++++++++++++------------ 2 files changed, 32 insertions(+), 16 deletions(-) commit c3bc74835259bb1d6443ea52f875ce3c179dff20 Author: Karel Zak Date: Tue Sep 9 13:04:57 2014 +0200 libfdisk: return partno when add new partition * improve the way how sfdisk report results * the API change simplify applications Signed-off-by: Karel Zak disk-utils/cfdisk.c | 2 +- disk-utils/fdisk-menu.c | 2 +- disk-utils/sfdisk.c | 39 ++++++++++++----- libfdisk/src/bsd.c | 5 ++- libfdisk/src/dos.c | 108 ++++++++++++++++++++++++++++------------------- libfdisk/src/fdiskP.h | 2 +- libfdisk/src/gpt.c | 5 ++- libfdisk/src/libfdisk.h | 2 +- libfdisk/src/partition.c | 34 +++++++++------ libfdisk/src/script.c | 11 +++-- libfdisk/src/sgi.c | 6 ++- libfdisk/src/sun.c | 5 ++- libfdisk/src/table.c | 2 +- 13 files changed, 142 insertions(+), 81 deletions(-) commit 7324f1bf8cd23a2b066ef6ff7247ca679805a07b Author: Karel Zak Date: Mon Sep 8 16:17:11 2014 +0200 sfdisk: implement command_fdisk() Signed-off-by: Karel Zak disk-utils/sfdisk.c | 137 +++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 129 insertions(+), 8 deletions(-) commit 0051ec9bffdfe81f86b51178907143966e386479 Author: Karel Zak Date: Mon Sep 8 16:16:31 2014 +0200 libfdisk: fix script partitions size parsing Signed-off-by: Karel Zak libfdisk/src/libfdisk.h | 8 +++++- libfdisk/src/partition.c | 24 +++++++++++++++++ libfdisk/src/script.c | 70 +++++++++++++++++++++++++++++++++++------------- libfdisk/src/utils.c | 8 ++++-- 4 files changed, 88 insertions(+), 22 deletions(-) commit ea987bb509054e962f1aeb322082f1080f7e0e8a Author: Karel Zak Date: Mon Sep 8 16:13:42 2014 +0200 libfdisk: (dos) more carefully check for primary partitions * check if there is space for primary partitions, if no and extended exists then create logical partitions * create extended if @pa->type is extended partition Signed-off-by: Karel Zak libfdisk/src/dos.c | 51 +++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 45 insertions(+), 6 deletions(-) commit 254b1dfcc396cb2e2cd2bdeb5d3e0a5b6dd4b504 Author: Karel Zak Date: Fri Sep 5 14:11:12 2014 +0200 sfdisk: cleanup comments and command_activate() Signed-off-by: Karel Zak disk-utils/sfdisk.c | 38 +++++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 9 deletions(-) commit 54b13b0c5caf6ae1745cbd526ea7e6581811b37f Author: Karel Zak Date: Fri Sep 5 13:05:49 2014 +0200 sfdisk: add --activate Signed-off-by: Karel Zak disk-utils/sfdisk.c | 81 ++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 74 insertions(+), 7 deletions(-) commit 59c8e95b3b2afc1226634ae7fd5d127739c3e67c Author: Karel Zak Date: Fri Sep 5 13:05:34 2014 +0200 libfdisk: add fdisk_partition_is_bootable() Signed-off-by: Karel Zak libfdisk/src/context.c | 11 +++++++++++ libfdisk/src/libfdisk.h | 2 ++ libfdisk/src/partition.c | 5 +++++ 3 files changed, 18 insertions(+) commit 148f6e6d1c93894016bbb2afe2bf2039812ca973 Author: Karel Zak Date: Fri Sep 5 11:21:21 2014 +0200 sfdisk: add comments, remove unnecessary function Signed-off-by: Karel Zak disk-utils/sfdisk.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) commit d2eb145785504e6fe6aa8ceea49d14448d8b3ba3 Author: Karel Zak Date: Fri Sep 5 11:11:38 2014 +0200 sfdisk: add --show-size Signed-off-by: Karel Zak disk-utils/sfdisk.c | 77 ++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 71 insertions(+), 6 deletions(-) commit d464e2f0f9fc4c8688eb4b9a020c0e02fe71b4cc Author: Karel Zak Date: Fri Sep 5 10:35:29 2014 +0200 fdisk: refactor /proc/partitions usage Signed-off-by: Karel Zak disk-utils/fdisk-list.c | 79 ++++++++++++++++++++++++++++--------------------- disk-utils/fdisk-list.h | 1 + 2 files changed, 47 insertions(+), 33 deletions(-) commit e3bb13d96c249fe1e5592408d3c6cfee71c8a5ef Author: Karel Zak Date: Thu Sep 4 15:54:59 2014 +0200 sfdisk: update usage() Signed-off-by: Karel Zak disk-utils/sfdisk.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 8a8d204cd112b3e18bce9c9611495f870bd3b24b Author: Karel Zak Date: Thu Sep 4 15:50:36 2014 +0200 sfdisk: add --dump functionality Signed-off-by: Karel Zak disk-utils/sfdisk.c | 72 ++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 57 insertions(+), 15 deletions(-) commit 207de32a97b14ea57a8bd1ba454e901aa223bd37 Author: Karel Zak Date: Thu Sep 4 14:16:08 2014 +0200 sfdisk: --list just one device Signed-off-by: Karel Zak disk-utils/sfdisk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9c1f9dd3a0dec0ccb7afc63cc47f04f8edc1b5de Author: Karel Zak Date: Thu Sep 4 14:05:16 2014 +0200 sfdisk: implement --list Signed-off-by: Karel Zak configure.ac | 3 +- disk-utils/Makemodule.am | 18 +++--- disk-utils/sfdisk.c | 154 +++++++++++++++++++++++++++++++++++++++++------ 3 files changed, 147 insertions(+), 28 deletions(-) commit 152788aacb5d0e7ee1b9f40207e88a35ac162f4b Author: Karel Zak Date: Thu Sep 4 14:04:50 2014 +0200 fdisk: improve --list output Signed-off-by: Karel Zak disk-utils/fdisk-list.c | 241 ++++++++++++++++++++++++++++++++++++++++++++++++ disk-utils/fdisk-list.h | 10 ++ disk-utils/fdisk.c | 3 +- libfdisk/src/context.c | 5 + 4 files changed, 258 insertions(+), 1 deletion(-) commit fdb006e8b5f525ebab5a0766c9005402eee194e2 Author: Karel Zak Date: Thu Sep 4 12:07:44 2014 +0200 fdisk: move --list functionality to separated file Signed-off-by: Karel Zak disk-utils/Makemodule.am | 4 +- disk-utils/fdisk.c | 220 +---------------------------------------------- disk-utils/fdisk.h | 4 +- libfdisk/src/libfdisk.h | 1 + 4 files changed, 8 insertions(+), 221 deletions(-) commit 1881390de25df8587b8fc281c451796f7d032dd3 Author: Karel Zak Date: Tue Sep 2 18:57:27 2014 +0200 sfdisk: basic main() and friends Signed-off-by: Karel Zak disk-utils/Makemodule.am | 16 +- disk-utils/sfdisk.c | 3263 ++-------------------------------------------- 2 files changed, 85 insertions(+), 3194 deletions(-) commit 5f176957297578382b825ed8636342d4a10b9389 Author: Karel Zak Date: Tue Oct 7 14:54:58 2014 +0200 tests: add sfdisk test Signed-off-by: Karel Zak tests/commands.sh | 1 + tests/expected/sfdisk/dos | 0 tests/expected/sfdisk/dos-activate | 11 ++++ tests/expected/sfdisk/dos-read-dump | 26 ++++++++++ tests/expected/sfdisk/dos-simple-commas | 28 ++++++++++ tests/expected/sfdisk/dos-simple-space | 24 +++++++++ tests/expected/sfdisk/dos-write-dump | 9 ++++ tests/ts/sfdisk/dos | 90 +++++++++++++++++++++++++++++++++ 8 files changed, 189 insertions(+) commit 473c5fb86c43eed41fc5ce8532699b6421f469e0 Author: Karel Zak Date: Tue Oct 7 13:41:40 2014 +0200 libmount: fix mnt_is_readonly() #ifdef This issue affects util-linux portability to GNU/HURD Reported-by: Pino Toscano (from Red Hat) Signed-off-by: Karel Zak configure.ac | 2 +- libmount/src/utils.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 00749bc366fe6106df918660a92a388cfff4f35f Author: Karel Zak Date: Tue Oct 7 12:44:34 2014 +0200 libblkid: zeroize errno on blkid_probe_get_buffer() success Since 37f4060225df0591ab8e1dd676dbc8115d900d4f prober functions are sensitive to errno, it seems more robust to set errno=0 with in blkid_probe_get_buffer() on success than set the zero on all places where we call blkid_probe_get_buffer(). Addresses: https://github.com/karelzak/util-linux/issues/119 Signed-off-by: Karel Zak libblkid/src/probe.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit c4604c38b503c8c46e50fc2048ebbcbcfcad3802 Author: Karel Zak Date: Tue Oct 7 12:12:39 2014 +0200 flock: zero timeout is valid This patch reverts Sami's "timeout cannot be zero", introduced in commit 605325b23b36238c8f3ae165e37cab9064553cf7. The --timeout 0 has been originally interpreted as --nonblock. The patch also add hint about this behavior to the man page. Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1149974 Signed-off-by: Karel Zak sys-utils/flock.1 | 4 +++- sys-utils/flock.c | 2 -- 2 files changed, 3 insertions(+), 3 deletions(-) commit f1453d528e28c15af4ba06871e377cc7d719eacc Author: Karel Zak Date: Tue Oct 7 11:54:33 2014 +0200 losetup: improve man page -D docs Signed-off-by: Karel Zak sys-utils/losetup.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 60ba8c362d93815f4b1cdc3ad9cebda3e11677f7 Author: Karel Zak Date: Tue Oct 7 11:33:46 2014 +0200 libfdisk: fix add_logical() assert The zero index is absolutely valid for extended partition (it means extended partition could be the first partition on the device). Reported-by: Christoph Hoopmann Signed-off-by: Karel Zak libfdisk/src/dos.c | 1 - 1 file changed, 1 deletion(-) commit 8d72c980f50edc8e9a366383b0ccc91479630fce Author: Karel Zak Date: Thu Oct 2 15:53:34 2014 +0200 docs: add swapon -o to TODO file Signed-off-by: Karel Zak Documentation/TODO | 5 +++++ 1 file changed, 5 insertions(+) commit 83aa4ad7975ef3acadff62d9afab973e0feccdb7 Author: Sami Kerola Date: Sun Sep 28 20:51:51 2014 +0100 hwclock: use fabs() instead abs() when argument is double sys-utils/hwclock.c:1219:13: warning: using integer absolute value function 'abs' when argument is of floating point type [-Wabsolute-value] Signed-off-by: Sami Kerola sys-utils/hwclock.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit aeeb81317e6887005562b790710f774f09d329c2 Author: Sami Kerola Date: Sun Sep 28 20:51:47 2014 +0100 include/debug: remove duplicate 'const' declaration warning ./include/debug.h:89:55: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier] Signed-off-by: Sami Kerola include/debug.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7fe033ef9a3e53b40c71b459b56d3405b51b22f8 Author: Sami Kerola Date: Sun Sep 28 20:51:44 2014 +0100 lsblk: fix compiler warning warning: ISO C forbids empty initializer braces [-Wpedantic] Signed-off-by: Sami Kerola misc-utils/lsblk.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 2a0d2a8e11adfde412a8b70c4fdafa607e84c670 Author: Sami Kerola Date: Sun Sep 28 20:51:43 2014 +0100 include: fix compiler warnings This change has motivation to make -Wall -pedantic compiler options to spit a little bit less noise, which with luck will increase change to notice real issues. Multiple of these: warning: ISO C forbids braced-groups within expressions [-Wpedantic] And nearly 300 times reported: include/c.h:75:41: warning: struct has no named members [-Wpedantic] #define UL_BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); })) Signed-off-by: Sami Kerola include/c.h | 10 +++++----- include/list.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) commit 4c87bb0d99d1eb9c4fd52f80214db57b40c82fdb Author: Sami Kerola Date: Sun Sep 28 20:51:42 2014 +0100 libuuid: remove _SVID_SOURCE pre-processor definition The _SVID_SOURCE is deprecated. In file included from /usr/include/stdio.h:27:0, from libuuid/src/gen_uuid.c:46: /usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp] Notice that the Makefile.am has AM_CPPFLAGS = \ -include config.h \ that enforces the config.h is included before any other hearer. In the configure.ac there is AC_USE_SYSTEM_EXTENSIONS that makes all possible features that can be supported in a system are turned on. With these two there is absolutely no need for any legacy _SOURCE definitions. Reference: https://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commit;h=c941736c92fa3a319221f65f6755659b2a5e0a20 Signed-off-by: Sami Kerola libuuid/src/gen_uuid.c | 6 ------ 1 file changed, 6 deletions(-) commit db433bf737a5fd4e1c7cca5e3603934743eebd1c Author: Sami Kerola Date: Sun Sep 28 20:51:41 2014 +0100 textual: use usage() text element macros Translating these text elements should happen only once, which is more likely when the text macros are used properly. Signed-off-by: Sami Kerola disk-utils/mkfs.c | 5 ++--- login-utils/chfn.c | 4 ++-- misc-utils/getopt.c | 12 +++++------- misc-utils/look.c | 5 ++--- misc-utils/namei.c | 5 ++--- misc-utils/uuidd.c | 4 ++-- misc-utils/uuidgen.c | 4 ++-- misc-utils/wipefs.c | 5 ++--- sys-utils/hwclock.c | 4 ++-- term-utils/script.c | 4 ++-- term-utils/scriptreplay.c | 4 ++-- term-utils/write.c | 8 ++++---- text-utils/colrm.c | 9 +++------ text-utils/rev.c | 8 +++----- 14 files changed, 35 insertions(+), 46 deletions(-) commit a587cc55209c1bed49f6573aa00f652fcd276bbb Author: Sami Kerola Date: Sun Sep 28 20:51:40 2014 +0100 textual: use manual tail usage() macro Signed-off-by: Sami Kerola disk-utils/mkfs.bfs.c | 1 + disk-utils/mkfs.c | 2 +- login-utils/lslogins.c | 2 +- misc-utils/getopt.c | 1 + misc-utils/look.c | 1 + misc-utils/namei.c | 2 +- misc-utils/uuidgen.c | 1 + misc-utils/wipefs.c | 2 +- schedutils/chrt.c | 1 + schedutils/taskset.c | 2 +- sys-utils/lscpu.c | 2 +- term-utils/script.c | 1 + term-utils/scriptreplay.c | 1 + term-utils/write.c | 1 + text-utils/col.c | 1 + text-utils/colcrt.c | 1 + text-utils/colrm.c | 1 + text-utils/rev.c | 2 +- text-utils/tailf.c | 1 + 19 files changed, 19 insertions(+), 7 deletions(-) commit f6277500833ece8ea34c65e4d23e1454e054141b Author: Sami Kerola Date: Sun Sep 28 20:51:39 2014 +0100 textual: use version printing macro everywhere Only mount, umount, and blkid remains not using the macro because they are print also library references. Signed-off-by: Sami Kerola disk-utils/cfdisk.c | 3 +-- disk-utils/mkfs.minix.c | 2 +- schedutils/chrt.c | 3 +-- schedutils/taskset.c | 3 +-- sys-utils/chcpu.c | 3 +-- sys-utils/dmesg.c | 3 +-- sys-utils/hwclock.c | 2 +- sys-utils/lscpu.c | 3 +-- sys-utils/rtcwake.c | 3 +-- sys-utils/tunelp.c | 3 +-- term-utils/agetty.c | 3 +-- term-utils/script.c | 3 +-- term-utils/scriptreplay.c | 3 +-- term-utils/write.c | 4 +--- text-utils/col.c | 3 +-- text-utils/colcrt.c | 4 +--- text-utils/colrm.c | 4 +--- text-utils/column.c | 5 ++--- text-utils/rev.c | 3 +-- text-utils/tailf.c | 3 +-- text-utils/ul.c | 3 +-- 21 files changed, 22 insertions(+), 44 deletions(-) commit c5c056e7fe31b1f604943f4c6aaae554013432e2 Author: Sami Kerola Date: Sun Sep 28 20:51:38 2014 +0100 flock: add error message to translations And remove type casting. Signed-off-by: Sami Kerola sys-utils/flock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1bcf491a786cc88f7684d4cd7df37adb2ea333e6 Author: Sami Kerola Date: Sun Sep 28 20:51:37 2014 +0100 textual: fix couple typos in comments Signed-off-by: Sami Kerola libfdisk/src/context.c | 2 +- libfdisk/src/script.c | 2 +- libsmartcols/src/table_print.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit bf60e9f12d9bcf7d87581c69cbc103c18f7d001a Author: Sami Kerola Date: Sun Sep 28 20:51:36 2014 +0100 hexdump: remove deprecation message Message 'calling hexdump as od has been deprecated in favor of GNU coreutils od' has informed the hexdump not to be used like that for three and half years, and five releases. It is time to get rid of notice. Signed-off-by: Sami Kerola text-utils/hexdump.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 7d2600e2d03b77cf825294e166914e95860ee11e Author: Sami Kerola Date: Sun Sep 28 20:51:35 2014 +0100 docs: update deprecation banners Signed-off-by: Sami Kerola disk-utils/mkfs.c | 9 +++++++++ login-utils/newgrp.c | 9 --------- login-utils/vipw.c | 9 --------- sys-utils/tunelp.c | 9 +++++++++ text-utils/col.c | 9 +++++++++ text-utils/pg.c | 9 +++++++++ 6 files changed, 36 insertions(+), 18 deletions(-) commit a12124ce7a941b09ae7104f2c146005ef285f65b Author: Sami Kerola Date: Sun Sep 28 20:51:34 2014 +0100 swapon: align available columns section in usage() Commit 5db57cfc469b45ada0162a64d627ce25a3d2431f missed doing this change. Signed-off-by: Sami Kerola sys-utils/swapon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eef63970238a20d769e41e1261c4790b772d5b00 Author: Karel Zak Date: Wed Oct 1 11:38:49 2014 +0200 cfdisk: don't modify ncurses LINES and COLS On Sun, Sep 28, 2014 at 01:48:38AM -0700, pv4 wrote: If ncurses is build with --enable-reentrant, building util-linux-2.25.1 fails with the folllowing error: disk-utils/cfdisk.c: In function 'resize': disk-utils/cfdisk.c:202:9: error: lvalue required as left operand of assignment LINES = ws.ws_row; ^ disk-utils/cfdisk.c:203:8: error: lvalue required as left operand of assignment COLS = ws.ws_col; ^ man COLS gives the following: Depending on the configuration, these may be actual variables, or macros (see curs_threads(3X)) which provide read-only access to curses's state. In either case, applications should treat them as read-only to avoid confusing the library. Addresses: https://github.com/karelzak/util-linux/issues/125 Signed-off-by: Karel Zak disk-utils/cfdisk.c | 66 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 37 insertions(+), 29 deletions(-) commit 1d966345df6721dc1da257867a18a84f1d9f98d5 Author: pcpa Date: Sat Sep 27 16:04:16 2014 -0300 su: print proper core dump message when killed An example is, in one terminal "sudo su -; echo $$", and in another terminal, "kill -9 $PID" (the pid of the su -). It should not print "(core dumped)", unless the kill signal specified so, e.g. kill -7 or kill -11. Signed-off-by: pcpa login-utils/su-common.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 937d6af4e1dfed8641475446cd9466a567fcf4e5 Author: Karel Zak Date: Wed Oct 1 10:13:09 2014 +0200 tests: fix the ipcs test for shmall being too big to show Based on hints from Adam Sampson, Ruediger Meier and Sami Kerola. Signed-off-by: Karel Zak tests/ts/ipcs/limits2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 41510d26ddd9a4c83f8589dded539e2985535dcf Author: Søren Holm Date: Fri Sep 26 18:35:11 2014 +0200 libmount: don't return root if path contains // or ending / If the path fx. is /foo/bar/ the initial stripoff will replace the last slash with \0 and return a pointer to that exact \0 character. The same thing will happen if the path contains // somewhere. Signed-off-by: Søren Holm libmount/src/tab.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 42f00a7df509ed7837c0177830ed71f134bc3e15 Author: Benno Schulenberg Date: Mon Sep 22 22:15:40 2014 +0200 textual: there may be no space between option and optional =arg Signed-off-by: Benno Schulenberg sys-utils/nsenter.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 298dc4ff6ba9a0049dab7090b14cd5039705f269 Author: Benno Schulenberg Date: Mon Sep 22 22:15:39 2014 +0200 textual: angular brackets around a non-literal argument, singular Signed-off-by: Benno Schulenberg sys-utils/nsenter.c | 2 +- sys-utils/setpriv.c | 5 ++++- sys-utils/unshare.c | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) commit 548696c4422684bb29b2fb763d984d622fa8782f Author: Benno Schulenberg Date: Mon Sep 22 22:15:38 2014 +0200 textual: grammarize another error message Signed-off-by: Benno Schulenberg sys-utils/hwclock-cmos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7a853ebc3888c867dc40632b2cef328902fa3469 Author: Benno Schulenberg Date: Mon Sep 22 22:15:37 2014 +0200 textual: using angular brackets around individual arguments And separate short and long options with the standard comma. Signed-off-by: Benno Schulenberg sys-utils/flock.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 6269814950a86b4f3214fb38f827a431125c9be0 Author: Benno Schulenberg Date: Mon Sep 22 22:15:36 2014 +0200 textual: grammarize an error message Signed-off-by: Benno Schulenberg sys-utils/dmesg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b73142b97a951deb5de369f8f10961479c6051e4 Author: Benno Schulenberg Date: Mon Sep 22 22:15:35 2014 +0200 textual: not using angular brackets around literal arguments Signed-off-by: Benno Schulenberg sys-utils/ctrlaltdel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8d7a6285ecd8b5c831b5f10af69b44b1d4cabd4b Author: Benno Schulenberg Date: Mon Sep 22 22:15:34 2014 +0200 textual: add a comma for clarity, plus some other tweaks Signed-off-by: Benno Schulenberg libfdisk/src/context.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit ee7ea5c85e5519be18c8e482b95ebbfd44263f9c Author: Benno Schulenberg Date: Mon Sep 22 22:15:33 2014 +0200 textual: use a somewhat clearer and more standard failure message Signed-off-by: Benno Schulenberg login-utils/newgrp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1c75610ff8a73a7c34a6f9b03cb7db15dae5e8ea Author: Benno Schulenberg Date: Mon Sep 22 22:15:32 2014 +0200 textual: "ambivalent" applies to intentions, "ambiguous" to results Signed-off-by: Benno Schulenberg lib/swapprober.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 09638694d47c6235e39bddadfa35d2a388c2e97a Author: Benno Schulenberg Date: Mon Sep 22 22:15:31 2014 +0200 textual: use angular brackets around each individual argument In usage texts each word that is an argument should be marked separately with angular brackets. Also add a translator comment. Signed-off-by: Benno Schulenberg sys-utils/renice.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 85fbe4118f120a4d501b3c1ff2a4b91a0d2dfbb9 Author: Karel Zak Date: Fri Sep 26 11:25:24 2014 +0200 lslogins: free after error [coverity scan] Signed-off-by: Karel Zak lib/readutmp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 30ea015b87f79eb83e75c27dfcda890e3b8e7e83 Author: Karel Zak Date: Fri Sep 26 11:23:32 2014 +0200 lslogins: cleanup after error [coverity scan] Signed-off-by: Karel Zak login-utils/lslogins.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 8a4c64e6ac630130c205b24e79fa51c82f66d116 Author: Karel Zak Date: Thu Sep 25 11:01:39 2014 +0200 mount: improve --move docs Signed-off-by: Karel Zak sys-utils/mount.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 286f1e229bee68c2f2720407752bcb5ec95c9abc Merge: fb2ba06 453fc71 Author: Karel Zak Date: Mon Sep 22 14:55:37 2014 +0200 Merge branch 'misc' of git://github.com/kerolasa/lelux-utiliteetit * 'misc' of git://github.com/kerolasa/lelux-utiliteetit: textual: share crypt() error message in sulogin and newgrp newgrp: avoid use of obsolete getpass() function newgrp: use libc function to read gshadow if it is available setarch: use personality() system call when it is available setarch: reindent code hwclock: remove referal to deprecated keyboard interface eject: make open_device() and select_speed() to use struct eject_control eject: add struct eject_control to remove global variables mountpoint: simplify if statement mkfs.minix: fix couple compiler warnings mountpoint: add struct mountpoint_control last: improve code readability by renaming variable names last: make is_phantom() when kernel config does not include audit support lib: remove xgetpass() include: simplify fputc_careful() in carefulputc.h libuuid: add extern qualifiers to uuid/uuid.h system header commit fb2ba0666349ee25edae322ff6a3f0c0c942703f Merge: 05dd1d1 94b1623 Author: Karel Zak Date: Mon Sep 22 14:43:30 2014 +0200 Merge branch 'renice' of git://github.com/kerolasa/lelux-utiliteetit * 'renice' of git://github.com/kerolasa/lelux-utiliteetit: renice: reorder usage() option descriptions rename: add getpriority() message lookup table renice: fix numeric uid argument parsing renice: avoid having same lines of code twice renice: disallow --priority without pid argument rename: use usage and version print out macros renice: reorder functions to avoid need of function prototype commit 05dd1d1d619d4be84001e407985bbcced3deb9ec Author: Karel Zak Date: Mon Sep 22 14:26:54 2014 +0200 lib/swapprober: add missing header file Signed-off-by: Karel Zak lib/swapprober.c | 1 + 1 file changed, 1 insertion(+) commit 18b3e5495b2bd1d89286f452d1d2952e065dfecd Author: Karel Zak Date: Mon Sep 22 13:16:25 2014 +0200 swapon: split swapon-common.c swapon - requires libmount and libblkid swapoff - requires libmount swaplabel - requires libblkid This patch add lib/swapprober.c with blkid stuff for swap. It allows to use and link libblkid only when necessary. Signed-off-by: Karel Zak disk-utils/Makemodule.am | 9 ++++++--- disk-utils/swaplabel.c | 10 +++++----- include/Makemodule.am | 2 +- include/swapon-common.h | 28 --------------------------- include/swapprober.h | 9 +++++++++ lib/swapprober.c | 48 +++++++++++++++++++++++++++++++++++++++++++++++ sys-utils/Makemodule.am | 12 +++++++++--- sys-utils/swapon-common.c | 47 ++-------------------------------------------- sys-utils/swapon-common.h | 25 ++++++++++++++++++++++++ sys-utils/swapon.c | 6 ++---- 10 files changed, 107 insertions(+), 89 deletions(-) commit 5ec85227ad3a8e9a8a0ddb1de8bdda30d2abea2f Author: Andreas Henriksson Date: Fri Sep 19 01:36:37 2014 +0200 logger: gettimeofday needs Either works on linux, but kfreebsd build fails if we don't use the include. According to man gettimeofday the correct include is Signed-off-by: Andreas Henriksson misc-utils/logger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 53e8c16e14ae4b929b4007c071fda3e40963937c Author: Andreas Henriksson Date: Fri Sep 19 01:36:35 2014 +0200 build-sys: build libmount everywhere This enables libmount to build on non-linux, which also means we can build fsck on non-linux again. (Since the context part of libmount still needs porting, building the mount utility has instead been restricted to only build on Linux.) This has been build-tested on Debian GNU/kFreeBSD. Signed-off-by: Andreas Henriksson configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 200cdfa8b1ba1e6827f8f0cd9b26eee7bcfd2ac5 Author: Andreas Henriksson Date: Fri Sep 19 01:36:34 2014 +0200 libmount: only include context on linux This is part of an attempt to make libmount buildable on non-linux. The parts that need architecture specific porting is under the context*.c files and the rest of libmount is useful/used by for example fsck. Signed-off-by: Andreas Henriksson libmount/src/Makemodule.am | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit e624bc558b9148b004c7908f12fad35038e3f5af Author: Andreas Henriksson Date: Fri Sep 19 01:36:33 2014 +0200 libmount: only invoke loopcxt on linux This is part of an attempt to make libmount buildable on non-linux. The support for /dev/loop* is Linux-specific so just disable it on non-linux for now. Signed-off-by: Andreas Henriksson libmount/src/cache.c | 2 ++ libmount/src/tab.c | 2 ++ 2 files changed, 4 insertions(+) commit 4fcb0f3fb806c9f37eebbb7fec39d993ac69ff99 Author: Robert Schiele Date: Thu Sep 18 08:09:59 2014 +0200 umount: read mountinfo if --detach-loop given Don't use the optimization not to read mountinfo from commit 6a52473ecd877227f6f7da2b95da0b51593ffec1 if --detach-loop was given since we need the name of the loop device in that case and with the optimization this is not present and thus the detach operation obviously fails. Signed-off-by: Robert Schiele libmount/src/context_umount.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit d106c83b190cce62a1684bff230f67f06edf3d0a Author: Eugene Yunak Date: Sun Sep 21 15:51:57 2014 +0300 cal: `color` option documentation should match actual behaviour misc-utils/cal.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 94b1623be345d8a86c31fdbeb5e4749fe98f5c9d Author: Sami Kerola Date: Sun Sep 14 11:12:58 2014 +0100 renice: reorder usage() option descriptions Make the Usage: and Options: sections to be in same order, which I found to be quicker to use than alphabetical order. Signed-off-by: Sami Kerola sys-utils/renice.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit ce4030e4841a6eeba33bf65e1d9b4639fa3c6774 Author: Sami Kerola Date: Sat Sep 6 00:16:05 2014 +0100 rename: add getpriority() message lookup table Signed-off-by: Sami Kerola sys-utils/renice.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) commit 80ca9e2039fda0c5002d3729eab40d45ec23058c Author: Sami Kerola Date: Fri Sep 5 23:54:17 2014 +0100 renice: fix numeric uid argument parsing The following was inconflict with what usage() tells are valid option arguments. $ renice 1 -u 1000 renice: unknown user 1000 $ id uid=1000(kerolasa) ... Reviewed-by: Karel Zak Signed-off-by: Sami Kerola sys-utils/renice.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 00b490f00239d3fa5a29cf627dc58679fb01210e Author: Sami Kerola Date: Fri Sep 5 23:33:16 2014 +0100 renice: avoid having same lines of code twice Add getprio() function to avoid duplication of a simple task. Reviewed-by: Karel Zak Signed-off-by: Sami Kerola sys-utils/renice.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit 0bb01bb0b7fc05d7eeb8a0117bc8fbecf54a88ce Author: Sami Kerola Date: Fri Sep 5 23:17:19 2014 +0100 renice: disallow --priority without pid argument Earlier a lonely priority with an argument but without pid resulted to no action and success, when the invocation should have failed. $ renice --priority 42 ; echo $? 0 Signed-off-by: Sami Kerola sys-utils/renice.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 6dcc066f3b2cad8b2bc6ed8d97da15555692ef8c Author: Sami Kerola Date: Fri Sep 5 23:11:00 2014 +0100 rename: use usage and version print out macros Signed-off-by: Sami Kerola sys-utils/renice.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit 5ebcab664ef970a99b1a2f767bdb5c7983e934d1 Author: Sami Kerola Date: Fri Sep 5 23:06:28 2014 +0100 renice: reorder functions to avoid need of function prototype Signed-off-by: Sami Kerola sys-utils/renice.c | 65 +++++++++++++++++++++++++++--------------------------- 1 file changed, 32 insertions(+), 33 deletions(-) commit 453fc7165d4f27276f626efc6f70682b41284705 Author: Sami Kerola Date: Sun Sep 14 19:07:44 2014 +0100 textual: share crypt() error message in sulogin and newgrp Signed-off-by: Sami Kerola login-utils/newgrp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8f663a674dc6a48c542299dda1d28d69e0525081 Author: Sami Kerola Date: Sun Sep 14 18:57:37 2014 +0100 newgrp: avoid use of obsolete getpass() function Read a password from user with termios, and once the password data is no longer needed ensure it gets overwrote before unallocating memory. Reference: http://man7.org/linux/man-pages/man3/getpass.3.html Reference: https://www.securecoding.cert.org/confluence/display/seccode/MSC06-C.+Beware+of+compiler+optimizations Signed-off-by: Sami Kerola login-utils/newgrp.c | 48 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) commit c829aebc397f75f24762ed046fc8e3402762b60f Author: Sami Kerola Date: Sun Sep 14 17:29:54 2014 +0100 newgrp: use libc function to read gshadow if it is available The glib versionf of getsgnam() is using /etc/nsswitch.conf, allowing the group passwords to come from external database. Signed-off-by: Sami Kerola configure.ac | 1 + login-utils/newgrp.c | 11 +++++++++++ 2 files changed, 12 insertions(+) commit 9ed11cc260a28a64de0c1fa5d94d7cd6273781a5 Author: Sami Kerola Date: Sun Sep 7 00:16:18 2014 +0100 setarch: use personality() system call when it is available Signed-off-by: Sami Kerola sys-utils/setarch.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 77eb13b96589b9e326ce1c7d74cdc4d0ea73dfa5 Author: Sami Kerola Date: Sun Sep 7 00:09:47 2014 +0100 setarch: reindent code Signed-off-by: Sami Kerola sys-utils/setarch.c | 507 +++++++++++++++++++++++++--------------------------- 1 file changed, 248 insertions(+), 259 deletions(-) commit 846c7d30b3710b193743678a3032b863dd13e9c7 Author: Sami Kerola Date: Sat Sep 6 21:33:31 2014 +0100 hwclock: remove referal to deprecated keyboard interface The KDGHWCLK has been gone quite a while. Reference: http://marc.info/?l=linux-kernel&m=104171103925897 Signed-off-by: Sami Kerola sys-utils/Makemodule.am | 3 +- sys-utils/hwclock-kd.c | 180 ------------------------------------------------ sys-utils/hwclock.c | 3 - sys-utils/hwclock.h | 1 - 4 files changed, 1 insertion(+), 186 deletions(-) commit 25a3fa815964813d3b89ac82b4f0d1ba1cb2e7bc Author: Sami Kerola Date: Sat Sep 6 18:39:24 2014 +0100 eject: make open_device() and select_speed() to use struct eject_control Signed-off-by: Sami Kerola sys-utils/eject.c | 54 +++++++++++++++++++++++++----------------------------- 1 file changed, 25 insertions(+), 29 deletions(-) commit 257a0035282947d1c08dc8b66e635f6722033693 Author: Sami Kerola Date: Sat Sep 6 17:51:35 2014 +0100 eject: add struct eject_control to remove global variables Signed-off-by: Sami Kerola sys-utils/eject.c | 394 +++++++++++++++++++++++++++--------------------------- 1 file changed, 198 insertions(+), 196 deletions(-) commit ee5de88c5169cbc658f1a4b45a32365bfa34626b Author: Sami Kerola Date: Wed Sep 3 20:46:29 2014 +0100 mountpoint: simplify if statement Returning straight after print_devno() makes the code to be more obvious and removes need for long else statement. Signed-off-by: Sami Kerola sys-utils/mountpoint.c | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) commit e9b0ac10f270c30351e4b09a2221e2d7137fa7f1 Author: Sami Kerola Date: Wed Sep 3 20:24:11 2014 +0100 mkfs.minix: fix couple compiler warnings disk-utils/mkfs.minix.c:366:3: warning: ISO C forbids 'return' with expression, in function returning void [-Wpedantic] Signed-off-by: Sami Kerola disk-utils/mkfs.minix.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit f112f41e052875bef35f7d1a3e0e9c95b56573d8 Author: Sami Kerola Date: Fri Aug 22 13:25:48 2014 +0300 mountpoint: add struct mountpoint_control This unifies variable names in different functions, and removes redundant stat() calls. Signed-off-by: Sami Kerola sys-utils/mountpoint.c | 86 ++++++++++++++++++++++++-------------------------- 1 file changed, 41 insertions(+), 45 deletions(-) commit d4ce90d47cf89d018ac6fcf50481fbafa2682c46 Author: Sami Kerola Date: Sat Aug 16 10:38:04 2014 +0100 last: improve code readability by renaming variable names Signed-off-by: Sami Kerola login-utils/last.c | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) commit 8813da1ea2d42776c98943617e673d9cf8ec8a77 Author: Sami Kerola Date: Mon Aug 11 23:04:26 2014 +0100 last: make is_phantom() when kernel config does not include audit support When kernel CONFIG_AUDIT is not set the /proc//loginuid information is not present resulting live sessions to be marked 'gone - no logout' in last(1) print out. To go-around this change makes last(1) to look /dev/ device ownership as a substitute of loginuid. The go-around seems to work fairly well, but it has it short comings. For example after closing a X window session the /dev/ttyN file seems to be owned by root, not the user who had it before entering to the X session. While that is suboptimal it is still better than an attmempt to determine uid_t by looking owner of the /proc/, that is a login(1) process running as root. The issue was found using Archlinux installation. $ pacman -Qi linux Name : linux Version : 3.16-2 [...] Build Date : Mon Aug 4 18:06:51 2014 Signed-off-by: Sami Kerola login-utils/last.c | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) commit 96c4bc4dd2a35ccb8ab10b5341fa4f90ace146f4 Author: Sami Kerola Date: Sun Aug 10 22:51:53 2014 +0100 lib: remove xgetpass() This function is not in use, and it has reference to obsoleted getpass(). Reference: http://man7.org/linux/man-pages/man3/getpass.3.html Signed-off-by: Sami Kerola include/Makemodule.am | 1 - include/xgetpass.h | 6 ------ lib/Makemodule.am | 1 - lib/xgetpass.c | 46 ---------------------------------------------- 4 files changed, 54 deletions(-) commit c6d2d74ea02d1e6d9609ecd1a56a32d91da57378 Author: Sami Kerola Date: Sun Aug 10 18:23:14 2014 +0100 include: simplify fputc_careful() in carefulputc.h New version of comparisions does the same thing as the old without being quite as difficult to understand. Signed-off-by: Sami Kerola include/carefulputc.h | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) commit 5f10333ab418efcc45605a4d961e2985cea5b8ce Author: Sami Kerola Date: Sun Aug 10 16:36:09 2014 +0100 libuuid: add extern qualifiers to uuid/uuid.h system header Signed-off-by: Sami Kerola libuuid/src/uuid.h | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) commit 29607edf655167f796e25092c04d0fd294cdebc0 Merge: 8026fa9 0a55b31 Author: Karel Zak Date: Wed Sep 17 11:56:13 2014 +0200 Merge branch 'master' of https://github.com/stevenhoneyman/util-linux commit 8026fa9bc7525c4cef02c17099e2db79284078f8 Author: Karel Zak Date: Wed Sep 17 10:56:46 2014 +0200 build-sys: use -lutil for BSD only Signed-off-by: Karel Zak configure.ac | 10 +++++++++- term-utils/Makemodule.am | 2 ++ 2 files changed, 11 insertions(+), 1 deletion(-) commit 2eaac5489b54d4e31f9c74311f8acef0a607d43e Author: Andreas Henriksson Date: Sun Aug 24 18:04:44 2014 +0200 ipcrm: add hacks to avoid FTBFS Signed-off-by: Andreas Henriksson sys-utils/ipcrm.c | 7 +++++++ 1 file changed, 7 insertions(+) commit c32270d41f3cf8f3d03f2418180e72c99e13a389 Author: Christoph Egger Date: Sun Aug 24 18:04:43 2014 +0200 agetty: fixing FTBFS on !linux (Debian util-linux 2.20.1-1.2) Handle vc flags missing on FreeBSD Fix tty creation on kFreeBSD taking patch from 2.19 Addresses-Debian-Bug: #650185 include/ttyutils.h | 40 ++++++++++++++++++++++++++++++++++++++++ term-utils/Makemodule.am | 1 + term-utils/agetty.c | 16 ++++++++++++++++ 3 files changed, 57 insertions(+) commit e4a382b777dda6977f33ba867498c2c59556dee6 Author: Aurelien Jarno Date: Sun Aug 24 18:04:42 2014 +0200 ipcs: remaining kFreeBSD hackery for building. Addresses-Debian-Bug: #527384 Signed-off-by: LaMont Jones sys-utils/ipcs.c | 2 ++ 1 file changed, 2 insertions(+) commit 62efb93f36567cf704a5139aac17fa081e0229a9 Author: Robert Millan Date: Sun Aug 24 18:04:41 2014 +0200 lib/blkdev: report correct disk size on GNU/kFreeBSD. Thanks Tuco. Addresses-Debian-Bug: 592292 lib/blkdev.c | 4 ++++ 1 file changed, 4 insertions(+) commit a3b92242ad76a7468cf508e1d878d0815c7e031f Author: Karel Zak Date: Tue Sep 16 15:30:03 2014 +0200 libmount: hide details about failed search in fstab/mtab The current code returns -errno when not found "mount /foo" in fstab and mtab does not exist (or /etc/mtab points to non-mounted /proc). This is problem because the return value is too low-level and maybe misinterpreted by top level code. It's better to always return MNT_ERR_NOFSTAB when not found in fstab/mtab. Reported-by: Dylan Cali Signed-off-by: Karel Zak libmount/src/context.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 73f2bec5f804d772592b5a443dd3e72820389cfc Author: Boris Egorov Date: Mon Sep 15 23:33:17 2014 +0700 lscpu: fix cppcheck warnings CppCheck founds a few wrong arguments in format strings and a NULL pointer dereference. Amended version with fixed strcmp() usage. Signed-off-by: Boris Egorov sys-utils/lscpu-dmi.c | 2 +- sys-utils/lscpu.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) commit 0cbdf6e22fd8a088eb300a3abe5cd604eaffad76 Author: Jaromir Capik Date: Mon Sep 8 19:42:10 2014 +0200 fdformat: fixing copy'n'paste issue in the manual The end track default is media specific, not zero. disk-utils/fdformat.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0a55b319d4f37f4a89962b56a81d38c71f79ed2f Author: Steven Honeyman Date: Mon Sep 15 21:59:31 2014 +0100 zramctl: fixed two -Wformat-security warnings (they prevented compilation if -Werror=format-security is enabled) Signed-off-by: Steven Honeyman sys-utils/zramctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bfc0b37ee983e93169571ba0acef9125dda6ef1e Author: Karel Zak Date: Tue Sep 9 15:53:37 2014 +0200 travis: whitelist branches Signed-off-by: Karel Zak .travis.yml | 5 +++++ 1 file changed, 5 insertions(+) commit 3c2e64b0ca73b90b80365842e95abb2858217e60 Author: Karel Zak Date: Fri Sep 5 10:02:45 2014 +0200 lsblk: add notes about udev to the man page Reported-by: Francis Moreau Signed-off-by: Karel Zak misc-utils/lsblk.8 | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit cb52ac9847b70bfab3b6ca45b3e81e6c89900190 Author: Michael Marineau Date: Tue Sep 2 20:39:28 2014 -0700 build-sys: create parent directory for $(PATHFILES) When building outside the source tree there is nothing to guarantee the target directory exists before writing to it. Most of the time this just happens to work because something else creates the directory but not always. For example: $ mkdir build $ cd build $ ../configure --disable-dependency-tracking $ make libuuid/uuid.pc GEN libuuid/uuid.pc /bin/sh: line 2: libuuid/uuid.pc.tmp: No such file or directory make: *** [libuuid/uuid.pc] Error 1 Makefile.am | 1 + 1 file changed, 1 insertion(+) commit 7b83dcc8a8c16c97f68e7903d265b70721a593d7 Author: Karel Zak Date: Tue Sep 2 13:51:32 2014 +0200 libfdisk: add support for sfdisk-like script format Signed-off-by: Karel Zak libfdisk/src/script.c | 216 +++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 204 insertions(+), 12 deletions(-) commit 4b43f7c96be88b65cf84c8757dc05fb87024468a Author: Karel Zak Date: Mon Sep 1 15:01:34 2014 +0200 libfdisk: (gpt) follow label-id from script Signed-off-by: Karel Zak libfdisk/src/gpt.c | 13 +++++++++++-- libfdisk/src/script.c | 4 +++- 2 files changed, 14 insertions(+), 3 deletions(-) commit 9138d6f9727b02197dfbdda7e6ac815e91244e32 Author: Karel Zak Date: Mon Sep 1 14:44:39 2014 +0200 libfdisk: add functions to apply partitiong scripts Signed-off-by: Karel Zak libfdisk/src/context.c | 2 + libfdisk/src/fdiskP.h | 3 +- libfdisk/src/init.c | 8 +- libfdisk/src/libfdisk.h | 23 +++++ libfdisk/src/script.c | 229 ++++++++++++++++++++++++++++++++++++++++++------ 5 files changed, 233 insertions(+), 32 deletions(-) commit ee50336c0365785273b2ea5f62cf4e41b7983a59 Author: Karel Zak Date: Mon Sep 1 14:42:12 2014 +0200 libfdisk: (gpt) don't align last possible LBA Signed-off-by: Karel Zak libfdisk/src/alignment.c | 16 +++++++++++++--- libfdisk/src/gpt.c | 21 ++++++++++++--------- 2 files changed, 25 insertions(+), 12 deletions(-) commit 73b7c331b3a8dcb0bd05a4019e08cbb47ba205f4 Author: Karel Zak Date: Mon Sep 1 11:16:21 2014 +0200 libfdisk: rename fdisk_dump_ to fdisk_script_ Signed-off-by: Karel Zak libfdisk/src/Makemodule.am | 12 +- libfdisk/src/dump.c | 769 --------------------------------------------- libfdisk/src/script.c | 769 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 775 insertions(+), 775 deletions(-) commit 6e5e9368a0f1277dfee9e707afa6af64605be864 Author: Karel Zak Date: Mon Sep 1 11:14:18 2014 +0200 libfdisk: fix fdisk_delete_all_partitions() Signed-off-by: Karel Zak libfdisk/src/partition.c | 1 + 1 file changed, 1 insertion(+) commit 3c0e6b1530a089c592f0149a3e976f0d403eefd7 Author: Karel Zak Date: Fri Aug 29 11:18:29 2014 +0200 libfdisk: add fdisk_apply_table() and fdisk_delete_all_partitions() Signed-off-by: Karel Zak libfdisk/src/libfdisk.h | 2 ++ libfdisk/src/partition.c | 28 ++++++++++++++++++++++++++++ libfdisk/src/table.c | 36 ++++++++++++++++++++++++++++++++++-- 3 files changed, 64 insertions(+), 2 deletions(-) commit a835add045f055f74e303061f1a5eea01d242beb Author: Karel Zak Date: Fri Aug 29 09:57:51 2014 +0200 libfdisk: improve debug messages Signed-off-by: Karel Zak libfdisk/src/dump.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b1c5a4be932b9d460a206ac295a8b49a4ff8fb37 Author: Karel Zak Date: Fri Aug 29 09:55:31 2014 +0200 libfdisk: accept dump with quotes Signed-off-by: Karel Zak libfdisk/src/dump.c | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) commit 7bc31adac4d08c5efaf3ab97d4523c4a1d8d3623 Author: Karel Zak Date: Fri Aug 29 09:19:13 2014 +0200 libfdisk: (dos) follow bootable setting when add partition Signed-off-by: Karel Zak libfdisk/src/dos.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 8d95e7e0e4991420c69578c8a15f8c95f4c1d7a7 Author: Karel Zak Date: Thu Aug 28 14:42:55 2014 +0200 libfdisk: (gpt) allow to specify uuid and name when create new partition Signed-off-by: Karel Zak libfdisk/src/gpt.c | 91 ++++++++++++++++++++++-------------------------------- 1 file changed, 37 insertions(+), 54 deletions(-) commit 080633e43dd8f7af1417b5cf05d0e8330d356b02 Author: Karel Zak Date: Thu Aug 28 14:16:56 2014 +0200 libfdisk: (gpt) set_{name,uuid} functions refactoring Signed-off-by: Karel Zak libfdisk/src/gpt.c | 55 ++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 37 insertions(+), 18 deletions(-) commit 62a9ef3e2f54d61fc5c6921c48f8ac3fe40ee5be Author: Karel Zak Date: Thu Aug 28 13:03:23 2014 +0200 libfdisk: add reference to context to dump * add fdisk_ref_context() function * context is necessary to parse label specific partition types Signed-off-by: Karel Zak libfdisk/src/context.c | 12 ++++++++++ libfdisk/src/dump.c | 60 ++++++++++++++++++++++++------------------------- libfdisk/src/libfdisk.h | 1 + 3 files changed, 43 insertions(+), 30 deletions(-) commit c7119037f07541fb952f2989b99f89f7fc051b05 Author: Karel Zak Date: Thu Aug 28 12:49:16 2014 +0200 libfdisk: use reference counting for context Signed-off-by: Karel Zak disk-utils/cfdisk.c | 2 +- disk-utils/fdisk-menu.c | 8 ++++---- disk-utils/fdisk.c | 4 ++-- libfdisk/src/context.c | 36 ++++++++++++++++++++---------------- libfdisk/src/dump.c | 4 ++-- libfdisk/src/fdiskP.h | 1 + libfdisk/src/libfdisk.h | 2 +- 7 files changed, 31 insertions(+), 26 deletions(-) commit c1ba5863954c30079ea5cbfb964f982a13514f5b Author: Karel Zak Date: Thu Aug 28 12:37:46 2014 +0200 libfdisk: extend dump parsing function Signed-off-by: Karel Zak libfdisk/src/dump.c | 147 +++++++++++++++++++++++++++++++++++++++++++----- libfdisk/src/fdiskP.h | 1 - libfdisk/src/libfdisk.h | 1 + libfdisk/src/parttype.c | 17 +++++- 4 files changed, 147 insertions(+), 19 deletions(-) commit afef428f406790898666ba9810e9e3f4f836b8c8 Author: Karel Zak Date: Thu Aug 28 10:45:58 2014 +0200 libfdisk: (dos) fix typo Reported-by: https://github.com/Mikachu Signed-off-by: Karel Zak libfdisk/src/dos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d947f85df49fa89153955464b54f8bd037ddf2db Author: Karel Zak Date: Thu Aug 28 08:39:54 2014 +0200 include/optutils: fix typo Reported-by: Rafael Ferreira Signed-off-by: Karel Zak include/optutils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 59af21c3f294b9fdec62914568de0455cf884623 Author: Karel Zak Date: Tue Aug 26 22:19:11 2014 +0200 cfdisk: fix typo in the previous commit Signed-off-by: Karel Zak disk-utils/cfdisk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ce3134dfdd3a9feb614050cbf742cec4c97e984b Author: Karel Zak Date: Tue Aug 26 17:03:11 2014 +0200 cfdisk: wrong interpretation of yes in non-english language Reported-by: tnut@nutyx.org Signed-off-by: Karel Zak disk-utils/cfdisk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 613596b3873a0d7d45396e066eee097b082ff833 Author: Karel Zak Date: Tue Aug 26 16:35:16 2014 +0200 libfdisk: (dos) fix logical partitions add/delete code If you delete logical partition and then create a new one than fdisk (and cfdisk) might write EBR to the first sector on the device. That's wrong of course; because you will lost MBR (primary partitions). (Probably introduced by commit bcddbe96882b88d53b6bc0495e7322c0820a5122 where code completely clears EBR stuff.) Reported-by: Michał Górny Signed-off-by: Karel Zak libfdisk/src/dos.c | 127 ++++++++++++++++++++++++++++++++++------------------- 1 file changed, 82 insertions(+), 45 deletions(-) commit 1d691b258e34c6d8956209e408211350edefcb93 Author: Karel Zak Date: Mon Aug 25 15:33:02 2014 +0200 libfdisk: vary basic dump parsing functions Signed-off-by: Karel Zak libfdisk/src/dump.c | 307 ++++++++++++++++++++++++++++++++++++++++++++++++++- libfdisk/src/table.c | 1 - 2 files changed, 303 insertions(+), 5 deletions(-) commit 22e9e9c8e95e609a20f24ec60fcd706f601e0be7 Author: Karel Zak Date: Mon Aug 25 15:31:53 2014 +0200 libblkid: move string trim function to strutils.h Signed-off-by: Karel Zak include/strutils.h | 37 +++++++++++++++++++++++++++++++++++++ libblkid/src/probe.c | 23 ++++------------------- 2 files changed, 41 insertions(+), 19 deletions(-) commit cb4d6804677518bd701a8055d76e32eb4bc48b54 Author: Karel Zak Date: Fri Aug 22 14:43:52 2014 +0200 libfdisk: basic fdisk_dump_* functions Signed-off-by: Karel Zak libfdisk/src/Makemodule.am | 7 + libfdisk/src/dos.c | 4 +- libfdisk/src/dump.c | 343 +++++++++++++++++++++++++++++++++++++++++++++ libfdisk/src/fdiskP.h | 5 +- libfdisk/src/init.c | 1 + libfdisk/src/partition.c | 2 +- 6 files changed, 357 insertions(+), 5 deletions(-) commit 385810d22a31fe968fcf76e1b608ac3031ddd4fa Author: Karel Zak Date: Fri Aug 22 10:25:35 2014 +0200 libfdisk: remove debug dump function, cleanup API The fdisk_dump_* prefix will be used for sfdisk-like functionality. The patch also add FDISK_ prefix to fdisk_get_unit() options. Signed-off-by: Karel Zak disk-utils/fdisk.c | 2 +- libfdisk/src/libfdisk.h | 7 ++----- libfdisk/src/partition.c | 24 ------------------------ libfdisk/src/sgi.c | 6 +++--- libfdisk/src/sun.c | 10 +++++----- libfdisk/src/table.c | 23 +---------------------- 6 files changed, 12 insertions(+), 60 deletions(-) commit 44e9d52e52f3aa9bb08c0e8b195fefccf1d2f922 Author: Dave Reisner Date: Thu Aug 21 12:16:57 2014 -0400 mountpoint: clarify that it works on files fef4dfa174 removed the restriction that the argument must explicitly be a directory, so let's fix up the documentation to reflect that. Signed-off-by: Karel Zak sys-utils/mountpoint.1 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit fef4dfa1746a8fe35a878bf9753bfd76cfa7e247 Author: Dave Reisner Date: Thu Aug 21 08:48:12 2014 -0400 mountpoint: drop S_ISDIR check Files can be mountpoints, too. sys-utils/mountpoint.c | 6 ------ 1 file changed, 6 deletions(-) commit e4ea53de0b6bc31303fdfc9ebb546bce4527c5d6 Author: Karel Zak Date: Thu Aug 21 14:58:40 2014 +0200 libmount: use -t for type.subtype in helpers API References: https://github.com/karelzak/util-linux/issues/116 Signed-off-by: Karel Zak libmount/src/context_mount.c | 4 +++- libmount/src/context_umount.c | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) commit 7be73458b8af001ffe842a30d678a97b0e1d3418 Author: Sami Kerola Date: Wed Aug 20 22:06:58 2014 +0300 tests: apply travis clang PATH workaround As seen in Travis build log the clang is not found, causing one of the tests to fail. This change adds a workaround from Travis issue 2607 to util-linux. Reference: https://travis-ci.org/karelzak/util-linux/jobs/33056101#L3630 Reference: https://github.com/travis-ci/travis-ci/issues/2607 Signed-off-by: Sami Kerola .travis.yml | 6 ++++++ 1 file changed, 6 insertions(+) commit 59c6ac0b92c6f21f9304f7d9b8a9c2bc8430e41f Author: Karel Zak Date: Wed Aug 20 12:24:40 2014 +0200 logger: use generic --id= Signed-off-by: Karel Zak misc-utils/logger.1 | 10 +++++----- misc-utils/logger.c | 42 ++++++++++++------------------------------ 2 files changed, 17 insertions(+), 35 deletions(-) commit 0d9865d06eb3ca873cca8c553532d30edb4385a7 Merge: 6b11aad b09697c Author: Karel Zak Date: Wed Aug 20 12:09:38 2014 +0200 Merge remote-tracking branch 'sami/logger' commit 6b11aad26b29d4984965ff1044184117c0955843 Author: Karel Zak Date: Wed Aug 20 11:43:02 2014 +0200 libfdisk: fix fdisk_get_optimal_iosize() and update tests Signed-off-by: Karel Zak disk-utils/fdisk.c | 2 +- libfdisk/src/context.c | 6 +++++- tests/expected/fdisk/bsd | 2 -- tests/expected/fdisk/gpt | 2 -- tests/expected/fdisk/mbr-dos-mode | 4 ---- tests/expected/fdisk/mbr-nondos-mode | 4 ---- tests/expected/fdisk/oddinput | 1 - tests/expected/fdisk/sunlabel | 2 -- 8 files changed, 6 insertions(+), 17 deletions(-) commit a80886e93c1d25dbc43ce208aeeac697c813cb60 Author: Aurelien Jarno Date: Fri Aug 15 00:26:24 2014 +0200 tests: fix fdisk/bsd for the two possible sectors/offsets BSD disklabels depend on the endianess, but also on the architecture as one can see in include/pt-bsd.h with the BSD_LABELSECTOR and BSD_LABELOFFSET #define. This cause the testsuite to fail on the affected architectures as the disk image is not the same as the expected result. Commit 180b3a7e tried to fix the endianess, but the special PowerPC case has been chosen as a reference, so it still fails for example on MIPS BE or S/390. This patch fixes the testsuite by converting the md5sums to the expected values, still depending on the endianess, but also for the two possible sectors/offsets. This has been tested on Alpha, MIPS, PowerPC and x86-64, so this should cover all 4 cases. Cc: Andreas Henriksson Signed-off-by: Aurelien Jarno tests/ts/fdisk/bsd | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) commit 42f15e9848dc07e86a2b80c742a0179aaced6c71 Author: Benno Schulenberg Date: Tue Aug 12 22:15:18 2014 +0200 docs: bring the chrt and taskset man pages closer to standard formatting Signed-off-by: Benno Schulenberg schedutils/chrt.1 | 83 ++++++++++++++++++++++++++-------------------------- schedutils/taskset.1 | 52 ++++++++++++++++---------------- 2 files changed, 68 insertions(+), 67 deletions(-) commit a7560c065529a93bf975ad451f1847669e63574b Author: Benno Schulenberg Date: Tue Aug 12 22:15:17 2014 +0200 textual: make the license of chrt and taskset slightly more explicit This makes it match the license of the man pages. While there, also tweak some other comment lines. Signed-off-by: Benno Schulenberg schedutils/chrt.c | 10 ++++------ schedutils/taskset.c | 5 ++--- 2 files changed, 6 insertions(+), 9 deletions(-) commit 5aab9a1aee71c1ddc139f0ce3ff6fa95555090d4 Author: Benno Schulenberg Date: Tue Aug 12 22:15:16 2014 +0200 docs: make the man-page licenses of chrt and taskset match their intent Signed-off-by: Benno Schulenberg schedutils/chrt.1 | 5 ++--- schedutils/taskset.1 | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) commit 882be6261067b4642094f0ed796871601d526285 Author: Benno Schulenberg Date: Mon Aug 11 22:23:39 2014 +0200 docs: improve the description of --size in the man page of zramctl Signed-off-by: Benno Schulenberg sys-utils/zramctl.8 | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit b09697c3e0753f242083b852df7dc22535d6ebc4 Author: Sami Kerola Date: Sat Aug 9 09:09:16 2014 +0100 docs: mentintion default udp and tcp ports logger is using The fact that 'syslog tcp/514' does not exist in RFS's, which has lead to 'syslog-conn 601/tcp' be used in place could be a suprice and should be told in manual. Signed-off-by: Sami Kerola misc-utils/logger.1 | 7 +++++++ 1 file changed, 7 insertions(+) commit 46ee14df664c8eff323320e5373325d5ebf7134b Author: Sami Kerola Date: Sat Aug 9 08:57:51 2014 +0100 logger: set function arguments read-only when possible Signed-off-by: Sami Kerola misc-utils/logger.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 77c3bd5bf63093dfe54206be867c3d0c1fe46510 Author: Sami Kerola Date: Sat Aug 9 08:38:58 2014 +0100 logger: optimize string initializations Setting whole array to be completely full of nulls cannot be as quick as making the only significant member of the array when needed. Signed-off-by: Sami Kerola misc-utils/logger.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 35d3619793aad012bedc8ad7bff47218e2b5d663 Author: Sami Kerola Date: Sat Aug 9 01:04:50 2014 +0100 logger: remove openlog(3) options One variable less, and more importantly bit operations become unnecessary in if statements. Signed-off-by: Sami Kerola misc-utils/logger.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 1d57503378bdcd838365d625f6d2d0a09da9c29d Author: Sami Kerola Date: Sat Aug 9 00:49:46 2014 +0100 logger: allow use of --id=ppid when logging locally There is no obvious way to make syslog(3) to print both pid or ppid, so duplicate the libc syslog() to logger. Making the ppid printing work using unix socket has side effect of local becoming capable to use both rfc format output, which is hopefully seen as good thing. The syslog_local() is format wise one-to-one copy with glibc syslog(3) format. Signed-off-by: Sami Kerola misc-utils/logger.c | 38 +++++++++++++++++++++++++++----------- 1 file changed, 27 insertions(+), 11 deletions(-) commit e6d0c4c1acfafed3fac1907b90d6f1077b581736 Author: Karel Zak Date: Fri Aug 15 12:38:02 2014 +0200 fdisk: add independent debug stuff Signed-off-by: Karel Zak disk-utils/fdisk-menu.c | 32 ++++++++++++++++---------------- disk-utils/fdisk.c | 17 ++++++++++++++--- disk-utils/fdisk.h | 19 ++++++++++++++++--- 3 files changed, 46 insertions(+), 22 deletions(-) commit 2ae3d038b9fa4ec79cf6319a83093b817796f524 Author: Karel Zak Date: Fri Aug 15 12:34:42 2014 +0200 libfdisk: move fdisk_ask_partnum() to API Signed-off-by: Karel Zak libfdisk/src/ask.c | 11 ++++++++++- libfdisk/src/fdiskP.h | 2 -- libfdisk/src/libfdisk.h | 1 + 3 files changed, 11 insertions(+), 3 deletions(-) commit 8eccde20ddf041b062139e235ffd7a70cd6041c7 Author: Karel Zak Date: Fri Aug 15 12:16:55 2014 +0200 fdisk: use libfdisk public API only Signed-off-by: Karel Zak disk-utils/cfdisk.c | 2 +- disk-utils/fdisk-menu.c | 49 +++++++++++++++++++++++++++++++------------------ disk-utils/fdisk.c | 48 +++++++++++++++++++++++++++++------------------- 3 files changed, 61 insertions(+), 38 deletions(-) commit 1753a234a1ca891a2eba34ecf7eac2ef22eedfef Author: Karel Zak Date: Fri Aug 15 12:16:27 2014 +0200 libfdisk: add geometry to API, cleanup Signed-off-by: Karel Zak libfdisk/src/context.c | 70 ++++++++++++++++++++++++++++++++++++++++++++++--- libfdisk/src/label.c | 7 +++-- libfdisk/src/libfdisk.h | 11 ++++++-- 3 files changed, 78 insertions(+), 10 deletions(-) commit 57c83d63e499079e585641352513d61fd80393d4 Author: Karel Zak Date: Fri Aug 15 10:50:33 2014 +0200 cfdisk: use only public libfdisk API Signed-off-by: Karel Zak disk-utils/cfdisk.c | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) commit 4af064f3fca711c009467fbc9b415c4cc077f993 Author: Karel Zak Date: Fri Aug 15 10:49:51 2014 +0200 libfdisk: fdisk_label_is_labeltype() Signed-off-by: Karel Zak libfdisk/src/context.c | 8 ++++---- libfdisk/src/label.c | 12 ++++++++++++ libfdisk/src/libfdisk.h | 1 + 3 files changed, 17 insertions(+), 4 deletions(-) commit 5175ae87384e3136497c33ffa7bd1b2c2e14af2e Author: Karel Zak Date: Thu Aug 14 21:04:01 2014 +0200 libfdisk: more docs Signed-off-by: Karel Zak libfdisk/src/alignment.c | 6 +++ libfdisk/src/context.c | 49 +++++++++++++++++++- libfdisk/src/label.c | 96 ++++++++++++++++++++++++++++++++++++--- libfdisk/src/partition.c | 116 ++++++++++++++++++++++++++++++++++++++++++++++- libfdisk/src/table.c | 12 +++-- 5 files changed, 267 insertions(+), 12 deletions(-) commit a745611d695016ede822380bce0aa92350fc80a3 Author: Karel Zak Date: Thu Aug 14 13:28:37 2014 +0200 libfdisk: final parttype API cleanup Signed-off-by: Karel Zak disk-utils/cfdisk.c | 27 ++++----- disk-utils/fdisk.c | 52 +++++++++-------- libfdisk/src/bsd.c | 10 ++-- libfdisk/src/dos.c | 23 ++++---- libfdisk/src/fdiskP.h | 2 +- libfdisk/src/gpt.c | 2 +- libfdisk/src/label.c | 37 ------------ libfdisk/src/libfdisk.h | 36 +++++++----- libfdisk/src/partition.c | 6 +- libfdisk/src/parttype.c | 142 +++++++++++++++++++++++++++++++++++------------ libfdisk/src/sgi.c | 21 +++---- libfdisk/src/sun.c | 22 ++++---- 12 files changed, 215 insertions(+), 165 deletions(-) commit 5ab37600712d476156160ba7fe1b5d51e52b33cd Author: Karel Zak Date: Thu Aug 14 12:01:38 2014 +0200 libfdisk: move get_parttypes to label API Signed-off-by: Karel Zak disk-utils/cfdisk.c | 14 +++++----- disk-utils/fdisk.c | 3 ++- libfdisk/src/label.c | 71 ++++++++++++++++++++++++++++++++++++------------- libfdisk/src/libfdisk.h | 5 +++- libfdisk/src/parttype.c | 23 +++------------- 5 files changed, 70 insertions(+), 46 deletions(-) commit 773aae5c51e9573be5c66e14b4a33e4dde5f5f95 Author: Karel Zak Date: Thu Aug 14 11:33:46 2014 +0200 libfdisk: (gpt) allow to specify attr bit by API Signed-off-by: Karel Zak libfdisk/src/gpt.c | 11 ++++++++++- libfdisk/src/libfdisk.h | 22 ++++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) commit 11ee1177ffa723200f77cbb640da49122ef04ec9 Author: Karel Zak Date: Thu Aug 14 00:27:28 2014 +0200 libfdisk: make it possible to get fields for all labes Signed-off-by: Karel Zak disk-utils/cfdisk.c | 2 +- disk-utils/fdisk.c | 2 +- libfdisk/src/label.c | 80 ++++++++++++++++++++++++++----------------------- libfdisk/src/libfdisk.h | 6 ++-- 4 files changed, 48 insertions(+), 42 deletions(-) commit 72d2965c4470b2c740c409db37ed0369bbea98ee Author: Karel Zak Date: Thu Aug 14 00:09:48 2014 +0200 libfdisk: cleanup label geometry API Signed-off-by: Karel Zak disk-utils/fdisk.c | 3 ++- libfdisk/src/context.c | 18 ++++++++++++++++++ libfdisk/src/fdiskP.h | 1 + libfdisk/src/label.c | 36 +++++++++++++----------------------- libfdisk/src/libfdisk.h | 4 +--- 5 files changed, 35 insertions(+), 27 deletions(-) commit aa36c2cf2cb331c06c1ac5950b3b70ccbf7b0111 Author: Karel Zak Date: Wed Aug 13 23:57:54 2014 +0200 libfdisk: cleanup fdisk_is_label stuff Signed-off-by: Karel Zak disk-utils/cfdisk.c | 10 +++++----- disk-utils/fdisk-menu.c | 10 +++++----- disk-utils/fdisk.c | 10 +++++----- libfdisk/src/bsd.c | 10 +++++----- libfdisk/src/context.c | 29 +++++++++++++++++++++++++++-- libfdisk/src/dos.c | 40 ++++++++++++++++++++-------------------- libfdisk/src/gpt.c | 36 ++++++++++++++++++------------------ libfdisk/src/label.c | 25 +++++++------------------ libfdisk/src/libfdisk.h | 11 +++++++---- libfdisk/src/sgi.c | 20 ++++++++++---------- libfdisk/src/sun.c | 26 +++++++++++++------------- 11 files changed, 122 insertions(+), 105 deletions(-) commit 8d605c884a12f419e6491308f8be68c71776ab7e Author: Karel Zak Date: Wed Aug 13 23:27:00 2014 +0200 libfdisk: clean up API (alignment.c) Signed-off-by: Karel Zak disk-utils/fdisk.c | 6 ++-- libfdisk/src/alignment.c | 77 +++++++++++++++++++++++++++++++++++++++--------- libfdisk/src/context.c | 4 +-- libfdisk/src/dos.c | 1 - libfdisk/src/fdiskP.h | 28 ++---------------- libfdisk/src/libfdisk.h | 32 +++++++++++++------- 6 files changed, 93 insertions(+), 55 deletions(-) commit 6a6321360deaf2661d3a826e3e077d1fced416db Author: Karel Zak Date: Wed Aug 13 22:26:53 2014 +0200 libfdisk: clean up API (context.c) Signed-off-by: Karel Zak disk-utils/cfdisk.c | 20 ++-- disk-utils/fdisk-menu.c | 30 ++--- disk-utils/fdisk.c | 28 ++--- libfdisk/src/alignment.c | 6 +- libfdisk/src/bsd.c | 20 ++-- libfdisk/src/context.c | 278 ++++++++++++++++++++++++++++++++++++++++------- libfdisk/src/dos.c | 28 ++--- libfdisk/src/fdiskP.h | 10 +- libfdisk/src/gpt.c | 2 +- libfdisk/src/label.c | 20 ++-- libfdisk/src/libfdisk.h | 66 ++++++----- libfdisk/src/partition.c | 2 +- libfdisk/src/sgi.c | 20 ++-- libfdisk/src/sun.c | 26 ++--- 14 files changed, 380 insertions(+), 176 deletions(-) commit 14620822c031f17823b546d2e59e60c3cd247748 Author: Karel Zak Date: Wed Aug 13 21:21:46 2014 +0200 cfdisk: add libfdisk independent debug stuff Now it's possible to use CFDISK_DEBUG=0xffff ./cfdisk to debug only cfdisk UI. Signed-off-by: Karel Zak disk-utils/cfdisk.c | 88 +++++++++++++++++++++++++++++++++-------------------- 1 file changed, 55 insertions(+), 33 deletions(-) commit 143efbb9117fcd9dd6c24a6e28a6aeb99b9a6e14 Author: Ondrej Oprala Date: Wed Aug 13 14:36:45 2014 +0200 tests: add debug tests Signed-off-by: Karel Zak Signed-off-by: Ondrej Oprala tests/expected/libmount/debug-set-from-code | 1 + tests/expected/libmount/debug-set-from-env-int | 1 + tests/expected/libmount/debug-set-from-env-str | 1 + tests/ts/libmount/debug | 30 ++++++++++++++++++++++++++ 4 files changed, 33 insertions(+) commit 1e063303291467e0004a48a9625e31df11890b78 Author: Karel Zak Date: Wed Aug 13 14:19:21 2014 +0200 include/debug: allow to speficy empty masknames Signed-off-by: Karel Zak include/debug.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 03e4220d29d088f04b5a08aa005c1809978c620d Author: Karel Zak Date: Wed Aug 13 14:13:32 2014 +0200 include/debug: cleanup masks Signed-off-by: Karel Zak include/debug.h | 1 + libblkid/src/init.c | 4 ++-- libfdisk/src/init.c | 4 ++-- libmount/src/init.c | 4 +++- 4 files changed, 8 insertions(+), 5 deletions(-) commit 6d577b70896fdbf2a99d675e72121b1b5e78ea8b Author: Karel Zak Date: Wed Aug 13 13:51:42 2014 +0200 include/debug: make masknames optional Signed-off-by: Karel Zak include/debug.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 14ad2353ccabc330412baff5fe86592f2618cdee Author: Ondrej Oprala Date: Thu Jul 31 13:23:07 2014 +0200 libs/debug: accept human readable names for _DEBUG= For example $ LIBMOUNT_DEBUG=tab,cache findmnt to debug only TAB and CACHE subsystem. Signed-off-by: Ondrej Oprala Signed-off-by: Karel Zak include/debug.h | 42 +++++++++++++++++++++++++++++++++++++++++- libblkid/src/init.c | 19 +++++++++++++++++++ libfdisk/src/init.c | 12 ++++++++++++ libmount/src/Makemodule.am | 8 +++++++- libmount/src/init.c | 44 +++++++++++++++++++++++++++++++++++++++++++- libsmartcols/src/init.c | 9 +++++++++ tests/commands.sh | 1 + 7 files changed, 132 insertions(+), 3 deletions(-) commit bd85d11fbadfbf1b60e2dcfec5e12ad929641996 Author: Karel Zak Date: Wed Aug 13 11:12:27 2014 +0200 libfdisk: rename fdisk_column to fdisk_field .. to make the API and fdisk(s) code more readable. Signed-off-by: Karel Zak disk-utils/cfdisk.c | 60 ++++++++++++++++++++++----------------------- disk-utils/fdisk.c | 33 +++++++++++-------------- libfdisk/src/bsd.c | 26 ++++++++++---------- libfdisk/src/dos.c | 30 +++++++++++------------ libfdisk/src/fdiskP.h | 24 +++++++++--------- libfdisk/src/gpt.c | 28 ++++++++++----------- libfdisk/src/label.c | 64 ++++++++++++++++++++++++------------------------ libfdisk/src/libfdisk.h | 52 +++++++++++++++++++++------------------ libfdisk/src/partition.c | 38 ++++++++++++++-------------- libfdisk/src/sgi.c | 24 +++++++++--------- libfdisk/src/sun.c | 25 +++++++++---------- 11 files changed, 199 insertions(+), 205 deletions(-) commit d44115f3b5866f76ceaefd0d145468e68d7e2688 Author: Karel Zak Date: Wed Aug 13 10:10:11 2014 +0200 libfdisk: remove dependence on libsmartcols It's application business to convert libfdisk_table to string. Signed-off-by: Karel Zak configure.ac | 2 +- disk-utils/Makemodule.am | 5 +++ disk-utils/cfdisk.c | 20 ++++++--- disk-utils/fdisk.c | 109 +++++++++++++++++++++++++++++++++++---------- libfdisk/src/Makemodule.am | 10 ----- libfdisk/src/bsd.c | 17 ++++--- libfdisk/src/dos.c | 21 +++++---- libfdisk/src/fdiskP.h | 3 +- libfdisk/src/gpt.c | 21 +++++---- libfdisk/src/label.c | 27 +++++++++-- libfdisk/src/libfdisk.h | 10 +++-- libfdisk/src/sgi.c | 17 ++++--- libfdisk/src/sun.c | 18 ++++---- libfdisk/src/table.c | 94 -------------------------------------- 14 files changed, 178 insertions(+), 196 deletions(-) commit b8731ebcf2d825fd64ad772c1e5b5bb154ab0255 Author: Karel Zak Date: Wed Aug 13 10:09:08 2014 +0200 lib/colors: add function to return color from scheme Signed-off-by: Karel Zak include/colors.h | 2 ++ lib/colors.c | 33 ++++++++++++++++++++++++++------- 2 files changed, 28 insertions(+), 7 deletions(-) commit 413b91d190457fd7c0a280022c2d9926bb456ff1 Author: Karel Zak Date: Mon Aug 11 15:59:04 2014 +0200 libblkid: (gpt) fix PT offset Signed-off-by: Karel Zak libblkid/src/partitions/gpt.c | 3 ++- libblkid/src/partitions/partitions.c | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) commit fe122a522540e7314e49796885e562d4ee3b20dc Author: Stanislav Brabec Date: Fri Aug 8 19:30:55 2014 +0200 Fix bash-completion Makemodule options bash-completion/Makemodule.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3a9ec12d6664527fad9c56347c88f3447d6c0856 Author: Sami Kerola Date: Wed Aug 6 23:04:31 2014 +0100 tests: make ipcs limit calculations work when numbers are large Test suite failed when I ran it with kernel 3.16. Error is the following. tests/ts/ipcs/limits2: line 31: [: 18446744073692774399: integer expression expected Reference: http://lkml.iu.edu/hypermail/linux/kernel/1406.0/01869.html Signed-off-by: Sami Kerola tests/ts/ipcs/limits2 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3077ff49f3c69ae69cee576699f93d5854a7dee1 Author: Sami Kerola Date: Wed Aug 6 21:52:18 2014 +0100 swapon: remove invalid error string print outs To avoid messages like this: $ swapon /dev/zram0 swapon: /dev/zram0: read swap header failed: Success Signed-off-by: Sami Kerola sys-utils/swapon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1d23119072a3a117e7bb83694bd30b9d50961374 Author: Benno Schulenberg Date: Wed Aug 6 22:35:06 2014 +0200 textual: remove some inconsistent periods from error messages While doing so, also improve translatability and some wordings. Signed-off-by: Benno Schulenberg disk-utils/sfdisk.c | 6 +++--- include/optutils.h | 8 ++++---- login-utils/lslogins.c | 2 +- login-utils/sulogin.c | 4 ++-- misc-utils/findmnt.c | 2 +- misc-utils/logger.c | 2 +- misc-utils/lsblk.c | 4 ++-- sys-utils/fallocate.c | 2 +- sys-utils/fstrim.c | 2 +- term-utils/agetty.c | 2 +- text-utils/hexdump.c | 2 +- 11 files changed, 18 insertions(+), 18 deletions(-) commit 7845b91dbc7690064a2be6df690e4aaba728fb04 Author: Mike Frysinger Date: Tue Aug 5 18:59:50 2014 -0400 lscpu: clean up vmware inline asm This code is not PIC clean which means it fails to build on hardened 32bit x86 systems (i.e. building as PIE). While here, optimize the existing cpuid logic slightly. URL: https://bugs.gentoo.org/518936 Signed-off-by: Mike Frysinger sys-utils/lscpu.c | 36 ++++++++++++++++++++++++++---------- 1 file changed, 26 insertions(+), 10 deletions(-) commit 1fa6c3e0b963ef5da43607fcec682541b40dcab1 Author: Sami Kerola Date: Wed Aug 6 10:35:30 2014 +0100 zramctl: improve option combination error messaging Use of --algorithm or --streams is not expected to work without reseting device, that happens when --size is specified, so ensure the former options to be combined with the later. [kzak@redhat.com: - make it more generic] Signed-off-by: Sami Kerola Signed-off-by: Karel Zak sys-utils/zramctl.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 2b0c19b03c1a2bf5238aa2543e8d7dd505304ed0 Author: Sami Kerola Date: Sun Aug 3 15:10:50 2014 +0100 zramctl: add bash completion script Signed-off-by: Sami Kerola bash-completion/Makemodule.am | 3 +++ bash-completion/zramctl | 51 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) commit 342436c66a3321112262626e2207250be1d73872 Author: Karel Zak Date: Mon Aug 11 14:39:46 2014 +0200 zramctl: cannonicalize devname when no fullpath specified Signed-off-by: Karel Zak sys-utils/zramctl.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 929c7b2817e1e4aca72e60b02b891e86dcea9c21 Author: Sami Kerola Date: Sun Aug 3 13:42:32 2014 +0100 zramctl: improve error message Signed-off-by: Sami Kerola sys-utils/zramctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 116c9ce23d21c940cdea342cb21823952508f1d5 Author: Karel Zak Date: Mon Aug 11 14:26:20 2014 +0200 zramctl: fail status printout when device does not exist Signed-off-by: Karel Zak sys-utils/zramctl.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) commit ef567176b1f0578f2ca97470b47ada677c0086e2 Author: Sami Kerola Date: Sat Aug 2 18:43:42 2014 +0100 zramctl: add details to --size option documentation Signed-off-by: Sami Kerola Signed-off-by: Karel Zak sys-utils/zramctl.8 | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 4fdde144f0acc042fa1fc56db84f4dc50afde1a9 Author: Karel Zak Date: Fri Aug 8 12:35:20 2014 +0200 fdisk: update tests and clean up output Signed-off-by: Karel Zak disk-utils/fdisk.c | 8 +++----- tests/expected/blkid/md-raid0-whole | 1 + tests/expected/blkid/md-raid1-part | 1 + tests/expected/blkid/md-raid1-whole | 1 + tests/expected/fdisk/align-512-4K | 1 + tests/expected/fdisk/align-512-4K-63 | 1 + tests/expected/fdisk/align-512-4K-md | 2 ++ tests/expected/fdisk/align-512-512 | 1 + tests/expected/fdisk/align-512-512-topology | 1 + tests/expected/fdisk/mbr-dos-mode | 2 -- tests/expected/fdisk/mbr-nondos-mode | 3 --- tests/expected/fdisk/mbr-sort | 3 --- tests/expected/fdisk/oddinput | 1 - 13 files changed, 12 insertions(+), 14 deletions(-) commit 8d8a02398a01d8d2930676c992bc91d7ceb8bc17 Author: Karel Zak Date: Fri Aug 8 11:56:06 2014 +0200 libblkid: (gpt) use real sector size to set PTMAGIC_OFFSET So stupid and 5 years old bug... Signed-off-by: Karel Zak libblkid/src/partitions/gpt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c9400a1ea727c183f92ad8d394605fdbe65fc476 Author: Karel Zak Date: Fri Aug 8 11:33:28 2014 +0200 fdisk: always print warning for mis-aligned partitions This patch restores the original fdisk behavior and always prints information about misaligned partitions in 'p'print output. Signed-off-by: Karel Zak disk-utils/fdisk.c | 13 ++++++++++++- libfdisk/src/alignment.c | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) commit cd8414f7a13aca0b3ea150b473b83f00819b312f Author: Karel Zak Date: Wed Aug 6 15:39:27 2014 +0200 cfdisk: move curs_set(1) to ui_end() This is probably correct to have curs_set() in ui_end(), but according to Martin it does not work with slang library from signal handler. Reported-by: Martin Steigerwald Signed-off-by: Karel Zak disk-utils/cfdisk.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 423c0d75ece4379d1f4600537f6397525a138021 Author: Karel Zak Date: Wed Aug 6 14:55:42 2014 +0200 zramctl: remove extra \n from usage() Signed-off-by: Karel Zak sys-utils/zramctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1b19ea31a375b8eaf816b28d6bb99d4ee24faba2 Author: Steven Honeyman Date: Sun Aug 3 16:22:24 2014 +0100 docs: fix inconsistencies in man pages Signed-off-by: Karel Zak disk-utils/addpart.8 | 3 +-- disk-utils/delpart.8 | 3 +-- disk-utils/partx.8 | 3 +-- disk-utils/resizepart.8 | 3 +-- sys-utils/prlimit.1 | 3 +-- sys-utils/readprofile.8 | 2 +- text-utils/col.1 | 2 +- text-utils/column.1 | 2 +- 8 files changed, 8 insertions(+), 13 deletions(-) commit c52155aec5857467307bcba213a24aac354e5114 Merge: b07ca51 82233c2 Author: Karel Zak Date: Wed Aug 6 09:04:29 2014 +0200 Merge branch 'master' of https://github.com/entertainyou/util-linux commit b07ca5160c1afecb1de7a42f8d0d58c5185fb4ad Author: Karel Zak Date: Wed Aug 6 09:02:09 2014 +0200 zramctl: fix typo Signed-off-by: Karel Zak sys-utils/zramctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 82233c2a0a4cce89307061bdc7ffdb58c4936d4f Author: HUANG Wei Date: Wed Aug 6 12:20:18 2014 +0800 hexdump: Fix parse format of "byte count without repetition count" text-utils/hexdump-parse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6ed7f0112746beb320d35b92dd760970779d2d9a Author: Karel Zak Date: Tue Aug 5 15:47:36 2014 +0200 zramctl: fix typo Reported-by: Steven Honeyman Signed-off-by: Karel Zak sys-utils/zramctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aacbd1533b221494df0653ce3ea9256fffa7d275 Merge: f0b3e6c b2b61ef Author: Karel Zak Date: Tue Aug 5 15:39:32 2014 +0200 Merge branch 'master' of https://github.com/ottxor/util-linux commit f0b3e6c2f9c6a8a6e9c3e926d8e2df3389220aa7 Author: Benno Schulenberg Date: Fri Aug 1 14:19:08 2014 +0200 docs: improve the wording and formatting of the zramctl man page Especially fix the mistaken short option -h for --noheadings. Signed-off-by: Benno Schulenberg sys-utils/zramctl.8 | 61 +++++++++++++++++++++++++++++++---------------------- 1 file changed, 36 insertions(+), 25 deletions(-) commit 1c35e62517f5de3506556cd97251f417790565bc Author: Benno Schulenberg Date: Fri Aug 1 14:19:07 2014 +0200 zramctl: fix the wording of some message strings Signed-off-by: Benno Schulenberg sys-utils/zramctl.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) commit 152635b182d48a569fad51fd65a1c77550fe4f1a Author: Sami Kerola Date: Thu Jul 31 23:05:25 2014 +0100 tests: kill output message change Commit 09af3db48e01e5744f15fd8a2395e0fed36526ea changed how a missing process is reported, which caused kill test to fail when the test suite is ran as root. Reference: https://travis-ci.org/karelzak/util-linux/jobs/31312170 Signed-off-by: Sami Kerola tests/expected/kill/all_processes | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 851c2bd55d9aca823ac14ee875ed76c08031e5f9 Author: Benno Schulenberg Date: Thu Jul 31 22:43:29 2014 +0200 docs: restore the mention of uhelper= and helper= in man page of umount Signed-off-by: Benno Schulenberg sys-utils/umount.8 | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit b2b61efcfaa6030111d97d630900f77cd78b0e23 Author: Christoph Junghans Date: Fri Aug 1 11:37:08 2014 -0600 build-sys: fix double prefix with explict --libdir * with configure --prefix=$HOME --libdir=$HOME usrlib_execdir ends up being ${exec_prefix}/${libbir}, which is double-prefixed * fix: use explict given ${libbir} if is matches ${prefix}/* Signed-off-by: Christoph Junghans configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0624d8406b8e8e64f7a1c6dcea7af648d99ef08d Author: Karel Zak Date: Fri Aug 1 12:09:55 2014 +0200 zrmactl: add new command to control /dev/zramN devices Co-Author: Timofey Titovets Signed-off-by: Karel Zak .gitignore | 1 + configure.ac | 8 + sys-utils/Makemodule.am | 9 + sys-utils/zramctl.8 | 106 +++++++++ sys-utils/zramctl.c | 571 ++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 695 insertions(+) commit d990deac553f881c07832247021c734c3bf320db Author: Karel Zak Date: Fri Aug 1 12:09:33 2014 +0200 lib/ismounted: make it more compatible with lsblk output Signed-off-by: Karel Zak lib/ismounted.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6c987ca9d7ce31544e55541c680d11ac9b47b22f Author: Karel Zak Date: Fri Aug 1 12:08:44 2014 +0200 lib/sysfs: allow to write to sysfs attributes Signed-off-by: Karel Zak include/sysfs.h | 3 +++ lib/sysfs.c | 48 ++++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 45 insertions(+), 6 deletions(-) commit f9afb37d1acbe3d192a3ac8017fa4fd424221244 Merge: 210d459 a009e86 Author: Karel Zak Date: Thu Jul 31 10:55:38 2014 +0200 Merge branch 'travis' of git://github.com/kerolasa/lelux-utiliteetit * 'travis' of git://github.com/kerolasa/lelux-utiliteetit: tests: fix rename subdir check that was failing in travis build-sys: remove swap-common.h from sys-utils/Makemodule.am commit 210d4595dea9ff998a04ba07b3d07694abd32d24 Author: Sergei Antonov Date: Thu Jul 31 12:46:06 2014 +0200 libfdisk: (gpt) add Microsoft Storage Spaces GUID Storage Spaces is Microsoft's logical volume management. It has been around since Windows 8. Cc: Karel Zak Signed-off-by: Sergei Antonov libfdisk/src/gpt.c | 1 + 1 file changed, 1 insertion(+) commit a009e86e8edc311b2cf3f8baea151d34c687527c Author: Sami Kerola Date: Wed Jul 30 22:21:08 2014 +0100 tests: fix rename subdir check that was failing in travis Apparently some or all travis build servers has a bit older coreutils version. The coreutils v8.13 added a feature to readlink that allows user to specify multiple arguments. Earlier versions gave exactly the type of error travis_script log has. +readlink: extra operand `rename_aa/sublink.2' +Try `readlink --help' for more information. The commit 0f85e0535bd4e6d19fadca182e4d57660b6bb57b introduced the travis readlink issue, and has caused failures for 8 days in row (builds 192 - 213). Reference: https://travis-ci.org/karelzak/util-linux/builds Reviewed-by: Bernhard Voelker Signed-off-by: Sami Kerola tests/ts/rename/subdir | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 3d595f92c81059d7653389fad5cb023b4e4335d4 Author: Sami Kerola Date: Wed Jul 30 20:48:46 2014 +0100 build-sys: remove swap-common.h from sys-utils/Makemodule.am The commit 25a365e moved the file to include/ Signed-off-by: Sami Kerola sys-utils/Makemodule.am | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 80b037cc6f138a8095459afc0b7f16f586a40b57 Author: Karel Zak Date: Tue Jul 29 13:53:26 2014 +0200 fdformat: clean up usage() Signed-off-by: Karel Zak disk-utils/fdformat.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) commit e0402441a143533d33d3c450471b2cd655407d77 Author: Jaromir Capik Date: Mon Jul 28 20:47:09 2014 +0200 fdformat: Add new switches -f/--from, -t/--to, -r/--repair This commit introduces a support for user configurable from/to track and a basic repair mode for broken floppies. It also fixes a recently introduced bug that causes a line breakage when printing the track number. Signed-off-by: Karel Zak disk-utils/Makemodule.am | 1 + disk-utils/fdformat.8 | 11 ++- disk-utils/fdformat.c | 210 ++++++++++++++++++++++++++++++++--------------- 3 files changed, 157 insertions(+), 65 deletions(-) commit 426ee7cb786d6941b2bfccf992da486051a467dd Author: Karel Zak Date: Tue Jul 29 13:17:35 2014 +0200 docs: update TODO Signed-off-by: Karel Zak Documentation/TODO | 5 +++++ 1 file changed, 5 insertions(+) commit 47f42c1d14901b8bc2eb477fb0082bcbdd5e79af Author: Karel Zak Date: Tue Jul 29 13:07:44 2014 +0200 nsenter: allow to use --set{uid,gid} for all namespaces Now it's possible to set UID and GID for user namespaces only. This patch removes this restriction and allow to use --set{uid,gid} in all cases. The default for user namespaces is still GID=0, UID=0. Reported-by: Tomas Doran Signed-off-by: Karel Zak sys-utils/nsenter.1 | 9 +++++++-- sys-utils/nsenter.c | 20 +++++++++++++------- 2 files changed, 20 insertions(+), 9 deletions(-) commit be0e5d2c5570fca7d7ce7afa326d7d7283472066 Author: Andreas Henriksson Date: Sat Jul 26 22:44:01 2014 +0200 tests: allow non-inotify tailf to keep up When tailf is not using inotify, it seems to sleep for 0.25s between checks. Just giving a 0.1s time window between update and removal of the input file thus gives little chance for tailf to succeed. Similar between startup and append to file, make sure initial content is read before appending additional data by bumping the time. This should possibly be bumped much larger to make sure that the tailf process actually gets a chance to run at all in the given time window. Otherwise it might fail on really slow/overloaded machines. The drawback would then ofcourse be to increase the time it takes to run the testsuite. Signed-off-by: Andreas Henriksson tests/ts/tailf/simple | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b45413a860d5f043fbfc14653960411ff6e88497 Author: Benno Schulenberg Date: Sun Jul 27 20:59:00 2014 +0200 docs: bring the runuser and su man pages closer to standard formatting Signed-off-by: Benno Schulenberg login-utils/runuser.1 | 77 +++++++++++++++++++++++++-------------------------- login-utils/su.1 | 49 ++++++++++++++++---------------- 2 files changed, 61 insertions(+), 65 deletions(-) commit 75ca43bbb20dcb41e01e82afde3dbdf658fff01e Author: Benno Schulenberg Date: Sun Jul 27 20:58:59 2014 +0200 docs: give the man page of utmpdump the proper User Commands header Also bring the formatting closer to standard. Signed-off-by: Benno Schulenberg login-utils/utmpdump.1 | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) commit bf967a6cabc782dd7fd0ed8a2f8ea4d3ad0dae2f Author: Benno Schulenberg Date: Sun Jul 27 20:58:58 2014 +0200 docs: improve the formatting of the chfn and chsh man pages Also fix a pasting mistake where the chfn man page suggested to use ypchsh or lchsh for non-local entries. Signed-off-by: Benno Schulenberg login-utils/chfn.1 | 38 +++++++++++++++++--------------------- login-utils/chsh.1 | 24 ++++++++++-------------- 2 files changed, 27 insertions(+), 35 deletions(-) commit d6983300a2f587ba85973fc32a9bcf3c2e975cd9 Author: Benno Schulenberg Date: Sun Jul 27 20:58:57 2014 +0200 docs: remove all mention of helper= and uhelper= from umount man page Signed-off-by: Benno Schulenberg sys-utils/umount.8 | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) commit ae4cc2adea9ed411cbadbe23ff4a6c9ff79afeda Author: Benno Schulenberg Date: Sun Jul 27 20:58:56 2014 +0200 docs: sort the options in the man pages of hwclock and uuidd Also improve the formatting a bit. Signed-off-by: Benno Schulenberg misc-utils/uuidd.8.in | 52 +++---- sys-utils/hwclock.8.in | 409 ++++++++++++++++++++++++------------------------- 2 files changed, 228 insertions(+), 233 deletions(-) commit 61ef38eb1b2c19bfa310073a0718c586b982ffad Author: Benno Schulenberg Date: Sun Jul 27 20:58:55 2014 +0200 docs: bring the rtcwake man page closer to standard formatting Also sort the options alphabetically, and use the standard comma instead of the vertical bar to separate short from long option. Signed-off-by: Benno Schulenberg sys-utils/rtcwake.8.in | 152 +++++++++++++++++++++++++------------------------ 1 file changed, 77 insertions(+), 75 deletions(-) commit 7eec45f2d868b89aa3f9059aae1f340a099824d0 Author: Karel Zak Date: Tue Jul 29 12:13:24 2014 +0200 logger: fix untranslated message Signed-off-by: Karel Zak misc-utils/logger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1042ce18dfb4fa89daae3c508f66f942be99d0ce Author: Karel Zak Date: Tue Jul 29 12:08:47 2014 +0200 logger: require --{server,socket} to remote rfc542/rfc3164 log Signed-off-by: Karel Zak misc-utils/logger.c | 5 +++++ 1 file changed, 5 insertions(+) commit b928bb109a3d027d1816981b59a4502ef885b1cc Author: Karel Zak Date: Tue Jul 29 11:57:01 2014 +0200 Revert "wall: wrap message header when it exceeds 79 characters" This reverts commit 93d7baf250495b2385c369afd48137a7363ae4c2. Ooops... it wasn't my plan to merge this patch. Sorry. term-utils/wall.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit e598686d3c0925bb79989684ad1034e094f52c4c Author: Karel Zak Date: Tue Jul 29 11:49:00 2014 +0200 logger: fix -i=ppid For short options (-i) the optional argument contains '='. Signed-off-by: Karel Zak misc-utils/logger.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 852feb7299fd517d546a13e4c0884597b77d0cfa Author: Karel Zak Date: Tue Jul 29 11:43:01 2014 +0200 logger: clean up strings usage - use allocated buffers to compose the final messages - initialize static buffers to zero - remove strlen-after-sprintf Signed-off-by: Karel Zak misc-utils/logger.c | 66 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 38 insertions(+), 28 deletions(-) commit aaf1b5e80153137277b586efd52922736ee46bf6 Merge: 68030a7 93d7baf Author: Karel Zak Date: Tue Jul 29 10:22:21 2014 +0200 Merge branch 'logger' of git://github.com/kerolasa/lelux-utiliteetit * 'logger' of git://github.com/kerolasa/lelux-utiliteetit: wall: wrap message header when it exceeds 79 characters logger: add hostname to rfc3164 message logger: warn when --file and command line message are combined logger: improve readablity of pencode() function logger: make --stderr print remote server messages logger: add process --id=parent optional argument docs: add logger protocol notes to manual page logger: add rfc5424 support logger: tidy up main() by adding small functions and ctl data logger: add function pointer to choose how logging is done docs: make logger.1 facilities and levels easier to read logger: refactor long if clause logger: do not rely only getlogin(3) telling who ran the command logger: fix indentation issues logger: ensure program writes everything to syslog file descriptor commit 68030a76d7f7f3214138407efb615cfe6e0cf170 Author: Karel Zak Date: Mon Jul 28 13:00:54 2014 +0200 hwclock: check for permissions before use clock interface Reported-by: Benno Schulenberg Signed-off-by: Karel Zak sys-utils/hwclock.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 93d7baf250495b2385c369afd48137a7363ae4c2 Author: Sami Kerola Date: Sun Jul 27 19:52:25 2014 +0100 wall: wrap message header when it exceeds 79 characters Header truncation started to happen more often after commit d81c30553f4fb49173d38f69edff4b0b67a18b65 that made the header to be longer. Signed-off-by: Sami Kerola term-utils/wall.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 133bf77bc28db78dee5b200c428c104a5727398a Author: Sami Kerola Date: Sun Jul 27 18:33:22 2014 +0100 logger: add hostname to rfc3164 message This makes the obsolete protocol a little bit more compliant with the internet standard, but few should care now when we have rfc5424 support, and rfc3164 feels broken. For example it requires hostname to be not fully qualified, which is hard to understand, and should make users to prefer the new protocol. Reported-by: Frank Thilo Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=705217 CC: Andreas Henriksson Signed-off-by: Sami Kerola misc-utils/logger.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 3d9f4b1d234e4a38ac6a5619c4cd93fc66d1d4c6 Author: Sami Kerola Date: Sun Jul 27 18:01:09 2014 +0100 logger: warn when --file and command line message are combined When --file is combined with command line arguments the later has silently been ignored. This commit makes user to be aware the logger will not use command line arguments when --file is specified. Reported-by: "Daniel 'DaB.' Baur" Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=467244 CC: Andreas Henriksson Signed-off-by: Sami Kerola misc-utils/logger.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 2e0fd22d5da49127167b2ff00d8e678a2bf8ac4b Author: Sami Kerola Date: Sat Jul 26 15:19:26 2014 +0100 logger: improve readablity of pencode() function Signed-off-by: Sami Kerola misc-utils/logger.c | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) commit 4288f9f12c892499f08ba4673c34dc1bedc5dc59 Author: Sami Kerola Date: Sat Jun 28 23:49:06 2014 +0100 logger: make --stderr print remote server messages Users wish to see the message should include also remote messages, not only the one sent to locally via libc function. Signed-off-by: Sami Kerola misc-utils/logger.c | 4 ++++ 1 file changed, 4 insertions(+) commit aab5b44405b9a6ada92e419e5a84cc0d1d4afee9 Author: Sami Kerola Date: Sat Jun 28 16:08:28 2014 +0100 logger: add process --id=parent optional argument When scripts send several messages they will be easier to group together when parent process id is printed rather than id of the each logger process. Signed-off-by: Sami Kerola misc-utils/logger.1 | 10 +++++++--- misc-utils/logger.c | 35 ++++++++++++++++++++++++++++------- 2 files changed, 35 insertions(+), 10 deletions(-) commit d9b38f6baf4a6dde2daf113b26691d2a909ca19d Author: Sami Kerola Date: Sat Jun 28 15:37:39 2014 +0100 docs: add logger protocol notes to manual page Inform about rfc5424 support, how to control what it includes to submission, and that it is the new default when sending syslog messages to remote server without specifying protocol. Signed-off-by: Sami Kerola bash-completion/logger | 2 +- misc-utils/logger.1 | 28 +++++++++++++++++++++++++++- 2 files changed, 28 insertions(+), 2 deletions(-) commit 4de2e8a03859aaab2c25dc98f33409cd28de6acc Author: Sami Kerola Date: Thu Jun 26 16:13:55 2014 +0100 logger: add rfc5424 support Add support the more recent syslog protocol and make it default. The older BSD syslog protocol can still be used with option --rfc3164. Protocols are meaningful only when messages are sent to remote syslog server. Requested-by: Kodiak Firesmith Signed-off-by: Sami Kerola misc-utils/logger.c | 119 ++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 110 insertions(+), 9 deletions(-) commit c68a1cb490c5a4c142fef5eb153bf003f36226d5 Author: Sami Kerola Date: Sat Jul 26 13:10:25 2014 +0100 logger: tidy up main() by adding small functions and ctl data Add logger_open(), logger_command_line(), logger_stdin(), and logger_close() functions, and move all remaining option argument assignments to control structure. Proposed-by: Karel Zak Signed-off-by: Sami Kerola misc-utils/logger.c | 164 ++++++++++++++++++++++++++++++---------------------- 1 file changed, 95 insertions(+), 69 deletions(-) commit cfa77d2643bc4db2b04ecab3690d22982f605e79 Author: Sami Kerola Date: Thu Jun 26 21:48:25 2014 +0100 logger: add function pointer to choose how logging is done This change paves way to adding support for both RFC 3164 and RFC 5424 syslog protocols. Signed-off-by: Sami Kerola misc-utils/logger.c | 105 +++++++++++++++++++++++++++------------------------- 1 file changed, 54 insertions(+), 51 deletions(-) commit 4c3ac8fe5291367b6e997e8febbad5d33175aca4 Author: Sami Kerola Date: Mon Jun 23 21:26:02 2014 +0100 docs: make logger.1 facilities and levels easier to read Most people read vertical list a lot quicker than horizontal. Signed-off-by: Sami Kerola misc-utils/logger.1 | 61 +++++++++++++++++++++++++++++++++++------------------ 1 file changed, 41 insertions(+), 20 deletions(-) commit c462a8caf2b885df4a8e769d9056d8f63b82f6be Author: Sami Kerola Date: Sun Jun 22 23:43:09 2014 +0100 logger: refactor long if clause When if clause that continues throughout whole function it usually can be shorten to immediate action, e.g., in this case return on the spot not at end of the function. Signed-off-by: Sami Kerola misc-utils/logger.c | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) commit 019b97024fde3f07eaf541eef990762483369a11 Author: Sami Kerola Date: Sun Jun 22 23:29:36 2014 +0100 logger: do not rely only getlogin(3) telling who ran the command The getlogin(3) is known not to always work, and when that happens it is reasonable to try determine user of name by looking process owner and passwd information. Reference: http://man7.org/linux/man-pages/man3/getlogin.3.html Signed-off-by: Sami Kerola misc-utils/logger.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) commit d8b616c216113ba4986a9d537719e5f434dca18b Author: Sami Kerola Date: Sun Jun 22 23:02:43 2014 +0100 logger: fix indentation issues Signed-off-by: Sami Kerola misc-utils/logger.c | 98 ++++++++++++++++++++++++++--------------------------- 1 file changed, 49 insertions(+), 49 deletions(-) commit 633493beaf40ee88cdfb9db62a04a60f2a56c066 Author: Sami Kerola Date: Sun Jun 22 22:59:57 2014 +0100 logger: ensure program writes everything to syslog file descriptor It is fair assumption messages an user is asking to be wrote will be attempted to be wrote as hard as possible. Signed-off-by: Sami Kerola misc-utils/logger.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 6443dd43da28885302449aaca4b9c69c7f9585af Author: Stef Walter Date: Thu Jul 3 17:44:41 2014 +0200 agetty: Reprompt and reprint /etc/issue when asked Add an 'agetty --reload' command which asks all running agetty commands to display their prompts again. Several of the /etc/issue escape codes such as \4 and \S depend on variable data which 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. We never want this to occur once the user has started typing a user name. So we detect when the user starts typing, after which no further reprompting occurs after that point. [kzak@redhat.com: - add #ifdefs to make it usable on non-inotify systems, - use futimens() with NULL timespec - add --reaload to usage()] Signed-off-by: Stef Walter Signed-off-by: Karel Zak configure.ac | 1 + term-utils/agetty.8 | 6 +++ term-utils/agetty.c | 141 +++++++++++++++++++++++++++++++++++++++++++++++----- 3 files changed, 136 insertions(+), 12 deletions(-) commit 25a365ef5a8291929351c40ccadd0d20b9cb1831 Author: Sami Kerola Date: Sat Jul 26 11:53:06 2014 +0100 swaplabel: move swapon-common to include directory This fixes the following compiler warning. disk-utils/swaplabel.c:175:2: warning: implicit declaration of function 'get_swap_prober' [-Wimplicit-function-declaration] Signed-off-by: Sami Kerola Signed-off-by: Karel Zak disk-utils/swaplabel.c | 1 + include/Makemodule.am | 1 + include/swapon-common.h | 28 ++++++++++++++++++++++++++++ sys-utils/swapon-common.h | 28 ---------------------------- 4 files changed, 30 insertions(+), 28 deletions(-) commit d79654f43d4a1b7d4bd0fb7149ee9834b440c15a Author: Karel Zak Date: Mon Jul 28 12:26:17 2014 +0200 build-sys: add -Wimplicit-function-declaration to compiler warnings Signed-off-by: Karel Zak configure.ac | 1 + 1 file changed, 1 insertion(+) commit 52d92543ffb8efb56036f316a1072d8fbba62c38 Author: Karel Zak Date: Mon Jul 28 11:57:10 2014 +0200 fdisk: fix -l [] * don't use err(), but warn(), so don't stop after the first error * display all errors when "-l ..." specified * display only EACCES errors when list whole disks from /proc/partitions ("fdisk -l" ) Reported-by: Boian Bonev Addresses: https://github.com/karelzak/util-linux/pull/106 Signed-off-by: Karel Zak disk-utils/fdisk.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 5adf126ef2c370cd14299f6ed0a151c77b8acc3f Author: Lauri Nurmi Date: Sat Jul 26 12:35:54 2014 +0300 hwclock: use pluralized translations. sys-utils/hwclock.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 140d91471dde15d583f45ca704a32b4c192618a5 Author: Lauri Nurmi Date: Sat Jul 26 12:43:42 2014 +0300 more: replace ad-hoc support for plurals with gettext plurals. text-utils/more.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit 58ac82ae2f5abbe44b8bbffc1b877d5e83931e55 Author: Lauri Nurmi Date: Fri Jul 11 21:51:03 2014 +0300 sfdisk: use pluralized translation. disk-utils/sfdisk.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6070a9853ae68b9fd558d4c1b7de241e3e60acf1 Author: Benno Schulenberg Date: Fri Jul 25 14:55:04 2014 +0200 various: erase all traces of the long-obsolete ext filesystem The same argument as for xiafs: dead for over ten years. Signed-off-by: Benno Schulenberg bash-completion/findmnt | 2 +- bash-completion/mount | 2 +- bash-completion/umount | 3 ++- sys-utils/mount.8 | 13 +++---------- 4 files changed, 7 insertions(+), 13 deletions(-) commit 556c9c484288e9d1514a44ea0a3a72b6cc8c9232 Author: Benno Schulenberg Date: Fri Jul 25 14:55:03 2014 +0200 various: erase all traces of the long-obsolete xiafs The xiafs filesystem was removed from the kernel fifteen years ago, and any kernel that contained it reached end of life ten years ago. It's time to stop mentioning it in the mount man page and elsewhere. Signed-off-by: Benno Schulenberg bash-completion/findmnt | 3 +-- bash-completion/mount | 2 +- bash-completion/umount | 2 +- disk-utils/fsck.8 | 1 - disk-utils/fsck.c | 3 +-- disk-utils/mkfs.8 | 3 +-- sys-utils/mount.8 | 5 ----- 7 files changed, 5 insertions(+), 14 deletions(-) commit 00d1cc1ddff5b4800e64ba5894584159e4c7dd59 Author: Benno Schulenberg Date: Fri Jul 25 14:55:02 2014 +0200 docs: improve some wordings in the man page of mount Also sort the command-line options alphabetically (with the customary exception of -V and -h). Signed-off-by: Benno Schulenberg sys-utils/mount.8 | 336 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 177 insertions(+), 159 deletions(-) commit 5e43af7e345310f734cbfb5a0bd6ee040cf178a7 Author: Benno Schulenberg Date: Fri Jul 25 14:55:01 2014 +0200 docs: fix some things that were overlooked during the first pass Mainly more option sorting, some formatting adjustments, and the adding of a missing --version here and there. Signed-off-by: Benno Schulenberg sys-utils/dmesg.1 | 29 ++++++++------ sys-utils/eject.1 | 94 +++++++++++++++++++++++++++------------------ sys-utils/fallocate.1 | 104 +++++++++++++++++++++++++++----------------------- sys-utils/flock.1 | 61 +++++++++++++++-------------- sys-utils/ipcmk.1 | 10 ++--- sys-utils/ipcrm.1 | 48 +++++++++++++---------- sys-utils/renice.1 | 6 +-- sys-utils/setpriv.1 | 102 ++++++++++++++++++++++++------------------------- sys-utils/setsid.1 | 9 ++++- sys-utils/unshare.1 | 9 +++-- 10 files changed, 260 insertions(+), 212 deletions(-) commit 4f4daf8f90a7f4b01ce3edbf620d58058aaf2efd Author: Andreas Henriksson Date: Fri Jul 25 14:22:01 2014 +0200 cfdisk: reenable cursor when quitting After quitting cfdisk (built with slang) the cursor would be missing at the command prompt. Reported-by: Martin Steigerwald Addresses-Debian-Bug: #755991 Signed-off-by: Andreas Henriksson disk-utils/cfdisk.c | 1 + 1 file changed, 1 insertion(+) commit eee79f284382cff628672292e8a0f2bb908ac452 Author: Andreas Henriksson Date: Thu Jul 24 21:28:44 2014 +0200 tests: Fall back on host/getent in ts_resolve_host Neither dig or nslookup would be my first option for resolving, so add the host utility of ISC/bind fame and the (slow) getent utility shipped with libc. This extends the conditions introduced in ... commit a98de9696e1a898f925c9154e5693e73aec0779d Author: Ruediger Meier Date: Wed Jun 11 19:28:20 2014 +0200 tests: skip some last tests if no dns support ... and should help us not skip certain tests when we have network connection but none of dig or nslookup available. Signed-off-by: Andreas Henriksson tests/functions.sh | 6 ++++++ 1 file changed, 6 insertions(+) commit ada74f3f322e672ed4f546eec0b7539566e09a90 Author: Bernhard Voelker Date: Thu Jul 24 15:30:54 2014 +0200 mcookie: avoid format warning "gcc (SUSE Linux) 4.8.1 20130909 [gcc-4_8-branch revision 202388]" issued the following warning: warning: format ‘%zu’ expects argument of type ‘size_t’, \ but argument 3 has type ‘int’ [-Wformat=] * misc-utils/mcookie.c (main): Change format from %zu to %d. RAND_BYTES is an enum, thus of type int. Signed-off-by: Bernhard Voelker misc-utils/mcookie.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e9b6e76a267760bf821ae3c815b0f09874a016db Author: Karel Zak Date: Fri Jul 25 13:08:41 2014 +0200 mount: clean up -t info in mount.8 and fstab.5 * remove the huge and unmaintained list of filesystems, just keep only very basic FS types in the man pages * add info about command delimited lists to fstab.5 Signed-off-by: Karel Zak sys-utils/fstab.5 | 41 ++---------------- sys-utils/mount.8 | 122 ++++++++++++++++++------------------------------------ 2 files changed, 45 insertions(+), 118 deletions(-) commit 1cd4e61e6cfc05b52bad509f1444fe77f5bb11e8 Author: Karel Zak Date: Fri Jul 25 12:40:16 2014 +0200 tests: add mount -t test Signed-off-by: Karel Zak tests/expected/mount/fslists | 1 + tests/expected/mount/fslists-more-types | 1 + tests/expected/mount/fslists-more-types-fstab | 1 + tests/expected/mount/fslists-one-type | 1 + tests/expected/mount/fslists-type-pattern | 1 + tests/expected/mount/fslists-type-pattern-neg | 1 + tests/ts/mount/fslists | 97 +++++++++++++++++++++++++++ 7 files changed, 103 insertions(+) commit 64a7e209802434c069a662edbd77bda1e85530c5 Author: Karel Zak Date: Fri Jul 25 12:28:34 2014 +0200 libmount: don't use /{proc,ext}/filesystems when more fs types specified # mkfs.ext4 /dev/sda1 # mount -t foo,bar /dev/sda1 /mnt successfully mount the device, this is unexpected as extN is no between wanted (by -t specified) filesystems. Summary about -t: * "mount -t foo" mount(2) with "foo" type * "mount -t foo,bar" try mount(2) with "foo" or "bar" * "mount -t foo,auto" try mount(2) with "foo" or ask libblkid for the type * "mount -t nofoo,bar" try types from /{etc,proc}/filesystems, but exclude "foo" and "bar" Note that more filesystems may be specified in fstab (as comma delimited list). The stuff from fstab is always interpreted as list and never as a pattern ("no" prefix makes no sense in fstab). Reported-by: Benno Schulenberg Signed-off-by: Karel Zak libmount/src/context_mount.c | 98 +++++++++++++++++++++++++------------------- sys-utils/mount.c | 5 ++- 2 files changed, 59 insertions(+), 44 deletions(-) commit 5cbbdfbfe8618f64990ed321e1174e2ba9456601 Author: Andreas Henriksson Date: Wed Jul 23 19:39:02 2014 +0200 build-sys: fix switch_root/pivot_root cut-n-paste error in configure.ac The "linux only" check for pivot_root seems to suffer from a cut-n-paste problem from the earlier switch_root part. Signed-off-by: Andreas Henriksson configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 09af3db48e01e5744f15fd8a2395e0fed36526ea Author: Benno Schulenberg Date: Tue Jul 22 22:56:27 2014 +0200 textual: fix some typos and inconsistencies in various messages Fixing plain typos, miswordings, inconsistent periods, some missing angular brackets, and a proper pluralization (even when it involves a constant, because for some languages the precise value matters). Signed-off-by: Benno Schulenberg disk-utils/cfdisk.c | 6 +++--- disk-utils/fdisk.c | 2 +- disk-utils/fsck.cramfs.c | 2 +- libfdisk/src/bsd.c | 2 +- libfdisk/src/gpt.c | 6 +++--- libfdisk/src/sgi.c | 2 +- login-utils/chfn.c | 2 +- login-utils/chsh.c | 4 ++-- login-utils/last.c | 6 +++--- login-utils/lslogins.c | 2 +- login-utils/su-common.c | 6 +++--- misc-utils/kill.c | 2 +- misc-utils/logger.c | 4 ++-- misc-utils/mcookie.c | 7 ++++--- misc-utils/namei.c | 2 +- misc-utils/rename.c | 4 ++-- misc-utils/whereis.c | 2 +- misc-utils/wipefs.c | 4 ++-- 18 files changed, 33 insertions(+), 32 deletions(-) commit a3c74d88e126552b457e964bfa288f39df8dd81a Author: Karel Zak Date: Tue Jul 22 12:29:38 2014 +0200 swapon: don't print errors as data in smartcols table Signed-off-by: Karel Zak sys-utils/swapon.c | 4 ---- 1 file changed, 4 deletions(-) commit 7c1fa4691fc40540450638bc9c15d9bd8f8d07cc Author: Karel Zak Date: Tue Jul 22 12:24:56 2014 +0200 swapon: don't use empty strings for smartcols output The libsmartcols is smart enough to accept NULL for empty fields rather than empty strings. Signed-off-by: Karel Zak sys-utils/swapon.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 5db57cfc469b45ada0162a64d627ce25a3d2431f Author: Sami Kerola Date: Tue Jul 1 21:40:04 2014 +0100 swapon: share get_swap_prober() with swaplabel to print uuid and label The swapon(8) listing was almost complete, apart from label and uuid. This change moves the code from swaplabel(8) to shared scope to be used for printouts in other swap commands, such as swapon. Adding this feature to lsblk(8) was a consideration, but lsblk is not interested of swapfiles, so the swapon seems like a better option to add this information. Signed-off-by: Sami Kerola disk-utils/Makemodule.am | 6 +++--- disk-utils/swaplabel.c | 46 ---------------------------------------------- sys-utils/Makemodule.am | 14 ++++++++++---- sys-utils/swapon-common.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ sys-utils/swapon-common.h | 2 ++ sys-utils/swapon.c | 38 ++++++++++++++++++++++++++++++++++++-- 6 files changed, 95 insertions(+), 55 deletions(-) commit bd86cb1679a3faf7e901d845ff79f57f8b809703 Merge: ccef451 36a8a11 Author: Karel Zak Date: Tue Jul 22 12:12:52 2014 +0200 Merge branch 'rename' of git://github.com/kerolasa/lelux-utiliteetit * 'rename' of git://github.com/kerolasa/lelux-utiliteetit: tests: add rename(1) return value check rename: use function pointer to select file or symlink operation rename: continue despite something failed tests: add rename(1) checks tests: use ts_cd everywhere to change direcrory tests: add function to change directory reliable way rename: allow renaming in subdirectories commit ccef45168b2fb5f95ab064cfd8c327a813c8f0f2 Merge: 3df45c7 b5af3ee Author: Karel Zak Date: Tue Jul 22 12:01:50 2014 +0200 Merge branch 'master' of https://github.com/yurchor/util-linux * 'master' of https://github.com/yurchor/util-linux: Fix typos in user visible messages commit 3df45c7cdc118e8c51a9a59650d955739f930829 Merge: 1687d0a a5c523a Author: Karel Zak Date: Tue Jul 22 11:58:21 2014 +0200 Merge branch 'ioclt' of https://github.com/lanurmi/util-linux commit 36a8a11a7f0389ea075940ac095a6fff8bd7d43b Author: Sami Kerola Date: Sat Jun 28 19:11:30 2014 +0100 tests: add rename(1) return value check Signed-off-by: Sami Kerola tests/expected/rename/exit_codes | 7 +++++++ tests/ts/rename/exit_codes | 41 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) commit 5651128abddd2808a4b4b87a28866d444ef6c374 Author: Sami Kerola Date: Mon May 26 00:41:06 2014 +0100 rename: use function pointer to select file or symlink operation Add separate functions to different functionality, and add a function for the stuff that is in common for both. Signed-off-by: Sami Kerola misc-utils/rename.c | 142 +++++++++++++++++++++++++--------------------------- 1 file changed, 67 insertions(+), 75 deletions(-) commit d6cf9e1669468f12a3d65edd3bf5a2bf2a2a5bd5 Author: Sami Kerola Date: Sat Jun 28 18:42:49 2014 +0100 rename: continue despite something failed Try to do all file operations even when one or some of them fail, and use exit value to inform what happen. Signed-off-by: Sami Kerola misc-utils/rename.1 | 20 +++++++++++++++ misc-utils/rename.c | 72 +++++++++++++++++++++++++++++++++++++---------------- 2 files changed, 71 insertions(+), 21 deletions(-) commit 0f85e0535bd4e6d19fadca182e4d57660b6bb57b Author: Sami Kerola Date: Sun May 25 22:52:24 2014 +0100 tests: add rename(1) checks Check basic file moves, symlink relinking, and both file moves and symlinks when operations are have directory in destination path. Reviewed-by: Ruediger Meier Reviewed-by: Karel Zak Signed-off-by: Sami Kerola tests/commands.sh | 1 + tests/expected/rename/basic | 4 ++++ tests/expected/rename/subdir | 20 ++++++++++++++++++++ tests/expected/rename/symlink | 3 +++ tests/ts/rename/basic | 41 +++++++++++++++++++++++++++++++++++++++++ tests/ts/rename/subdir | 42 ++++++++++++++++++++++++++++++++++++++++++ tests/ts/rename/symlink | 41 +++++++++++++++++++++++++++++++++++++++++ 7 files changed, 152 insertions(+) commit 7f1f10ab7012f08e64ae73b3fbbb6ec9fce3ddd6 Author: Sami Kerola Date: Sun Jun 22 10:43:00 2014 +0100 tests: use ts_cd everywhere to change direcrory Signed-off-by: Sami Kerola tests/ts/build-sys/config | 6 +++--- tests/ts/column/fillrow | 2 +- tests/ts/column/invalid-multibyte | 2 +- tests/ts/column/multi-file | 2 +- tests/ts/column/separator_table | 2 +- tests/ts/cramfs/mkfs | 8 ++++---- tests/ts/namei/logic | 2 +- 7 files changed, 12 insertions(+), 12 deletions(-) commit 723c70434bd307522530e203e70dd113842cb474 Author: Sami Kerola Date: Sun Jun 22 10:20:54 2014 +0100 tests: add function to change directory reliable way Without arguments bash cd will move to $HOME. Ensure also that when directory is assumed to be changed the current directory and intented destination are the same location. Reference: http://www.spinics.net/lists/util-linux-ng/msg09509.html Signed-off-by: Sami Kerola tests/functions.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit bd9ced628bb8621babc1d677669c14277845745d Author: Sami Kerola Date: Sun May 25 22:17:25 2014 +0100 rename: allow renaming in subdirectories Earlier the rename(1) considered path as possible string to be renamed, could lead to an issue with none existing destination. See below for demonstration of this issue. After this change all directory elements are ignored when the match finding happens. $ cd $(mktemp -d) $ mkdir aa ab $ touch a{a,b}/aa $ rename -v a x */aa rename: aa/aa: rename to xa/aa failed: No such file or directory Signed-off-by: Sami Kerola misc-utils/rename.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit a5c523a0e7974b9e8655536e6ffd90cf6e3afb3e Author: Lauri Nurmi Date: Fri Jul 11 22:52:09 2014 +0300 Fix typo "ioclt" in various files. include/blkdev.h | 2 +- include/loopdev.h | 2 +- login-utils/login.c | 2 +- misc-utils/wipefs.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit b5af3ee835ef0abcd29cffe5556223332e7c33b9 Author: Yuri Chornoivan Date: Thu Jul 3 09:33:15 2014 +0300 Fix typos in user visible messages login-utils/lslogins.c | 2 +- misc-utils/lsblk.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)