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

vbox: Rewrite vboxDomainAttachDeviceFlags

上级 2b5e7274
......@@ -4155,3 +4155,11 @@ int vboxDomainAttachDevice(virDomainPtr dom, const char *xml)
{
return vboxDomainAttachDeviceImpl(dom, xml, 0);
}
int vboxDomainAttachDeviceFlags(virDomainPtr dom, const char *xml,
unsigned int flags)
{
virCheckFlags(VIR_DOMAIN_AFFECT_LIVE, -1);
return vboxDomainAttachDeviceImpl(dom, xml, 0);
}
......@@ -1650,21 +1650,6 @@ static int vboxDomainAttachDeviceImpl(virDomainPtr dom,
return ret;
}
static int
vboxDomainAttachDeviceFlags(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 vboxDomainAttachDeviceImpl(dom, xml, 0);
}
static int vboxDomainUpdateDeviceFlags(virDomainPtr dom, const char *xml,
unsigned int flags)
{
......
......@@ -525,6 +525,8 @@ int vboxConnectListDefinedDomains(virConnectPtr conn,
char ** const names, int maxnames);
int vboxConnectNumOfDefinedDomains(virConnectPtr conn);
int vboxDomainAttachDevice(virDomainPtr dom, const char *xml);
int vboxDomainAttachDeviceFlags(virDomainPtr dom, const char *xml,
unsigned int flags);
/* Version specified functions for installing uniformed API */
void vbox22InstallUniformedAPI(vboxUniformedAPI *pVBoxAPI);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册