blockdev-util: add correct API for detecting if block device has partition scanning enabled

Instead of checking the loopback ioctls, let's check sysfs, so that we
catch all kinds of block devices, not just loopback block devices.
This commit is contained in:
Lennart Poettering
2020-08-11 10:29:43 +02:00
parent 96a4ce9f1d
commit e8467cd31c
2 changed files with 39 additions and 0 deletions
+2
View File
@@ -20,3 +20,5 @@ int get_block_device(const char *path, dev_t *dev);
int get_block_device_harder(const char *path, dev_t *dev);
int lock_whole_block_device(dev_t devt, int operation);
int blockdev_partscan_enabled(int fd);