]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
remote generator: handle remoteDomainCreateWithFlags()
authorMarc Hartmayer <mhartmay@linux.vnet.ibm.com>
Thu, 19 Jan 2017 20:17:12 +0000 (21:17 +0100)
committerJohn Ferlan <jferlan@redhat.com>
Thu, 9 Feb 2017 22:21:15 +0000 (17:21 -0500)
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>
src/remote/remote_driver.c
src/remote/remote_protocol.x

index 59d74a26e04091c8da7e5dedd1eb0cd7acc2b288..a3f7d9b0ba2a502b7745022f1599884a77c5430b 100644 (file)
@@ -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)
 {
index 6445685ba17273a0e6e9932831c267baa2d3f127..68469a5b1f4909c637b3886a0b692b39a684acb7 100644 (file)
@@ -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,