diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c index 87bb7b8dae48ccd7d90ef64e10987545d8fd79a5..fe1428006386d4431141d8cbaa8738b7a187977f 100644 --- a/src/vbox/vbox_common.c +++ b/src/vbox/vbox_common.c @@ -4280,3 +4280,11 @@ int vboxDomainDetachDevice(virDomainPtr dom, const char *xml) virDomainDeviceDefFree(dev); return ret; } + +int vboxDomainDetachDeviceFlags(virDomainPtr dom, const char *xml, + unsigned int flags) +{ + virCheckFlags(VIR_DOMAIN_AFFECT_LIVE, -1); + + return vboxDomainDetachDevice(dom, xml); +} diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c index aad0d42d2959e80f64f514d2791de8a6d4fd5d96..10eab8840d7a59e3260105ef84a3e281e1dbf59f 100644 --- a/src/vbox/vbox_tmpl.c +++ b/src/vbox/vbox_tmpl.c @@ -1451,21 +1451,6 @@ _vboxAttachDrivesOld(virDomainDefPtr def ATTRIBUTE_UNUSED, #endif /* VBOX_API_VERSION >= 4000000 */ -static int -vboxDomainDetachDeviceFlags(virDomainPtr dom, const char *xml, - unsigned int flags) -{ - virCheckFlags(VIR_DOMAIN_AFFECT_LIVE | VIR_DOMAIN_AFFECT_CONFIG, -1); - - if (flags & VIR_DOMAIN_AFFECT_CONFIG) { - virReportError(VIR_ERR_OPERATION_INVALID, "%s", - _("cannot modify the persistent configuration of a domain")); - return -1; - } - - return vboxDomainDetachDevice(dom, xml); -} - static int vboxDomainSnapshotGetAll(virDomainPtr dom, IMachine *machine, diff --git a/src/vbox/vbox_uniformed_api.h b/src/vbox/vbox_uniformed_api.h index 357590cbf13831301ad959f7fe83eba25d674376..48c2973e9818362825fd86b5b5aff5dc9ea2609e 100644 --- a/src/vbox/vbox_uniformed_api.h +++ b/src/vbox/vbox_uniformed_api.h @@ -533,6 +533,8 @@ int vboxDomainAttachDeviceFlags(virDomainPtr dom, const char *xml, int vboxDomainUpdateDeviceFlags(virDomainPtr dom, const char *xml, unsigned int flags); int vboxDomainDetachDevice(virDomainPtr dom, const char *xml); +int vboxDomainDetachDeviceFlags(virDomainPtr dom, const char *xml, + unsigned int flags); /* Version specified functions for installing uniformed API */ void vbox22InstallUniformedAPI(vboxUniformedAPI *pVBoxAPI);