Commit Graph

7 Commits

Author SHA1 Message Date
Karel Zak 8399fe089b lsblk: fix filesystem array allocation
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-01-19 14:59:01 +01:00
Karel Zak c6648d2db1 lsblk: print all device mountpoints
* add libmount FS to struct lsblk_device

* add new column MOUNTPOINTS (pl.) with multi-line cells to display
  all mountpoints relevant for the device

* the old MOUNTPOINT is backwardly compatible and it (usually) displays the
  last device mountpoint from /proc/self/mountinfo

For example btrfs with more subvolumes:

 $ lsblk -o+MOUNTPOINTS /dev/sdc1
 NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT MOUNTPOINTS
 sdc1   8:33   0  50M  0 part /mnt/test  /mnt/A
                                         /mnt/test
                                         /mnt/B

Note, in this case MOUNTPOINT displays mount point where is mounted
root of the filesystem.

Signed-off-by: Karel Zak <kzak@redhat.com>
2021-01-08 13:20:50 +01:00
Karel Zak fed34a1e63 lsblk: rename blkdev_cxt to lsblk_device
The patch does not change code logic and semantic -- just rename.

* set_cxt() to set_device()
* struct blkdev_cxt to lsblk_device

Signed-off-by: Karel Zak <kzak@redhat.com>
2018-12-07 12:32:57 +01:00
Karel Zak 82dae67d1a lsblk: differentiate between swap and mount
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-09-14 15:57:45 +02:00
Karel Zak 04be258d65 lsblk: use lsblk_ prefix mountpoint getter
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-09-14 15:49:00 +02:00
Karel Zak e0c016f11b lsblk: init/deinit libmount stuff
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-09-14 15:45:53 +02:00
Karel Zak cfb715ed1d lsblk: move mount stuff to lsblk-mnt.c
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-09-14 15:41:39 +02:00