summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* lsblk: fix --inverse --listKarel Zak2017-04-132-1/+9
| | | | | | | Let's follow --inverse dependencies although --list output requested. Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1441175 Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: add scols_sort_table_by_tree()Karel Zak2017-04-134-2/+57
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lsblk: move scols_flags to lsblk control structKarel Zak2017-04-131-18/+19
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* agetty: various man-page fixesJ William Piggott2017-04-101-24/+36
| | | | Signed-off-by: J William Piggott <elseifthen@gmx.com>
* chmem: don't use scanf format for printfRuediger Meier2017-04-101-1/+1
| | | | | | | | | | | The compiler had not complained here because both macros are probably the same. But gettext issued a funny warning: sys-utils/chmem.c:67: warning: Although being used in a format string position, the msgid is not a valid C format string. Reason: The string ends in the middle of a directive. CC: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* misc: fix some printf format stringsRuediger Meier2017-04-103-6/+7
| | | | | | | | | | | Fix compiler warnings seen on Linux/i586 and OSX/travis. #type #format #cast unsigned long %lu - uint64_t PRIu64 - fdisk_sector_t %ju (uintmax_t) Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* libmount: fix file descriptor leakSami Kerola2017-04-101-6/+5Star
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* fincore: fix file descriptor leakSami Kerola2017-04-101-0/+1
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* libsmartcols: fix relative width interpretationKarel Zak2017-04-072-5/+5
| | | | | | The non-defined width hint (=0) should not be interpreted as relative width. Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: column width reduction refactoringKarel Zak2017-04-072-32/+80
| | | | | | | The current implementation is unreadable... Let's write it again with more obvious semantic. Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: add scols_line_move_cells()Karel Zak2017-04-073-3/+50
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: add scols_table_move_column()Karel Zak2017-04-074-0/+35
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: (gpt) fix ents zeroizeKarel Zak2017-04-061-1/+1
| | | | | | | The gpt->ents is "unsigned char" buffer now. We need to use bytes, no number of entries... Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: (gpt) update nparts_maxKarel Zak2017-04-061-0/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fincore: use size_t everywhereKarel Zak2017-04-061-3/+3
| | | | | | | It seems better to avoid "int" at all from sizes calculations to make the code more robust for future changes. Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: fincore/count, skip unsupported FSRuediger Meier2017-04-061-0/+17
| | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: handle dd errors in fincore/countRuediger Meier2017-04-061-11/+20
| | | | | | | On dd error the test will fail earlier and the test diff will be more useful. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* fincore: fix multiplication overflowRuediger Meier2017-04-061-1/+1
| | | | | | This failed on ppc64 with page size 64k. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: fix fincore/count for PAGE_SIZE != 4096Ruediger Meier2017-04-064-4/+124
| | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: remove fincore SMALLER_THAN_PAGESIZE testsRuediger Meier2017-04-062-14/+0Star
| | | | | | | | | | | | | | These tests failed for example on ext4 with a non-default blocksize 1024. In this case it seems that the kernel only caches a full page if we read at least PAGE_SIZE -BLOCK_SIZE +1. Both tests also failed on NFS allthough block size seems to be 1M there. We still keep the test for PAGE_SIZE-1 which seems to work more reliable. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* libfdisk: (gpt) care about SSIZE_MAX for read(2)Karel Zak2017-04-061-0/+5
| | | | | | | | read(2) behavior is undefined if you want to read more than SSIZE_MAX bytes. Let's be paranoid and check for this... Reported-by: Ruediger Meier <sweet_f_a@gmx.de> Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: (gpt) make entries array size calculation more robustKarel Zak2017-04-051-30/+51
| | | | | | | * use the same function everywhere * keep calculation based on size_t Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: (gpt) use size_t and gpt_get_nentries()Karel Zak2017-04-051-36/+48
| | | | | | | If possible use size_t for number of entries (partitions). It makes code more readable and without unnecessary casts. Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: (gpt) don't access entries array directlyKarel Zak2017-04-051-129/+183
| | | | | | | | | | | We blindly assume that our sizeof(struct gpt_entry) is the same on-disk stored header->sizeof_partition_entry. It seems more correct would be to use sizeof specified by header to access the entries array items. This patch introduces gpt_get_entry() to avoid direct access to gpt->ents[]. Signed-off-by: Karel Zak <kzak@redhat.com>
* agetty: fix login-options desc in man pageKarel Zak2017-04-051-4/+4
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* docs: update Documentation/deprecated.txtKarel Zak2017-04-041-5/+0Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* Merge branch 'hwclock-date7-3' of github.com:jwpi/util-linuxKarel Zak2017-04-045-472/+120Star
|\ | | | | | | | | | | | | | | | | | | * 'hwclock-date7-3' of github.com:jwpi/util-linux: hwclock: remove unused 'silent' arg hwclock: remove dead cmos code hwclock: improve cmos message strings hwclock: remove unused atomic arg in cmos hwclock: remove unused cmos ctl structs hwclock: remove alpha cmos
| * hwclock: remove unused 'silent' argJ William Piggott2017-03-313-14/+10Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The 'silent' argument for get_epoch_rtc() was used to silence error messages when querying the rtc driver for an alpha epoch while using cmos direct access. Alpha cmos has since been removed so 'silent' is no longer used. * sys-utils/hwclock.h: remove 'silent' argument * sys-utils/hwclock.c: same * sys-utils/hwclock-rtc.c: same Signed-off-by: J William Piggott <elseifthen@gmx.com>
| * hwclock: remove dead cmos codeJ William Piggott2017-03-311-17/+0Star
| | | | | | | | | | | | * hwclock-cmos.c: remove unused 'century' code. Signed-off-by: J William Piggott <elseifthen@gmx.com>
| * hwclock: improve cmos message stringsJ William Piggott2017-03-311-5/+4Star
| | | | | | | | | | | | * sys-utils/hwclock-cmos.c: improve message strings Signed-off-by: J William Piggott <elseifthen@gmx.com>
| * hwclock: remove unused atomic arg in cmosJ William Piggott2017-03-311-6/+4Star
| | | | | | | | | | | | * sys-utils/hwclock-cmos.c: remove unused arg for atomic() Signed-off-by: J William Piggott <elseifthen@gmx.com>
| * hwclock: remove unused cmos ctl structsJ William Piggott2017-03-311-44/+39Star
| | | | | | | | | | | | | | | | | | The hwclock-cmos.c ctl structs were only used for the since removed alpha code. * sys-utils/hwclock-cmos.c: remove unused ctl structs Signed-off-by: J William Piggott <elseifthen@gmx.com>
| * hwclock: remove alpha cmosJ William Piggott2017-03-314-395/+72Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove alpha direct I/O access, use RTC instead: http://marc.info/?l=util-linux-ng&m=141682406902804 Resolves the alpha 2020 issue for util-linux: http://marc.info/?l=util-linux-ng&m=148387021519787 Now it is only the kernel's RTC problem. * sys-utils/hwclock.c: remove alpha cmos * sys-utils/hwclock-cmos.c: same * sys-utils/hwclock.h: same * sys-utils/hwclock.8.in: same Signed-off-by: J William Piggott <elseifthen@gmx.com>
* | Merge branch 'tailf-removal' of https://github.com/kerolasa/lelux-utiliteetitKarel Zak2017-04-0430-480/+0Star
|\ \ | | | | | | | | | | | | * 'tailf-removal' of https://github.com/kerolasa/lelux-utiliteetit: tailf: remove deprecated utility
| * | tailf: remove deprecated utilitySami Kerola2017-04-0230-480/+0Star
| |/ | | | | | | | | | | | | | | March 2017 is gone, it is time to remove this utility as scheduled in earlier commit, and promised in manual page. Reference: 3f8478a71ccde6883d4c81b7e65561a106653b28 Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* | Merge branch '2017wk13' of https://github.com/kerolasa/lelux-utiliteetitKarel Zak2017-04-043-73/+81
|\ \ | | | | | | | | | | | | | | | | | | | | | * '2017wk13' of https://github.com/kerolasa/lelux-utiliteetit: docs: improve agetty.8 manual page agetty: make --remote to forward --nohostname as -H to login lib/cpuset: stop changing variable that is not read agetty: remove variable that is set but not read
| * | docs: improve agetty.8 manual pageSami Kerola2017-04-031-61/+68
| | | | | | | | | | | | | | | Reviewed-by: J William Piggott <elseifthen@gmx.com> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * | agetty: make --remote to forward --nohostname as -H to loginSami Kerola2017-04-032-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without this change an attempt to remove hostname printing required following rather clumsy agetty invocation. /sbin/agetty --nohostname --login-options '/bin/login -H -- \u' After the change --nohostname behaves similar way with --host option, that is when combined with --remote the effect is passed to login(1). Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * | lib/cpuset: stop changing variable that is not readSami Kerola2017-04-011-1/+0Star
| | | | | | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * | agetty: remove variable that is set but not readSami Kerola2017-04-011-7/+2Star
| |/ | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* | Merge branch 'fix-ipcs-shmall-overflow' of ↵Karel Zak2017-04-043-8/+14
|\ \ | | | | | | | | | | | | | | | | | | https://github.com/rudimeier/util-linux * 'fix-ipcs-shmall-overflow' of https://github.com/rudimeier/util-linux: ipcs: make shmall overflow a bit less worse
| * | ipcs: make shmall overflow a bit less worseRuediger Meier2017-04-033-8/+14
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Still no large integer support but on overflow we print now the largest possible value, maybe even the largest one which makes sense at all. So on x86_64 systems we'll see now: $ echo "4503599627370496" > /proc/sys/kernel/shmall $ ipcs -m -l | grep "max total" max total shared memory (kbytes) = 18014398509481980 rather than this: $ ipcs -m -l | grep "max total" max total shared memory (kbytes) = 0 Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* | losetup.8: Reorder options documentationFrederick Grose2017-04-042-48/+44Star
| | | | | | | | | | | | | | | | | | | | | | | | Reorder options to match onboard help and group functionally. Include some missing optional arguments. [kzak@redhat.com: - don't include available columns in man page, - add comments to the usage() - fix order in usage() - fix typo in usage()] Signed-off-by: Karel Zak <kzak@redhat.com>
* | zramctl: be more specific about default outputKarel Zak2017-04-041-3/+3
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | lib/strutils: fix typos in huge size suffixesKarel Zak2017-04-031-3/+3
|/ | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add --mountpoint to findmnt callsKarel Zak2017-03-313-5/+5
| | | | | | ... if necessary to make things more robust. Signed-off-by: Karel Zak <kzak@redhat.com>
* utmpdump: remove unnecessary variableSami Kerola2017-03-311-3/+0Star
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* hwclock: remove 1994 Award BIOS workaroundJ William Piggott2017-03-313-100/+1Star
| | | | | | | | | | | | Remove the 1994 Award BIOS bug workaround as previously discussed more than two years ago: http://marc.info/?l=util-linux-ng&m=141682406902804&w=2 * sys-utils/hwclock.c: remove badyear option * sys-utils/hwclock.h: same * sys-utils/hwclock.8.in: same Signed-off-by: J William Piggott <elseifthen@gmx.com>
* test: fix mountpoint device check in libmount/loopRuediger Meier2017-03-311-12/+15
| | | | | | | | This test could fail if the build directory is somehow exoticly mounted (shared bind mounts, symlinks). CC: Stanislav Brabec <sbrabec@suse.cz> Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* lscpu: fix mem leak [coverity scan]Karel Zak2017-03-311-1/+4
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>