summaryrefslogtreecommitdiffstats
path: root/sys-utils
Commit message (Collapse)AuthorAgeFilesLines
* mount: add details about mtab and --namespace to mount.8Karel Zak2018-07-192-6/+32
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* hwclock: add --delay <seconds>Karel Zak2018-07-185-6/+102
| | | | | | | | | | | * add command line option --delay <seconds> * read RTC type from /sys/class/rtc/rtc<N>/name * default to 0.5 (500ms) for rtc_cmos or when RTC type is impossible determine; otherwise delay is 0. Signed-off-by: Karel Zak <kzak@redhat.com>
* fallocate: remove unwanted debug messageKarel Zak2018-07-041-2/+0Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* Merge branch 'fixes' of https://github.com/rudimeier/util-linuxKarel Zak2018-07-032-7/+7
|\ | | | | | | | | | | | | * 'fixes' of https://github.com/rudimeier/util-linux: wipefs: add missing ifdef lib/path: remove unused expression ipcs,chmem: fix access() usage
| * ipcs,chmem: fix access() usageRuediger Meier2018-06-252-7/+7
| | | | | | | | | | | | | | | | | | | | | | Some mistakes happened lately when switching from path_exist() to ul_path_access(). See f09a98de and 8ca31279. This caused ipcs test failures when running i386 binaries on x86_64 hosts, because the syscall fallback was always used. That's why I reviewed all similar changes and found another one in chmem. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* | fallocate: add man page note about --collapse-range granularityKarel Zak2018-07-032-0/+9
|/ | | | | Reported-by: Radka Skvarilova <rskvaril@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* choom: use new ul_path_* APIKarel Zak2018-06-211-17/+26
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* blkzone: use new ul_path_* APIKarel Zak2018-06-211-8/+17
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fstrim: use new ul_path_* APIKarel Zak2018-06-211-12/+15
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fstrim: add --dry-runKarel Zak2018-06-212-7/+22
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fstrim: use new ul_path_* API, improve sysfs context usageKarel Zak2018-06-211-18/+34
| | | | | | | * improve has_discard() function to initialize sysfs context only once * use new ul_path_* API Signed-off-by: Karel Zak <kzak@redhat.com>
* lscpu: use new ul_path_* APIKarel Zak2018-06-212-133/+137
| | | | | | | | | * use ul_path_* API for /sys/devices/system/cpu paths * use ul_path_* API for /proc * rename is_compatible() to is_devtree_compatible() as it works with the devices tree only Signed-off-by: Karel Zak <kzak@redhat.com>
* ipcs: use new ul_path_* APIKarel Zak2018-06-212-18/+17Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* chcpu: use new ul_path_* APIKarel Zak2018-06-211-43/+55
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* ctrlaltdel: use new ul_path_* APIKarel Zak2018-06-211-1/+4
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* rfkill: don't use lib/pathKarel Zak2018-06-211-2/+4
| | | | | | It seems like crazy overkill for this trivial purpose. Signed-off-by: Karel Zak <kzak@redhat.com>
* chmem: use new ul_path_* APIKarel Zak2018-06-211-16/+23
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lsmem: use new ul_path_* APIKarel Zak2018-06-211-40/+53
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* zramctl: use new ul_path_* APIKarel Zak2018-06-211-41/+54
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lib/path lib/sysfs: add debugKarel Zak2018-06-211-0/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* setarch: add another PER_LINUX32 aliases for ppcleKarel Zak2018-06-141-0/+2
| | | | | | | | | The big-endian version maps generic "ppc" and "ppc32" aliases to PER_LINUX32. It seems that we can do the same for little-endian. Note that SYS_personality does not care about LE/BE, it's 32 or 64 bit. Signed-off-by: Karel Zak <kzak@redhat.com>
* mount: add -N to man page helpers sectionKarel Zak2018-06-112-1/+5
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* umount: fix behaviour of -A and -R with --namespaceVaclav Dolezal2018-06-111-1/+10
| | | | | | | Load /proc/self/mountinfo from correct namespace. Signed-off-by: Vaclav Dolezal <vdolezal@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* umount: allow PID as --namespace argumentVaclav Dolezal2018-06-112-3/+25
| | | | | | | [kzak@redhat.com: - update code] Signed-off-by: Karel Zak <kzak@redhat.com> Signed-off-by: Vaclav Dolezal <vdolezal@redhat.com>
* mount: allow PID as --namespace argumentVaclav Dolezal2018-06-112-3/+26
| | | | | | | [[kzak@redhat.com: - update code] Signed-off-by: Karel Zak <kzak@redhat.com> Signed-off-by: Vaclav Dolezal <vdolezal@redhat.com>
* mount: document --namespace in man/helpVaclav Dolezal2018-06-114-0/+11
| | | | Signed-off-by: Vaclav Dolezal <vdolezal@redhat.com>
* libmount: make errno usable after mnt_context_set_target_ns()Karel Zak2018-06-112-12/+3Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* umount: add support for namespacesVaclav Dolezal2018-06-111-1/+11
| | | | Signed-off-by: Vaclav Dolezal <vdolezal@redhat.com>
* mount: add support for namespacesVaclav Dolezal2018-06-111-1/+11
| | | | | Signed-off-by: Vaclav Dolezal <vdolezal@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* zramctl: (man) explain that --find is necessaryKarel Zak2018-06-111-1/+6
| | | | | Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1589148 Signed-off-by: Karel Zak <kzak@redhat.com>
* blkzone: fix whole device detectionKarel Zak2018-06-081-4/+5
| | | | | | | | | | | | | | Matias Bjørling wrote: The current detection code for chunk size assumes that the underlying device is a device that uses the minor device id as the partition id, and that the whole device has minor id 0. This is not true for example null_blk and nvme device drivers. Let's use sysfs_devno_to_wholedisk() to get whole-disk devno. Addresses: https://github.com/karelzak/util-linux/pull/646 Reported-by: Matias Bjørling matias.bjorling@wdc.com Signed-off-by: Karel Zak <kzak@redhat.com>
* losetup: keep -f and <devname> mutually exclusiveKarel Zak2018-06-071-0/+3
| | | | | | | | | | | | | | | | losetup tries to blindly use specified device as well as search for the first free device, the result is: # losetup /dev/loop1 -f /tmp/tfile_loop1 losetup: /dev/loop1: failed to set up loop device: Invalid argument fixed version: # losetup /dev/loop10 -f img losetup: unexpected arguments Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1566432 Signed-off-by: Karel Zak <kzak@redhat.com>
* mount: keep MS_MOVE as flagKarel Zak2018-06-011-2/+6
| | | | | | | | The previous commit 4ebea84bb1ca6b0fa817588aba13de26c8d5e5a0 replaced all operations by strings, but it does not work for MS_MOVE as this operation is not supported in fstab by libmount. Signed-off-by: Karel Zak <kzak@redhat.com>
* mount: use internally string to set move/bind operationsKarel Zak2018-06-011-8/+7Star
| | | | | | | | | It's better to inform libmount about operations by string than by flags, because for example "rbind,slave" cannot be specified by MS_REC|MS_BIND|MS_SLAVE. https://bugzilla.redhat.com/show_bug.cgi?id=1584443 Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: accept another flags on MS_REMOUNT|MS_BINDKarel Zak2018-05-281-2/+3
| | | | | | | | | | | | | | | | | | | | | | The current libmount MS_REMOUNT|MS_BIND support is restricted to MS_RDONLY (read-only bind mount). This is too restrictive as Linux kernel supports bind-remount for arbitrary VFS flags. After this update you can use # mount /dev/sdc1 /mnt/A # mount --bind -onosuid,noexec /mnt/A /mnt/B # findmnt /dev/sdc1 -oTARGET,SOURCE,FS-OPTIONS,VFS-OPTIONS TARGET SOURCE FS-OPTIONS VFS-OPTIONS /mnt/A /dev/sdc1 rw,stripe=512,data=ordered rw,relatime /mnt/B /dev/sdc1 rw,stripe=512,data=ordered rw,nosuid,noexec,relatime The "mount --bind" is composed from two syscalls of course (1st is bind, 2nd is bind,remount,nosuid,noexec). Addresses: https://github.com/karelzak/util-linux/issues/637 Signed-off-by: Karel Zak <kzak@redhat.com>
* mountpoint: simplify test condition [cppcheck]Sami Kerola2018-05-281-2/+1Star
| | | | | | | [sys-utils/mountpoint.c:79]: (style) Redundant condition: ctl->st.st_dev==pst.st_dev. 'A || (!A && B)' is equivalent to 'A || B' Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* nls: remove translation stringsSami Kerola2018-05-282-2/+2
| | | | | | | | | | While looking earlier commit I noticed everything but formatting was removed from a message in namei.c file. That inspired me to look if there are more strings that does not need translation project attention. This change removes at least some of them, if not all. Reference: e19cc7b65b31c57f0fe9cb73c9afad5197796f82 Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* man: choom.1: Use the correct macro for the font change of one argumentBjarni Ingi Gislason2018-05-231-1/+1
| | | | | | | Use the correct macro "I" for one argument, instead of the two-fonts macro "IR". Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
* man: Use the correct macro for a font change of one argumentBjarni Ingi Gislason2018-05-2311-57/+57
| | | | | | | | Use the correct macro (I, B) for the font change of one argument, not those that are used for alternating two fonts, like "BR", "IR", "RB", or "RI". Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
* lsns: remove unnecessary includeKarel Zak2018-05-171-1/+0Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* Merge branch 'output-all' of https://github.com/kerolasa/lelux-utiliteetitKarel Zak2018-05-1014-5/+86
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'output-all' of https://github.com/kerolasa/lelux-utiliteetit: zramctl: add --output-all option swapon: add --output-all option rfkill: add --output-all option partx: add --output-all option lsns: add --output-all option lsmem: add --output-all option lslogins: add --output-all option lslocks: add --output-all option lscpu: add --output-all option losetup: add --output-all option findmnt: add --output-all option
| * zramctl: add --output-all optionSami Kerola2018-05-032-1/+13
| | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * swapon: add --output-all optionSami Kerola2018-05-032-1/+10
| | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * rfkill: add --output-all optionSami Kerola2018-05-032-1/+14
| | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * lsns: add --output-all optionSami Kerola2018-05-032-0/+12
| | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * lsmem: add --output-all optionSami Kerola2018-05-032-1/+11
| | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * lscpu: add --output-all optionSami Kerola2018-05-032-0/+15
| | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * losetup: add --output-all optionSami Kerola2018-05-032-1/+11
| | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* | Merge branch 'fixes' of https://github.com/yontalcar/util-linuxKarel Zak2018-05-101-0/+2
|\ \ | | | | | | | | | | | | | | | | | | * 'fixes' of https://github.com/yontalcar/util-linux: libfdisk: fix list_del after partition reset choom: set oom_score_adj before exec fdisk: fix typo in debug string
| * | choom: set oom_score_adj before execVaclav Dolezal2018-05-091-0/+2
| |/ | | | | | | Signed-off-by: Vaclav Dolezal <vdolezal@redhat.com>