mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-23 21:15:20 +00:00
vbox: Rewrite vboxDomainAttachDeviceFlags
This commit is contained in:
parent
2b5e727413
commit
5877687765
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user