mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 15:27:47 +00:00
Remote driver
Implementation of Domain{Attach,Detach}DeviceFlags in remote driver.
This commit is contained in:
parent
daeb6f6b40
commit
906b1650b5
@ -3056,6 +3056,32 @@ done:
|
||||
return rv;
|
||||
}
|
||||
|
||||
static int
|
||||
remoteDomainAttachDeviceFlags (virDomainPtr domain, const char *xml,
|
||||
unsigned int flags)
|
||||
{
|
||||
int rv = -1;
|
||||
remote_domain_attach_device_flags_args args;
|
||||
struct private_data *priv = domain->conn->privateData;
|
||||
|
||||
remoteDriverLock(priv);
|
||||
|
||||
make_nonnull_domain (&args.dom, domain);
|
||||
args.xml = (char *) xml;
|
||||
args.flags = flags;
|
||||
|
||||
if (call (domain->conn, priv, 0, REMOTE_PROC_DOMAIN_ATTACH_DEVICE_FLAGS,
|
||||
(xdrproc_t) xdr_remote_domain_attach_device_flags_args, (char *) &args,
|
||||
(xdrproc_t) xdr_void, (char *) NULL) == -1)
|
||||
goto done;
|
||||
|
||||
rv = 0;
|
||||
|
||||
done:
|
||||
remoteDriverUnlock(priv);
|
||||
return rv;
|
||||
}
|
||||
|
||||
static int
|
||||
remoteDomainDetachDevice (virDomainPtr domain, const char *xml)
|
||||
{
|
||||
@ -3080,6 +3106,32 @@ done:
|
||||
return rv;
|
||||
}
|
||||
|
||||
static int
|
||||
remoteDomainDetachDeviceFlags (virDomainPtr domain, const char *xml,
|
||||
unsigned int flags)
|
||||
{
|
||||
int rv = -1;
|
||||
remote_domain_detach_device_flags_args args;
|
||||
struct private_data *priv = domain->conn->privateData;
|
||||
|
||||
remoteDriverLock(priv);
|
||||
|
||||
make_nonnull_domain (&args.dom, domain);
|
||||
args.xml = (char *) xml;
|
||||
args.flags = flags;
|
||||
|
||||
if (call (domain->conn, priv, 0, REMOTE_PROC_DOMAIN_DETACH_DEVICE_FLAGS,
|
||||
(xdrproc_t) xdr_remote_domain_detach_device_flags_args, (char *) &args,
|
||||
(xdrproc_t) xdr_void, (char *) NULL) == -1)
|
||||
goto done;
|
||||
|
||||
rv = 0;
|
||||
|
||||
done:
|
||||
remoteDriverUnlock(priv);
|
||||
return rv;
|
||||
}
|
||||
|
||||
static int
|
||||
remoteDomainGetAutostart (virDomainPtr domain, int *autostart)
|
||||
{
|
||||
@ -8894,7 +8946,9 @@ static virDriver remote_driver = {
|
||||
remoteDomainDefineXML, /* domainDefineXML */
|
||||
remoteDomainUndefine, /* domainUndefine */
|
||||
remoteDomainAttachDevice, /* domainAttachDevice */
|
||||
remoteDomainAttachDeviceFlags, /* domainAttachDeviceFlags */
|
||||
remoteDomainDetachDevice, /* domainDetachDevice */
|
||||
remoteDomainDetachDeviceFlags, /* domainDetachDeviceFlags */
|
||||
remoteDomainGetAutostart, /* domainGetAutostart */
|
||||
remoteDomainSetAutostart, /* domainSetAutostart */
|
||||
remoteDomainGetSchedulerType, /* domainGetSchedulerType */
|
||||
|
Loading…
Reference in New Issue
Block a user