From fd98631cf0ecf9b9aea81d7c9a510a7c3e6143e4 Mon Sep 17 00:00:00 2001 From: Marc Hartmayer Date: Thu, 19 Jan 2017 21:17:12 +0100 Subject: [PATCH] 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 Reviewed-by: Bjoern Walk Reviewed-by: Boris Fiuczynski --- src/remote/remote_driver.c | 29 ----------------------------- src/remote/remote_protocol.x | 2 +- 2 files changed, 1 insertion(+), 30 deletions(-) diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index 59d74a26e0..a3f7d9b0ba 100644 --- a/src/remote/remote_driver.c +++ b/src/remote/remote_driver.c @@ -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) { diff --git a/src/remote/remote_protocol.x b/src/remote/remote_protocol.x index 6445685ba1..68469a5b1f 100644 --- a/src/remote/remote_protocol.x +++ b/src/remote/remote_protocol.x @@ -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,