mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
Fix virLXCPrepareHostDevices method
The virLXCPrepareHostDevices method was returning success even when it reported an error, and failed to handle several host device types
This commit is contained in:
parent
f0e4af91e4
commit
4f1f9d91ab
@ -299,15 +299,29 @@ int virLXCPrepareHostDevices(virLXCDriverPtr driver,
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("Unsupported hostdev type %s"),
|
||||
virDomainHostdevSubsysTypeToString(dev->source.subsys.type));
|
||||
break;
|
||||
return -1;
|
||||
}
|
||||
break;
|
||||
|
||||
case VIR_DOMAIN_HOSTDEV_MODE_CAPABILITIES:
|
||||
switch (dev->source.subsys.type) {
|
||||
case VIR_DOMAIN_HOSTDEV_CAPS_TYPE_STORAGE:
|
||||
case VIR_DOMAIN_HOSTDEV_CAPS_TYPE_MISC:
|
||||
break;
|
||||
default:
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("Unsupported hostdev type %s"),
|
||||
virDomainHostdevSubsysTypeToString(dev->source.subsys.type));
|
||||
return -1;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("Unsupported hostdev mode %s"),
|
||||
virDomainHostdevModeTypeToString(dev->mode));
|
||||
break;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user