mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-11-03 20:01:16 +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
|
/* Xen only supports modifying both live and persistent config if
|
||||||
* xendConfigVersion >= 3
|
* xendConfigVersion >= 3
|
||||||
*/
|
*/
|
||||||
if (flags != (VIR_DOMAIN_DEVICE_MODIFY_LIVE |
|
if (priv->xendConfigVersion >= 3 &&
|
||||||
VIR_DOMAIN_DEVICE_MODIFY_CONFIG)) {
|
(flags != (VIR_DOMAIN_DEVICE_MODIFY_LIVE |
|
||||||
|
VIR_DOMAIN_DEVICE_MODIFY_CONFIG))) {
|
||||||
virXendError(VIR_ERR_OPERATION_INVALID, "%s",
|
virXendError(VIR_ERR_OPERATION_INVALID, "%s",
|
||||||
_("Xend only supports modifying both live and "
|
_("Xend only supports modifying both live and "
|
||||||
"persistent config"));
|
"persistent config"));
|
||||||
@ -4043,8 +4044,9 @@ xenDaemonUpdateDeviceFlags(virDomainPtr domain, const char *xml,
|
|||||||
/* Xen only supports modifying both live and persistent config if
|
/* Xen only supports modifying both live and persistent config if
|
||||||
* xendConfigVersion >= 3
|
* xendConfigVersion >= 3
|
||||||
*/
|
*/
|
||||||
if (flags != (VIR_DOMAIN_DEVICE_MODIFY_LIVE |
|
if (priv->xendConfigVersion >= 3 &&
|
||||||
VIR_DOMAIN_DEVICE_MODIFY_CONFIG)) {
|
(flags != (VIR_DOMAIN_DEVICE_MODIFY_LIVE |
|
||||||
|
VIR_DOMAIN_DEVICE_MODIFY_CONFIG))) {
|
||||||
virXendError(VIR_ERR_OPERATION_INVALID, "%s",
|
virXendError(VIR_ERR_OPERATION_INVALID, "%s",
|
||||||
_("Xend only supports modifying both live and "
|
_("Xend only supports modifying both live and "
|
||||||
"persistent config"));
|
"persistent config"));
|
||||||
@ -4154,8 +4156,9 @@ xenDaemonDetachDeviceFlags(virDomainPtr domain, const char *xml,
|
|||||||
/* Xen only supports modifying both live and persistent config if
|
/* Xen only supports modifying both live and persistent config if
|
||||||
* xendConfigVersion >= 3
|
* xendConfigVersion >= 3
|
||||||
*/
|
*/
|
||||||
if (flags != (VIR_DOMAIN_DEVICE_MODIFY_LIVE |
|
if (priv->xendConfigVersion >= 3 &&
|
||||||
VIR_DOMAIN_DEVICE_MODIFY_CONFIG)) {
|
(flags != (VIR_DOMAIN_DEVICE_MODIFY_LIVE |
|
||||||
|
VIR_DOMAIN_DEVICE_MODIFY_CONFIG))) {
|
||||||
virXendError(VIR_ERR_OPERATION_INVALID, "%s",
|
virXendError(VIR_ERR_OPERATION_INVALID, "%s",
|
||||||
_("Xend only supports modifying both live and "
|
_("Xend only supports modifying both live and "
|
||||||
"persistent config"));
|
"persistent config"));
|
||||||
|
Loading…
Reference in New Issue
Block a user