diff options
author | Karel Zak | 2018-09-14 15:57:45 +0200 |
---|---|---|
committer | Karel Zak | 2018-09-14 15:57:45 +0200 |
commit | 82dae67d1a902aec6aa164510717be027810bfe6 (patch) | |
tree | 974c5dc28e2a7e8b1ba987937ada27acf0ada06c /misc-utils/lsblk.c | |
parent | lsblk: use lsblk_ prefix mountpoint getter (diff) | |
download | kernel-qcow2-util-linux-82dae67d1a902aec6aa164510717be027810bfe6.tar.gz kernel-qcow2-util-linux-82dae67d1a902aec6aa164510717be027810bfe6.tar.xz kernel-qcow2-util-linux-82dae67d1a902aec6aa164510717be027810bfe6.zip |
lsblk: differentiate between swap and mount
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'misc-utils/lsblk.c')
-rw-r--r-- | misc-utils/lsblk.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/misc-utils/lsblk.c b/misc-utils/lsblk.c index d466a25b1..2a6044c0e 100644 --- a/misc-utils/lsblk.c +++ b/misc-utils/lsblk.c @@ -786,7 +786,7 @@ static char *get_vfs_attribute(struct blkdev_cxt *cxt, int id) if (!cxt->fsstat.f_blocks) { mnt = lsblk_device_get_mountpoint(cxt); - if (!mnt) + if (!mnt || cxt->is_swap) return NULL; if (statvfs(mnt, &cxt->fsstat) != 0) return NULL; |