remote generator: Handle virDomainCreateWithFlags

Add special case code for updating a given domain object instead of
returning a new one.
This commit is contained in:
Matthias Bolte
2011-05-20 17:58:34 +02:00
parent 6df05081cb
commit a125f82ff4
4 changed files with 40 additions and 79 deletions

View File

@@ -893,36 +893,6 @@ cleanup:
return rv;
}
static int
remoteDispatchDomainCreateWithFlags(struct qemud_server *server ATTRIBUTE_UNUSED,
struct qemud_client *client ATTRIBUTE_UNUSED,
virConnectPtr conn,
remote_message_header *hdr ATTRIBUTE_UNUSED,
remote_error *rerr,
remote_domain_create_with_flags_args *args,
remote_domain_create_with_flags_ret *ret)
{
int rv = -1;
virDomainPtr dom = NULL;
if (!(dom = get_nonnull_domain(conn, args->dom)))
goto cleanup;
if (virDomainCreateWithFlags(dom, args->flags) < 0)
goto cleanup;
make_nonnull_domain(&ret->dom, dom);
rv = 0;
cleanup:
if (rv < 0)
remoteDispatchError(rerr);
if (dom)
virDomainFree(dom);
return rv;
}
static int
remoteDispatchDomainGetSecurityLabel(struct qemud_server *server ATTRIBUTE_UNUSED,
struct qemud_client *client ATTRIBUTE_UNUSED,