blockdev: split out actual DM sysfs code of get_block_device_harder() into function of its own

That way we can use it in code that already acquired a dev_t from some
source.
This commit is contained in:
Lennart Poettering
2018-06-11 18:01:06 +02:00
parent 66ae5130a0
commit 880f09bd91
2 changed files with 34 additions and 36 deletions
+1
View File
@@ -19,6 +19,7 @@
xsprintf(buf, "/sys/dev/block/%u:%u%s", major(devno), minor(devno), strempty(suffix))
int block_get_whole_disk(dev_t d, dev_t *ret);
int block_get_originating(dev_t d, dev_t *ret);
int get_block_device(const char *path, dev_t *dev);