diff options
author | Karel Zak | 2010-02-01 14:23:55 +0100 |
---|---|---|
committer | Karel Zak | 2010-02-01 14:23:55 +0100 |
commit | 49361dc4dca0a9079ee57a2a0d8833aabd93277b (patch) | |
tree | 064f47d2ba6e11ec9bf3b763726b8f07d97d70cd /shlibs/blkid/src/save.c | |
parent | libblkid: add blkid_openat(), cleanup blkid_fstatat() (diff) | |
download | kernel-qcow2-util-linux-49361dc4dca0a9079ee57a2a0d8833aabd93277b.tar.gz kernel-qcow2-util-linux-49361dc4dca0a9079ee57a2a0d8833aabd93277b.tar.xz kernel-qcow2-util-linux-49361dc4dca0a9079ee57a2a0d8833aabd93277b.zip |
libblkid: add blkid_probe_all_removable()
The libblkid probing is based on devices from /proc/partitions by
default. This file usually does not contain removable devices (e.g.
CDROMs) and this kind of devices are invisible for libblkid.
The blkid_probe_all_removable() function adds removable block devices
to blkid cache. The probing is based on information from the /sys
directory. The devices which were detected by this function won't be
written to blkid.tab cache file.
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=533874
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'shlibs/blkid/src/save.c')
-rw-r--r-- | shlibs/blkid/src/save.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/shlibs/blkid/src/save.c b/shlibs/blkid/src/save.c index c61373d50..a1583ecca 100644 --- a/shlibs/blkid/src/save.c +++ b/shlibs/blkid/src/save.c @@ -119,7 +119,7 @@ int blkid_flush_cache(blkid_cache cache) list_for_each(p, &cache->bic_devs) { blkid_dev dev = list_entry(p, struct blkid_struct_dev, bid_devs); - if (!dev->bid_type) + if (!dev->bid_type || (dev->bid_flags & BLKID_BID_FL_REMOVABLE)) continue; if ((ret = save_dev(dev, file)) < 0) break; |