summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* lsblk: add PATH columnKarel Zak2018-07-101-0/+6
| | | | | | | | | | | | | | | $ lsblk -o+PATH NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT PATH sda 8:0 0 223.6G 0 disk /dev/sda ├─sda1 8:1 0 200M 0 part /boot/efi /dev/sda1 ├─sda2 8:2 0 200M 0 part /boot /dev/sda2 ├─sda3 8:3 0 130.3G 0 part /dev/sda3 ├─sda4 8:4 0 50G 0 part / /dev/sda4 ├─sda5 8:5 0 35.1G 0 part /dev/sda5 └─sda6 8:6 0 7.8G 0 part /dev/sda6 Requested-by: Marcel Partap <mpartap@gmx.net> Signed-off-by: Karel Zak <kzak@redhat.com>
* Merge branch 'master' of https://github.com/hjmallon/util-linuxKarel Zak2018-07-101-0/+62
|\ | | | | | | | | * 'master' of https://github.com/hjmallon/util-linux: libblkid: Add more APFS checking to avoid false positives
| * libblkid: Add more APFS checking to avoid false positivesHarry Mallon2018-07-061-0/+62
| |
* | logger: Define SD_JOURNAL_SUPPRESS_LOCATION.YmrDtnJu2018-07-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | The normal journald functions add the location in the C source code files to the log messages. This is nice for a big C based project, but logger is used in scripts so it would be more useful to let users specify the location in the script by adding the CODE_FUNC, CODE_FILE and CODE_FILE fields to the log message. It is already possible to do this, but it will result in two versions of these fields: one for the location in logger.c and one for the location in the script.
* | libfdisk: reduce number of asprintf() calls, check return valueKarel Zak2018-07-041-14/+19
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | libfdisk: Fix multipath partition seperators for user-friendly namesKyleMahlkuch2018-07-041-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current code assumes "-part" is the only partition sepereator but this is not true for some distros. For example in Ubuntu 18.04 fdisk does not print the correct names for mpatha: ~# ls -l /dev/mapper/mpatha* lrwxrwxrwx 1 root root 7 Feb 1 04:39 /dev/mapper/mpatha -> ../dm-0 lrwxrwxrwx 1 root root 7 Feb 1 04:38 /dev/mapper/mpatha1 -> ../dm-4 lrwxrwxrwx 1 root root 7 Feb 1 04:38 /dev/mapper/mpatha2 -> ../dm-5 lrwxrwxrwx 1 root root 7 Feb 1 04:38 /dev/mapper/mpatha3 -> ../dm-6 ~# fdisk -l /dev/mapper/mpatha Device Boot Start End Sectors Size Id Type /dev/mapper/mpatha-part1 2048 419432447 419430400 200G 83 Linux /dev/mapper/mpatha-part2 419432448 838862847 419430400 200G 83 Linux /dev/mapper/mpatha-part3 838862848 1258291199 419428352 200G 83 Linux Instead of assuming a partition seperator of "-part" this patch uses access to check the file system for a partition seperator of "p" or the absense of a partition seperator. If neither of these work the patch defaults to "-part" like we had before this patch.
* | libfdisk: use \x<hex> to read/write partition nameKarel Zak2018-07-041-2/+6
| | | | | | | | | | Addresses: https://github.com/karelzak/util-linux/issues/656 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 'master' of https://github.com/hjmallon/util-linuxKarel Zak2018-07-044-1/+23
|\| | | | | | | | | * 'master' of https://github.com/hjmallon/util-linux: libblkid: Add very basic APFS recognition
| * libblkid: Add very basic APFS recognitionHarry Mallon2018-06-254-1/+23
| |
* | Merge branch 'quick-fix-20180625' of https://github.com/sjitech/util-linuxKarel Zak2018-07-041-1/+2
|\ \ | | | | | | | | | | | | * 'quick-fix-20180625' of https://github.com/sjitech/util-linux: exec_shell: prevent ".: applet not found" error when SHELL env is not set.
| * | exec_shell: prevent ".: applet not found" error when SHELL env is not set.osexp20002018-06-251-1/+2
| |/ | | | | | | When SHELL env is not set, it cause xstrdup(NULL) be executed, and result in weird error message ".: applet not found" instead of /bin/sh being used.
* | Merge branch 'fixes' of https://github.com/rudimeier/util-linuxKarel Zak2018-07-034-10/+11
|\ \ | | | | | | | | | | | | | | | | | | * 'fixes' of https://github.com/rudimeier/util-linux: wipefs: add missing ifdef lib/path: remove unused expression ipcs,chmem: fix access() usage
| * | wipefs: add missing ifdefRuediger Meier2018-06-251-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | Seen on OSX: misc-utils/wipefs.c:822:5: warning: implicit declaration of function 'rereadpt' is invalid in C99 [-Wimplicit-function-declaration] rereadpt(fd, devname); Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
| * | lib/path: remove unused expressionRuediger Meier2018-06-251-1/+1
| | | | | | | | | | | | | | | | | | | | | error: expression result unused [-Werror,-Wunused-value] prefix = optarg, "failed to parse range start"; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
| * | 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>
* docs: update TODOKarel Zak2018-06-221-14/+0Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* include/path: make sure PATH_MAX is definedKarel Zak2018-06-211-0/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* Merge branch 'more' of https://github.com/kerolasa/util-linuxKarel Zak2018-06-211-806/+868
|\ | | | | | | | | | | | | * 'more' of https://github.com/kerolasa/util-linux: more: remove function like preprocessor defines more: remove global variables, add struct more_control more: move couple functions
| * more: remove function like preprocessor definesSami Kerola2018-06-181-104/+134
| | | | | | | | | | | | | | | | | | Inlining code using preprocessor function like macros is bad for readability, and prone to errors. Besides this is a pager, who cares if code is few milliseconds slower. Requestee-by: Karel Zak <kzak@redhat.com> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * more: remove global variables, add struct more_controlSami Kerola2018-06-181-639/+671
| | | | | | | | | | | | | | | | This is rather big change, but that is the only way to do this sort job. To keep this change relatively understandable only moves global variables to a state structure. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * more: move couple functionsSami Kerola2018-06-181-123/+123
| | | | | | | | | | | | | | | | Earlier commit moved lots of functions to work without declarations, but to be able to get rid of global variables few more moves is needed. Reference: a8f98304e6d2f4627ca31f6c661934c92b1095f7 Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* | choom: use new ul_path_* APIKarel Zak2018-06-211-17/+26
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | lib/path: allow dir-path formattingKarel Zak2018-06-212-4/+10
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | tests: add simple LVM lsblk dumpKarel Zak2018-06-218-0/+154
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | lsblk: fix ul_path_read_string() usageKarel Zak2018-06-212-5/+5
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | tests: add simple ATA and NVME lsblk dumpKarel Zak2018-06-218-0/+98
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | tests: add lsblk test scriptKarel Zak2018-06-213-6/+92
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | lsblk: fix COL_SCHEDKarel Zak2018-06-211-1/+1
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | tests: add simple & stupid script to generate lsblk /sys and /proc dumpKarel Zak2018-06-211-0/+98
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | lsblk: document --sysrootKarel Zak2018-06-212-0/+7
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | lsblk: fix sysfs_devno_to_devname() usageKarel Zak2018-06-211-0/+1
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | lsblk: follow --sysroot when read mountpointsKarel Zak2018-06-211-2/+16
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | lsblk: use prefix for DM nameKarel Zak2018-06-213-7/+26
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | lsblk: add --sysrootKarel Zak2018-06-211-3/+13
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | docs: add note about lsblk to TODOKarel Zak2018-06-211-0/+9
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | lsblk: use new ul_path_* APIKarel Zak2018-06-211-94/+82Star
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | lib/sysfs: cleanup function namesKarel Zak2018-06-212-6/+6
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | blockdev: use new ul_path_* APIKarel Zak2018-06-211-12/+15
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | partx: use new ul_path_* APIKarel Zak2018-06-211-4/+5
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | resizepart: use new ul_path_* APIKarel Zak2018-06-211-8/+10
| | | | | | | | 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>
* | lib/path: improve debug message on redirectKarel Zak2018-06-211-3/+3
| | | | | | | | 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>
* | lib/sysfs: fix sysfs_blkdev_get_wholedisk()Karel Zak2018-06-211-1/+3
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | lib/path: simplify debug messageKarel Zak2018-06-211-2/+2
| | | | | | | | 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>