Karel Zak
917f53cf13
docs: update TODO
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-06-22 12:47:25 +02:00
Karel Zak
2cb147e026
include/path: make sure PATH_MAX is defined
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-06-21 14:24:01 +02:00
Karel Zak
f6447ee929
Merge branch 'more' of https://github.com/kerolasa/util-linux
...
* '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
2018-06-21 14:01:54 +02:00
Karel Zak
bd5f7f2ef3
choom: use new ul_path_* API
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-06-21 13:49:16 +02:00
Karel Zak
83bbeb77c1
lib/path: allow dir-path formatting
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-06-21 13:49:03 +02:00
Karel Zak
91d28f5986
tests: add simple LVM lsblk dump
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-06-21 13:19:28 +02:00
Karel Zak
905bc7817e
lsblk: fix ul_path_read_string() usage
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-06-21 13:19:28 +02:00
Karel Zak
d6d24dda29
tests: add simple ATA and NVME lsblk dump
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-06-21 13:19:28 +02:00
Karel Zak
314adce668
tests: add lsblk test script
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-06-21 13:19:28 +02:00
Karel Zak
bd45b74fc9
lsblk: fix COL_SCHED
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-06-21 13:19:28 +02:00
Karel Zak
8ab664a77e
tests: add simple & stupid script to generate lsblk /sys and /proc dump
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-06-21 13:19:28 +02:00
Karel Zak
498d148661
lsblk: document --sysroot
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-06-21 13:19:28 +02:00
Karel Zak
3273ce07e3
lsblk: fix sysfs_devno_to_devname() usage
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-06-21 13:19:28 +02:00
Karel Zak
caf1b443c0
lsblk: follow --sysroot when read mountpoints
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-06-21 13:19:28 +02:00
Karel Zak
5a89aa99a7
lsblk: use prefix for DM name
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-06-21 13:19:28 +02:00
Karel Zak
ffc2762393
lsblk: add --sysroot
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-06-21 13:19:28 +02:00
Karel Zak
be869840b1
docs: add note about lsblk to TODO
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-06-21 13:19:28 +02:00
Karel Zak
f153614c57
lsblk: use new ul_path_* API
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-06-21 13:19:28 +02:00
Karel Zak
ab628c7c18
lib/sysfs: cleanup function names
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-06-21 13:19:28 +02:00
Karel Zak
345ddd2828
blockdev: use new ul_path_* API
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-06-21 13:19:28 +02:00
Karel Zak
61bc5fd156
partx: use new ul_path_* API
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-06-21 13:19:28 +02:00
Karel Zak
7f8a406679
resizepart: use new ul_path_* API
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-06-21 13:19:28 +02:00
Karel Zak
4448b3ab9e
blkzone: use new ul_path_* API
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-06-21 13:19:28 +02:00
Karel Zak
3736c6e444
fstrim: use new ul_path_* API
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-06-21 13:19:28 +02:00
Karel Zak
eb4a75afd9
lib/path: improve debug message on redirect
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-06-21 13:19:28 +02:00
Karel Zak
fda0e2cf04
fstrim: add --dry-run
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-06-21 13:19:07 +02:00
Karel Zak
c69bd2cbff
fstrim: use new ul_path_* API, improve sysfs context usage
...
* improve has_discard() function to initialize sysfs context only once
* use new ul_path_* API
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-06-21 13:07:46 +02:00
Karel Zak
67f2d1e326
lib/sysfs: fix sysfs_blkdev_get_wholedisk()
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-06-21 13:07:46 +02:00
Karel Zak
53c74b700c
lib/path: simplify debug message
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-06-21 13:07:46 +02:00
Karel Zak
6e509042b8
lscpu: use new ul_path_* API
...
* 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>
2018-06-21 13:07:46 +02:00
Karel Zak
9023b20123
lib/path: add ul_prefix_fopen(), improve cpuset funcs
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-06-21 13:07:46 +02:00
Karel Zak
c87b53ca5f
lib/path: don't use extra '/'
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-06-21 13:07:46 +02:00
Karel Zak
f09a98de65
ipcs: use new ul_path_* API
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-06-21 13:07:46 +02:00
Karel Zak
c7df0f42b7
lib/path: add more debug messages
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-06-21 13:07:46 +02:00
Karel Zak
a375d911c7
chcpu: use new ul_path_* API
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-06-21 13:07:46 +02:00
Karel Zak
9ce2fef0d7
ctrlaltdel: use new ul_path_* API
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-06-21 13:07:46 +02:00
Karel Zak
fcc4517cfd
lib/path: make ul_path_read_ usable with NULL handler
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-06-21 13:07:46 +02:00
Karel Zak
f99148d6f5
rfkill: don't use lib/path
...
It seems like crazy overkill for this trivial purpose.
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-06-21 13:07:46 +02:00
Karel Zak
8ca312798c
chmem: use new ul_path_* API
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-06-21 13:07:46 +02:00
Karel Zak
e4319a105b
lsmem: use new ul_path_* API
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-06-21 13:07:46 +02:00
Karel Zak
7eb8e47bcd
lib/path: add ul_path_read_buffer()
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-06-21 13:07:46 +02:00
Karel Zak
e74e5401e1
lib/path: add ul_path_get_abspath()
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-06-21 13:07:46 +02:00
Karel Zak
a6f0da166e
zramctl: use new ul_path_* API
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-06-21 13:07:46 +02:00
Karel Zak
3aa4775c2f
lib/sysfs: fix ul_path_read_string() usage
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-06-21 13:07:46 +02:00
Karel Zak
efb17218ef
libfdisk: use new ul_path_* API
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-06-21 13:07:46 +02:00
Karel Zak
708a58b665
libblkid: use new ul_path_* API
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-06-21 13:07:46 +02:00
Karel Zak
8c3d9cad1e
lib/sysfs: add sysfs_blkdev_get_parent()
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-06-21 13:07:46 +02:00
Karel Zak
866ac74f97
lib/sysfs: make possible to call sysfs_blkdev_deinit_path() in loop
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-06-21 13:07:46 +02:00
Karel Zak
d5878cabe6
lib/path: fix read string to be backwardly compatible
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-06-21 13:07:46 +02:00
Karel Zak
bcf445fd68
lib/path lib/sysfs: add debug
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-06-21 13:07:46 +02:00