summaryrefslogtreecommitdiffstats
path: root/misc-utils/lsblk.h
diff options
context:
space:
mode:
authorKarel Zak2018-10-18 13:57:46 +0200
committerKarel Zak2018-12-07 12:33:34 +0100
commit10501add02abf12d41246c04a81ac599179266c7 (patch)
tree81e27d43a321e8a86b71930d61901472bf020b83 /misc-utils/lsblk.h
parentlsblk: make device_get_data() more generic (diff)
downloadkernel-qcow2-util-linux-10501add02abf12d41246c04a81ac599179266c7.tar.gz
kernel-qcow2-util-linux-10501add02abf12d41246c04a81ac599179266c7.tar.xz
kernel-qcow2-util-linux-10501add02abf12d41246c04a81ac599179266c7.zip
lsblk: remember whole-disk, remove unused struct member
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'misc-utils/lsblk.h')
-rw-r--r--misc-utils/lsblk.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/misc-utils/lsblk.h b/misc-utils/lsblk.h
index 9c311c4c2..6a2ad6aa2 100644
--- a/misc-utils/lsblk.h
+++ b/misc-utils/lsblk.h
@@ -82,7 +82,7 @@ struct lsblk_device {
struct list_head ls_roots; /* item in devtree->roots list */
struct list_head ls_devices; /* item in devtree->devices list */
- struct lsblk_devtree *tree;
+ struct lsblk_device *wholedisk; /* for partitions */
struct lsblk_devprop *properties;
struct stat st;
@@ -94,8 +94,6 @@ struct lsblk_device {
struct path_cxt *sysfs;
- int partition; /* is partition? TRUE/FALSE */
-
char *mountpoint; /* device mountpoint */
struct statvfs fsstat; /* statvfs() result */
@@ -116,6 +114,7 @@ struct lsblk_device {
blkid_requested : 1;
};
+#define device_is_partition(_x) ((_x)->wholedisk != NULL)
/*
* Note that lsblk tree uses botton devices (devices without slaves) as root
@@ -178,7 +177,7 @@ extern void lsblk_properties_deinit(void);
/* lsblk-devtree.c */
void lsblk_reset_iter(struct lsblk_iter *itr, int direction);
-struct lsblk_device *lsblk_new_device(struct lsblk_devtree *tree);
+struct lsblk_device *lsblk_new_device(void);
void lsblk_ref_device(struct lsblk_device *dev);
void lsblk_unref_device(struct lsblk_device *dev);
int lsblk_device_new_dependence(struct lsblk_device *parent, struct lsblk_device *child);