mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
xen: Fix logic bug in xenDaemon*DeviceFlags
This commit is contained in:
parent
28160e2264
commit
6ab99b8a43
@ -3904,8 +3904,9 @@ xenDaemonAttachDeviceFlags(virDomainPtr domain, const char *xml,
|
||||
/* Xen only supports modifying both live and persistent config if
|
||||
* xendConfigVersion >= 3
|
||||
*/
|
||||
if (flags != (VIR_DOMAIN_DEVICE_MODIFY_LIVE |
|
||||
VIR_DOMAIN_DEVICE_MODIFY_CONFIG)) {
|
||||
if (priv->xendConfigVersion >= 3 &&
|
||||
(flags != (VIR_DOMAIN_DEVICE_MODIFY_LIVE |
|
||||
VIR_DOMAIN_DEVICE_MODIFY_CONFIG))) {
|
||||
virXendError(VIR_ERR_OPERATION_INVALID, "%s",
|
||||
_("Xend only supports modifying both live and "
|
||||
"persistent config"));
|
||||
@ -4043,8 +4044,9 @@ xenDaemonUpdateDeviceFlags(virDomainPtr domain, const char *xml,
|
||||
/* Xen only supports modifying both live and persistent config if
|
||||
* xendConfigVersion >= 3
|
||||
*/
|
||||
if (flags != (VIR_DOMAIN_DEVICE_MODIFY_LIVE |
|
||||
VIR_DOMAIN_DEVICE_MODIFY_CONFIG)) {
|
||||
if (priv->xendConfigVersion >= 3 &&
|
||||
(flags != (VIR_DOMAIN_DEVICE_MODIFY_LIVE |
|
||||
VIR_DOMAIN_DEVICE_MODIFY_CONFIG))) {
|
||||
virXendError(VIR_ERR_OPERATION_INVALID, "%s",
|
||||
_("Xend only supports modifying both live and "
|
||||
"persistent config"));
|
||||
@ -4154,8 +4156,9 @@ xenDaemonDetachDeviceFlags(virDomainPtr domain, const char *xml,
|
||||
/* Xen only supports modifying both live and persistent config if
|
||||
* xendConfigVersion >= 3
|
||||
*/
|
||||
if (flags != (VIR_DOMAIN_DEVICE_MODIFY_LIVE |
|
||||
VIR_DOMAIN_DEVICE_MODIFY_CONFIG)) {
|
||||
if (priv->xendConfigVersion >= 3 &&
|
||||
(flags != (VIR_DOMAIN_DEVICE_MODIFY_LIVE |
|
||||
VIR_DOMAIN_DEVICE_MODIFY_CONFIG))) {
|
||||
virXendError(VIR_ERR_OPERATION_INVALID, "%s",
|
||||
_("Xend only supports modifying both live and "
|
||||
"persistent config"));
|
||||
|
Loading…
x
Reference in New Issue
Block a user