mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-23 21:15:20 +00:00
maint: fix comma style issues: xen
Most of our code base uses space after comma but not before; fix the remaining uses before adding a syntax check. * src/libxl/libxl_driver.c: Consistently use commas. * src/xen/xend_internal.c: Likewise. * src/xen/xs_internal.c: Likewise. * src/xenapi/xenapi_driver.c: Likewise. * src/xenapi/xenapi_utils.c: Likewise. * src/xenxs/xen_sxpr.c: Likewise. * src/xenxs/xen_xm.c: Likewise. Signed-off-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
6f4901e13b
commit
86f6748bda
@ -1501,7 +1501,7 @@ libxlDomainDestroyFlags(virDomainPtr dom,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
event = virDomainEventNewFromObj(vm,VIR_DOMAIN_EVENT_STOPPED,
|
event = virDomainEventNewFromObj(vm, VIR_DOMAIN_EVENT_STOPPED,
|
||||||
VIR_DOMAIN_EVENT_STOPPED_DESTROYED);
|
VIR_DOMAIN_EVENT_STOPPED_DESTROYED);
|
||||||
|
|
||||||
if (libxlVmReap(driver, vm, VIR_DOMAIN_SHUTOFF_DESTROYED) != 0) {
|
if (libxlVmReap(driver, vm, VIR_DOMAIN_SHUTOFF_DESTROYED) != 0) {
|
||||||
|
@ -549,7 +549,7 @@ xend_op(virConnectPtr xend, const char *name, const char *key, ...)
|
|||||||
* Returns a parsed S-Expression in case of success, NULL in case of failure
|
* Returns a parsed S-Expression in case of success, NULL in case of failure
|
||||||
*/
|
*/
|
||||||
static struct sexpr *sexpr_get(virConnectPtr xend, const char *fmt, ...)
|
static struct sexpr *sexpr_get(virConnectPtr xend, const char *fmt, ...)
|
||||||
ATTRIBUTE_FMT_PRINTF(2,3);
|
ATTRIBUTE_FMT_PRINTF(2, 3);
|
||||||
|
|
||||||
static struct sexpr *
|
static struct sexpr *
|
||||||
sexpr_get(virConnectPtr xend, const char *fmt, ...)
|
sexpr_get(virConnectPtr xend, const char *fmt, ...)
|
||||||
|
@ -815,7 +815,7 @@ retry:
|
|||||||
if (new_domain_cnt < 0)
|
if (new_domain_cnt < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (VIR_ALLOC_N(new_domids,new_domain_cnt) < 0)
|
if (VIR_ALLOC_N(new_domids, new_domain_cnt) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
nread = xenStoreDoListDomains(conn, priv, new_domids, new_domain_cnt);
|
nread = xenStoreDoListDomains(conn, priv, new_domids, new_domain_cnt);
|
||||||
if (nread != new_domain_cnt) {
|
if (nread != new_domain_cnt) {
|
||||||
@ -898,7 +898,7 @@ retry:
|
|||||||
if (new_domain_cnt < 0)
|
if (new_domain_cnt < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (VIR_ALLOC_N(new_domids,new_domain_cnt) < 0)
|
if (VIR_ALLOC_N(new_domids, new_domain_cnt) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
nread = xenStoreDoListDomains(conn, priv, new_domids, new_domain_cnt);
|
nread = xenStoreDoListDomains(conn, priv, new_domids, new_domain_cnt);
|
||||||
if (nread != new_domain_cnt) {
|
if (nread != new_domain_cnt) {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* xenapi_driver.c: Xen API driver.
|
* xenapi_driver.c: Xen API driver.
|
||||||
* Copyright (C) 2011-2012 Red Hat, Inc.
|
* Copyright (C) 2011-2013 Red Hat, Inc.
|
||||||
* Copyright (C) 2009, 2010 Citrix Ltd.
|
* Copyright (C) 2009, 2010 Citrix Ltd.
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
@ -637,7 +637,7 @@ xenapiDomainLookupByUUID(virConnectPtr conn,
|
|||||||
char uuidStr[VIR_UUID_STRING_BUFLEN];
|
char uuidStr[VIR_UUID_STRING_BUFLEN];
|
||||||
virDomainPtr domP = NULL;
|
virDomainPtr domP = NULL;
|
||||||
xen_session *session = ((struct _xenapiPrivate *)(conn->privateData))->session;
|
xen_session *session = ((struct _xenapiPrivate *)(conn->privateData))->session;
|
||||||
virUUIDFormat(uuid,uuidStr);
|
virUUIDFormat(uuid, uuidStr);
|
||||||
if (xen_vm_get_by_uuid(session, &vm, uuidStr)) {
|
if (xen_vm_get_by_uuid(session, &vm, uuidStr)) {
|
||||||
xen_vm_get_record(session, &record, vm);
|
xen_vm_get_record(session, &record, vm);
|
||||||
if (record != NULL) {
|
if (record != NULL) {
|
||||||
@ -1393,7 +1393,7 @@ xenapiDomainGetXMLDesc(virDomainPtr dom, unsigned int flags)
|
|||||||
if (VIR_STRDUP(defPtr->name, dom->name) < 0)
|
if (VIR_STRDUP(defPtr->name, dom->name) < 0)
|
||||||
goto error;
|
goto error;
|
||||||
xen_vm_get_hvm_boot_policy(session, &boot_policy, vm);
|
xen_vm_get_hvm_boot_policy(session, &boot_policy, vm);
|
||||||
if (STREQ(boot_policy,"BIOS order")) {
|
if (STREQ(boot_policy, "BIOS order")) {
|
||||||
if (VIR_STRDUP(defPtr->os.type, "hvm") < 0) {
|
if (VIR_STRDUP(defPtr->os.type, "hvm") < 0) {
|
||||||
VIR_FREE(boot_policy);
|
VIR_FREE(boot_policy);
|
||||||
goto error;
|
goto error;
|
||||||
@ -2019,7 +2019,7 @@ write_func(void *ptr, size_t size, size_t nmemb, void *comms_)
|
|||||||
size_t n = size * nmemb;
|
size_t n = size * nmemb;
|
||||||
#ifdef PRINT_XML
|
#ifdef PRINT_XML
|
||||||
printf("\n\n---Result from server -----------------------\n");
|
printf("\n\n---Result from server -----------------------\n");
|
||||||
printf("%s\n",((char*) ptr));
|
printf("%s\n", (char*) ptr);
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
#endif
|
#endif
|
||||||
return (size_t) (comms->func(ptr, n, comms->handle) ? n : 0);
|
return (size_t) (comms->func(ptr, n, comms->handle) ? n : 0);
|
||||||
@ -2036,7 +2036,7 @@ call_func(const void *data, size_t len, void *user_handle,
|
|||||||
struct _xenapiPrivate *priv = (struct _xenapiPrivate *)user_handle;
|
struct _xenapiPrivate *priv = (struct _xenapiPrivate *)user_handle;
|
||||||
#ifdef PRINT_XML
|
#ifdef PRINT_XML
|
||||||
printf("\n\n---Data to server: -----------------------\n");
|
printf("\n\n---Data to server: -----------------------\n");
|
||||||
printf("%s\n",((char*) data));
|
printf("%s\n", (char*) data);
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
#endif
|
#endif
|
||||||
CURL *curl = curl_easy_init();
|
CURL *curl = curl_easy_init();
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* xenapi_utils.c: Xen API driver -- utils parts.
|
* xenapi_utils.c: Xen API driver -- utils parts.
|
||||||
* Copyright (C) 2011-2012 Red Hat, Inc.
|
* Copyright (C) 2011-2013 Red Hat, Inc.
|
||||||
* Copyright (C) 2009, 2010 Citrix Ltd.
|
* Copyright (C) 2009, 2010 Citrix Ltd.
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
@ -172,7 +172,7 @@ createXenAPIBootOrderString(int nboot, int *bootDevs)
|
|||||||
else if (bootDevs[i] == VIR_DOMAIN_BOOT_NET)
|
else if (bootDevs[i] == VIR_DOMAIN_BOOT_NET)
|
||||||
val = (char *)"n";
|
val = (char *)"n";
|
||||||
if (val)
|
if (val)
|
||||||
virBufferEscapeString(&ret,"%s",val);
|
virBufferEscapeString(&ret, "%s", val);
|
||||||
}
|
}
|
||||||
return virBufferContentAndReset(&ret);
|
return virBufferContentAndReset(&ret);
|
||||||
}
|
}
|
||||||
@ -231,20 +231,20 @@ xenapiCrashExitEnum2virDomainLifecycle(enum xen_on_crash_behaviour action)
|
|||||||
int
|
int
|
||||||
getStorageVolumeType(char *type)
|
getStorageVolumeType(char *type)
|
||||||
{
|
{
|
||||||
if (STREQ(type,"lvmoiscsi") ||
|
if (STREQ(type, "lvmoiscsi") ||
|
||||||
STREQ(type,"lvmohba") ||
|
STREQ(type, "lvmohba") ||
|
||||||
STREQ(type,"lvm") ||
|
STREQ(type, "lvm") ||
|
||||||
STREQ(type,"file") ||
|
STREQ(type, "file") ||
|
||||||
STREQ(type,"iso") ||
|
STREQ(type, "iso") ||
|
||||||
STREQ(type,"ext") ||
|
STREQ(type, "ext") ||
|
||||||
STREQ(type,"nfs"))
|
STREQ(type, "nfs"))
|
||||||
return (int)VIR_STORAGE_VOL_FILE;
|
return (int)VIR_STORAGE_VOL_FILE;
|
||||||
else if (STREQ(type,"iscsi") ||
|
else if (STREQ(type, "iscsi") ||
|
||||||
STREQ(type,"equal") ||
|
STREQ(type, "equal") ||
|
||||||
STREQ(type,"hba") ||
|
STREQ(type, "hba") ||
|
||||||
STREQ(type,"cslg") ||
|
STREQ(type, "cslg") ||
|
||||||
STREQ(type,"udev") ||
|
STREQ(type, "udev") ||
|
||||||
STREQ(type,"netapp"))
|
STREQ(type, "netapp"))
|
||||||
return (int)VIR_STORAGE_VOL_BLOCK;
|
return (int)VIR_STORAGE_VOL_BLOCK;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -2257,7 +2257,7 @@ xenFormatSxpr(virConnectPtr conn,
|
|||||||
if (hvm &&
|
if (hvm &&
|
||||||
def->os.loader == NULL) {
|
def->os.loader == NULL) {
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||||
"%s",_("no HVM domain loader"));
|
"%s", _("no HVM domain loader"));
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1891,7 +1891,7 @@ virConfPtr xenFormatXM(virConnectPtr conn,
|
|||||||
netVal->list = NULL;
|
netVal->list = NULL;
|
||||||
|
|
||||||
for (i = 0; i < def->nnets; i++) {
|
for (i = 0; i < def->nnets; i++) {
|
||||||
if (xenFormatXMNet(conn, netVal,def->nets[i],
|
if (xenFormatXMNet(conn, netVal, def->nets[i],
|
||||||
hvm, xendConfigVersion) < 0)
|
hvm, xendConfigVersion) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user