1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-01-14 23:24:23 +03:00

Recognize ejectable media in hostdev hal driver.

This commit is contained in:
Cole Robinson 2009-03-02 17:41:13 +00:00
parent 4837725f37
commit f9cbf065ad

View File

@ -242,8 +242,8 @@ static int gather_storage_cap(LibHalContext *ctx, const char *udi,
(void)get_str_prop(ctx, udi, "storage.vendor", &d->storage.vendor);
if (get_bool_prop(ctx, udi, "storage.removable", &val) == 0 && val) {
d->storage.flags |= VIR_NODE_DEV_CAP_STORAGE_REMOVABLE;
if (get_bool_prop(ctx, udi,
"storage.removable.media_available", &val) && val) {
if (get_bool_prop(ctx, udi, "storage.removable.media_available",
&val) == 0 && val) {
d->storage.flags |=
VIR_NODE_DEV_CAP_STORAGE_REMOVABLE_MEDIA_AVAILABLE;
(void)get_uint64_prop(ctx, udi, "storage.removable.media_size",