mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 12:35:17 +00:00
remote generator: handle remoteDomainCreateWithFlags()
This commit removes the handcrafted code for remoteDomainCreateWithFlags() and lets it auto generate. A little bit of history repeating... Commit 03d813bbcd7b4a183601055006 removed the auto generation of remoteDomainCreateWithFlags() because it was thought that the design flaw in the remote protocol for virDomainCreate is also within the remote protocol for virDomainCreateWithFlags. As the commit message of ddaf15d7a3863d54e242f8ff75 mentions this is not the case therefore we can auto generate the client part. Even worse there was a typo in remoteDomainCreateWithFlags() 'remote_domain_create_with_flags_args ret;' but in fact it has to be 'remote_domain_create_with_flags_ret ret;'. Signed-off-by: Marc Hartmayer <mhartmay@linux.vnet.ibm.com> Reviewed-by: Bjoern Walk <bwalk@linux.vnet.ibm.com> Reviewed-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
This commit is contained in:
parent
c26fe44be5
commit
fd98631cf0
@ -2655,35 +2655,6 @@ remoteDomainCreate(virDomainPtr domain)
|
||||
return rv;
|
||||
}
|
||||
|
||||
static int
|
||||
remoteDomainCreateWithFlags(virDomainPtr dom, unsigned int flags)
|
||||
{
|
||||
int rv = -1;
|
||||
struct private_data *priv = dom->conn->privateData;
|
||||
remote_domain_create_with_flags_args args;
|
||||
remote_domain_create_with_flags_args ret;
|
||||
|
||||
remoteDriverLock(priv);
|
||||
|
||||
make_nonnull_domain(&args.dom, dom);
|
||||
args.flags = flags;
|
||||
|
||||
memset(&ret, 0, sizeof(ret));
|
||||
if (call(dom->conn, priv, 0, REMOTE_PROC_DOMAIN_CREATE_WITH_FLAGS,
|
||||
(xdrproc_t)xdr_remote_domain_create_with_flags_args, (char *)&args,
|
||||
(xdrproc_t)xdr_remote_domain_create_with_flags_ret, (char *)&ret) == -1) {
|
||||
goto done;
|
||||
}
|
||||
|
||||
dom->id = ret.dom.id;
|
||||
xdr_free((xdrproc_t) &xdr_remote_domain_create_with_flags_ret, (char *) &ret);
|
||||
rv = 0;
|
||||
|
||||
done:
|
||||
remoteDriverUnlock(priv);
|
||||
return rv;
|
||||
}
|
||||
|
||||
static char *
|
||||
remoteDomainGetSchedulerType(virDomainPtr domain, int *nparams)
|
||||
{
|
||||
|
@ -4785,7 +4785,7 @@ enum remote_procedure {
|
||||
REMOTE_PROC_DOMAIN_EVENT_IO_ERROR_REASON = 195,
|
||||
|
||||
/**
|
||||
* @generate: server
|
||||
* @generate: both
|
||||
* @acl: domain:start
|
||||
*/
|
||||
REMOTE_PROC_DOMAIN_CREATE_WITH_FLAGS = 196,
|
||||
|
Loading…
x
Reference in New Issue
Block a user