提交 2ad7b494 编写于 作者: T Taowei 提交者: Michal Privoznik

vbox: Rewrite vboxDomainDetachDeviceFlags

上级 fa12d7c3
...@@ -4280,3 +4280,11 @@ int vboxDomainDetachDevice(virDomainPtr dom, const char *xml) ...@@ -4280,3 +4280,11 @@ int vboxDomainDetachDevice(virDomainPtr dom, const char *xml)
virDomainDeviceDefFree(dev); virDomainDeviceDefFree(dev);
return ret; return ret;
} }
int vboxDomainDetachDeviceFlags(virDomainPtr dom, const char *xml,
unsigned int flags)
{
virCheckFlags(VIR_DOMAIN_AFFECT_LIVE, -1);
return vboxDomainDetachDevice(dom, xml);
}
...@@ -1451,21 +1451,6 @@ _vboxAttachDrivesOld(virDomainDefPtr def ATTRIBUTE_UNUSED, ...@@ -1451,21 +1451,6 @@ _vboxAttachDrivesOld(virDomainDefPtr def ATTRIBUTE_UNUSED,
#endif /* VBOX_API_VERSION >= 4000000 */ #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 static int
vboxDomainSnapshotGetAll(virDomainPtr dom, vboxDomainSnapshotGetAll(virDomainPtr dom,
IMachine *machine, IMachine *machine,
......
...@@ -533,6 +533,8 @@ int vboxDomainAttachDeviceFlags(virDomainPtr dom, const char *xml, ...@@ -533,6 +533,8 @@ int vboxDomainAttachDeviceFlags(virDomainPtr dom, const char *xml,
int vboxDomainUpdateDeviceFlags(virDomainPtr dom, const char *xml, int vboxDomainUpdateDeviceFlags(virDomainPtr dom, const char *xml,
unsigned int flags); unsigned int flags);
int vboxDomainDetachDevice(virDomainPtr dom, const char *xml); int vboxDomainDetachDevice(virDomainPtr dom, const char *xml);
int vboxDomainDetachDeviceFlags(virDomainPtr dom, const char *xml,
unsigned int flags);
/* Version specified functions for installing uniformed API */ /* Version specified functions for installing uniformed API */
void vbox22InstallUniformedAPI(vboxUniformedAPI *pVBoxAPI); void vbox22InstallUniformedAPI(vboxUniformedAPI *pVBoxAPI);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册