mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
maint: align whitespaces with project conventions.
This commit is contained in:
parent
b70c093ffa
commit
721949059b
@ -70,22 +70,22 @@ const char *eventToString(int event) {
|
|||||||
const char *ret = "";
|
const char *ret = "";
|
||||||
switch ((virDomainEventType) event) {
|
switch ((virDomainEventType) event) {
|
||||||
case VIR_DOMAIN_EVENT_DEFINED:
|
case VIR_DOMAIN_EVENT_DEFINED:
|
||||||
ret ="Defined";
|
ret = "Defined";
|
||||||
break;
|
break;
|
||||||
case VIR_DOMAIN_EVENT_UNDEFINED:
|
case VIR_DOMAIN_EVENT_UNDEFINED:
|
||||||
ret ="Undefined";
|
ret = "Undefined";
|
||||||
break;
|
break;
|
||||||
case VIR_DOMAIN_EVENT_STARTED:
|
case VIR_DOMAIN_EVENT_STARTED:
|
||||||
ret ="Started";
|
ret = "Started";
|
||||||
break;
|
break;
|
||||||
case VIR_DOMAIN_EVENT_SUSPENDED:
|
case VIR_DOMAIN_EVENT_SUSPENDED:
|
||||||
ret ="Suspended";
|
ret = "Suspended";
|
||||||
break;
|
break;
|
||||||
case VIR_DOMAIN_EVENT_RESUMED:
|
case VIR_DOMAIN_EVENT_RESUMED:
|
||||||
ret ="Resumed";
|
ret = "Resumed";
|
||||||
break;
|
break;
|
||||||
case VIR_DOMAIN_EVENT_STOPPED:
|
case VIR_DOMAIN_EVENT_STOPPED:
|
||||||
ret ="Stopped";
|
ret = "Stopped";
|
||||||
break;
|
break;
|
||||||
case VIR_DOMAIN_EVENT_SHUTDOWN:
|
case VIR_DOMAIN_EVENT_SHUTDOWN:
|
||||||
ret = "Shutdown";
|
ret = "Shutdown";
|
||||||
@ -229,16 +229,16 @@ networkEventToString(int event)
|
|||||||
const char *ret = "";
|
const char *ret = "";
|
||||||
switch ((virNetworkEventLifecycleType) event) {
|
switch ((virNetworkEventLifecycleType) event) {
|
||||||
case VIR_NETWORK_EVENT_DEFINED:
|
case VIR_NETWORK_EVENT_DEFINED:
|
||||||
ret ="Defined";
|
ret = "Defined";
|
||||||
break;
|
break;
|
||||||
case VIR_NETWORK_EVENT_UNDEFINED:
|
case VIR_NETWORK_EVENT_UNDEFINED:
|
||||||
ret ="Undefined";
|
ret = "Undefined";
|
||||||
break;
|
break;
|
||||||
case VIR_NETWORK_EVENT_STARTED:
|
case VIR_NETWORK_EVENT_STARTED:
|
||||||
ret ="Started";
|
ret = "Started";
|
||||||
break;
|
break;
|
||||||
case VIR_NETWORK_EVENT_STOPPED:
|
case VIR_NETWORK_EVENT_STOPPED:
|
||||||
ret ="Stopped";
|
ret = "Stopped";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -165,8 +165,8 @@ static const char srcmacaddr_str[] = "srcmacaddr";
|
|||||||
static const char srcmacmask_str[] = "srcmacmask";
|
static const char srcmacmask_str[] = "srcmacmask";
|
||||||
static const char dstmacaddr_str[] = "dstmacaddr";
|
static const char dstmacaddr_str[] = "dstmacaddr";
|
||||||
static const char dstmacmask_str[] = "dstmacmask";
|
static const char dstmacmask_str[] = "dstmacmask";
|
||||||
static const char arpsrcmacaddr_str[]= "arpsrcmacaddr";
|
static const char arpsrcmacaddr_str[] = "arpsrcmacaddr";
|
||||||
static const char arpdstmacaddr_str[]= "arpdstmacaddr";
|
static const char arpdstmacaddr_str[] = "arpdstmacaddr";
|
||||||
static const char arpsrcipaddr_str[] = "arpsrcipaddr";
|
static const char arpsrcipaddr_str[] = "arpsrcipaddr";
|
||||||
static const char arpdstipaddr_str[] = "arpdstipaddr";
|
static const char arpdstipaddr_str[] = "arpdstipaddr";
|
||||||
static const char srcipaddr_str[] = "srcipaddr";
|
static const char srcipaddr_str[] = "srcipaddr";
|
||||||
@ -1116,8 +1116,8 @@ static const virXMLAttr2Struct macAttributes[] = {
|
|||||||
.name = "protocolid",
|
.name = "protocolid",
|
||||||
.datatype = DATATYPE_UINT16 | DATATYPE_UINT16_HEX | DATATYPE_STRING,
|
.datatype = DATATYPE_UINT16 | DATATYPE_UINT16_HEX | DATATYPE_STRING,
|
||||||
.dataIdx = offsetof(virNWFilterRuleDef, p.ethHdrFilter.dataProtocolID),
|
.dataIdx = offsetof(virNWFilterRuleDef, p.ethHdrFilter.dataProtocolID),
|
||||||
.validator= checkMacProtocolID,
|
.validator = checkMacProtocolID,
|
||||||
.formatter= macProtocolIDFormatter,
|
.formatter = macProtocolIDFormatter,
|
||||||
},
|
},
|
||||||
COMMENT_PROP(ethHdrFilter),
|
COMMENT_PROP(ethHdrFilter),
|
||||||
{
|
{
|
||||||
@ -1292,8 +1292,8 @@ static const virXMLAttr2Struct arpAttributes[] = {
|
|||||||
.name = "opcode",
|
.name = "opcode",
|
||||||
.datatype = DATATYPE_UINT16 | DATATYPE_UINT16_HEX | DATATYPE_STRING,
|
.datatype = DATATYPE_UINT16 | DATATYPE_UINT16_HEX | DATATYPE_STRING,
|
||||||
.dataIdx = offsetof(virNWFilterRuleDef, p.arpHdrFilter.dataOpcode),
|
.dataIdx = offsetof(virNWFilterRuleDef, p.arpHdrFilter.dataOpcode),
|
||||||
.validator= arpOpcodeValidator,
|
.validator = arpOpcodeValidator,
|
||||||
.formatter= arpOpcodeFormatter,
|
.formatter = arpOpcodeFormatter,
|
||||||
}, {
|
}, {
|
||||||
.name = ARPSRCMACADDR,
|
.name = ARPSRCMACADDR,
|
||||||
.datatype = DATATYPE_MACADDR,
|
.datatype = DATATYPE_MACADDR,
|
||||||
@ -1347,8 +1347,8 @@ static const virXMLAttr2Struct ipAttributes[] = {
|
|||||||
.name = "protocol",
|
.name = "protocol",
|
||||||
.datatype = DATATYPE_STRING | DATATYPE_UINT8 | DATATYPE_UINT8_HEX,
|
.datatype = DATATYPE_STRING | DATATYPE_UINT8 | DATATYPE_UINT8_HEX,
|
||||||
.dataIdx = offsetof(virNWFilterRuleDef, p.ipHdrFilter.ipHdr.dataProtocolID),
|
.dataIdx = offsetof(virNWFilterRuleDef, p.ipHdrFilter.ipHdr.dataProtocolID),
|
||||||
.validator= checkIPProtocolID,
|
.validator = checkIPProtocolID,
|
||||||
.formatter= formatIPProtocolID,
|
.formatter = formatIPProtocolID,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.name = SRCPORTSTART,
|
.name = SRCPORTSTART,
|
||||||
@ -1409,8 +1409,8 @@ static const virXMLAttr2Struct ipv6Attributes[] = {
|
|||||||
.name = "protocol",
|
.name = "protocol",
|
||||||
.datatype = DATATYPE_STRING | DATATYPE_UINT8 | DATATYPE_UINT8_HEX,
|
.datatype = DATATYPE_STRING | DATATYPE_UINT8 | DATATYPE_UINT8_HEX,
|
||||||
.dataIdx = offsetof(virNWFilterRuleDef, p.ipv6HdrFilter.ipHdr.dataProtocolID),
|
.dataIdx = offsetof(virNWFilterRuleDef, p.ipv6HdrFilter.ipHdr.dataProtocolID),
|
||||||
.validator= checkIPProtocolID,
|
.validator = checkIPProtocolID,
|
||||||
.formatter= formatIPProtocolID,
|
.formatter = formatIPProtocolID,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.name = SRCPORTSTART,
|
.name = SRCPORTSTART,
|
||||||
@ -2309,7 +2309,7 @@ virNWFilterRuleParse(xmlNodePtr node)
|
|||||||
action = virXMLPropString(node, "action");
|
action = virXMLPropString(node, "action");
|
||||||
direction = virXMLPropString(node, "direction");
|
direction = virXMLPropString(node, "direction");
|
||||||
prio = virXMLPropString(node, "priority");
|
prio = virXMLPropString(node, "priority");
|
||||||
statematch= virXMLPropString(node, "statematch");
|
statematch = virXMLPropString(node, "statematch");
|
||||||
|
|
||||||
if (!action) {
|
if (!action) {
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||||
|
@ -4695,7 +4695,7 @@ esxVI_LookupHostInternetScsiHba(esxVI_Context *ctx,
|
|||||||
for (hostHostBusAdapter = hostHostBusAdapterList;
|
for (hostHostBusAdapter = hostHostBusAdapterList;
|
||||||
hostHostBusAdapter;
|
hostHostBusAdapter;
|
||||||
hostHostBusAdapter = hostHostBusAdapter->_next) {
|
hostHostBusAdapter = hostHostBusAdapter->_next) {
|
||||||
esxVI_HostInternetScsiHba *candidate=
|
esxVI_HostInternetScsiHba *candidate =
|
||||||
esxVI_HostInternetScsiHba_DynamicCast(hostHostBusAdapter);
|
esxVI_HostInternetScsiHba_DynamicCast(hostHostBusAdapter);
|
||||||
|
|
||||||
if (candidate) {
|
if (candidate) {
|
||||||
|
@ -8264,7 +8264,7 @@ virDomainBlockResize(virDomainPtr dom,
|
|||||||
|
|
||||||
if (conn->driver->domainBlockResize) {
|
if (conn->driver->domainBlockResize) {
|
||||||
int ret;
|
int ret;
|
||||||
ret =conn->driver->domainBlockResize(dom, disk, size, flags);
|
ret = conn->driver->domainBlockResize(dom, disk, size, flags);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto error;
|
goto error;
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -557,7 +557,7 @@ learnIPAddressThread(void *arg)
|
|||||||
iphdr->ihl * 4 +
|
iphdr->ihl * 4 +
|
||||||
sizeof(struct udphdr))) {
|
sizeof(struct udphdr))) {
|
||||||
VIR_WARNINGS_NO_CAST_ALIGN
|
VIR_WARNINGS_NO_CAST_ALIGN
|
||||||
struct udphdr *udphdr= (struct udphdr *)
|
struct udphdr *udphdr = (struct udphdr *)
|
||||||
((char *)iphdr + iphdr->ihl * 4);
|
((char *)iphdr + iphdr->ihl * 4);
|
||||||
VIR_WARNINGS_RESET
|
VIR_WARNINGS_RESET
|
||||||
if (ntohs(udphdr->source) == 67 &&
|
if (ntohs(udphdr->source) == 67 &&
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* openvz_conf.c: config functions for managing OpenVZ VEs
|
* openvz_conf.c: config functions for managing OpenVZ VEs
|
||||||
*
|
*
|
||||||
* Copyright (C) 2010-2012 Red Hat, Inc.
|
* Copyright (C) 2010-2012, 2014 Red Hat, Inc.
|
||||||
* Copyright (C) 2006, 2007 Binary Karma
|
* Copyright (C) 2006, 2007 Binary Karma
|
||||||
* Copyright (C) 2006 Shuveb Hussain
|
* Copyright (C) 2006 Shuveb Hussain
|
||||||
* Copyright (C) 2007 Anoop Joe Cyriac
|
* Copyright (C) 2007 Anoop Joe Cyriac
|
||||||
@ -937,7 +937,7 @@ static char *
|
|||||||
openvzLocateConfDir(void)
|
openvzLocateConfDir(void)
|
||||||
{
|
{
|
||||||
const char *conf_dir_list[] = {"/etc/vz/conf", "/usr/local/etc/conf", NULL};
|
const char *conf_dir_list[] = {"/etc/vz/conf", "/usr/local/etc/conf", NULL};
|
||||||
int i=0;
|
size_t i = 0;
|
||||||
char *ret = NULL;
|
char *ret = NULL;
|
||||||
|
|
||||||
while (conf_dir_list[i]) {
|
while (conf_dir_list[i]) {
|
||||||
|
@ -786,7 +786,7 @@ openvzGenerateContainerVethName(int veid)
|
|||||||
int max = 0;
|
int max = 0;
|
||||||
|
|
||||||
/* get maximum interface number (actually, it is the last one) */
|
/* get maximum interface number (actually, it is the last one) */
|
||||||
for (s=strtok_r(temp, ";", &saveptr); s; s=strtok_r(NULL, ";", &saveptr)) {
|
for (s = strtok_r(temp, ";", &saveptr); s; s = strtok_r(NULL, ";", &saveptr)) {
|
||||||
int x;
|
int x;
|
||||||
|
|
||||||
if (sscanf(s, "ifname=eth%d", &x) != 1) return NULL;
|
if (sscanf(s, "ifname=eth%d", &x) != 1) return NULL;
|
||||||
|
@ -68,7 +68,7 @@
|
|||||||
static unsigned const int HMC = 0;
|
static unsigned const int HMC = 0;
|
||||||
static unsigned const int IVM = 127;
|
static unsigned const int IVM = 127;
|
||||||
static unsigned const int PHYP_IFACENAME_SIZE = 24;
|
static unsigned const int PHYP_IFACENAME_SIZE = 24;
|
||||||
static unsigned const int PHYP_MAC_SIZE= 12;
|
static unsigned const int PHYP_MAC_SIZE = 12;
|
||||||
|
|
||||||
static int
|
static int
|
||||||
waitsocket(int socket_fd, LIBSSH2_SESSION * session)
|
waitsocket(int socket_fd, LIBSSH2_SESSION * session)
|
||||||
|
@ -1347,7 +1347,7 @@ virLogParseOutputs(const char *outputs)
|
|||||||
|
|
||||||
virSkipSpaces(&cur);
|
virSkipSpaces(&cur);
|
||||||
while (*cur != 0) {
|
while (*cur != 0) {
|
||||||
prio= virParseNumber(&cur);
|
prio = virParseNumber(&cur);
|
||||||
if ((prio < VIR_LOG_DEBUG) || (prio > VIR_LOG_ERROR))
|
if ((prio < VIR_LOG_DEBUG) || (prio > VIR_LOG_ERROR))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
if (*cur != ':')
|
if (*cur != ':')
|
||||||
@ -1452,7 +1452,7 @@ virLogParseFilters(const char *filters)
|
|||||||
virSkipSpaces(&cur);
|
virSkipSpaces(&cur);
|
||||||
while (*cur != 0) {
|
while (*cur != 0) {
|
||||||
unsigned int flags = 0;
|
unsigned int flags = 0;
|
||||||
prio= virParseNumber(&cur);
|
prio = virParseNumber(&cur);
|
||||||
if ((prio < VIR_LOG_DEBUG) || (prio > VIR_LOG_ERROR))
|
if ((prio < VIR_LOG_DEBUG) || (prio > VIR_LOG_ERROR))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
if (*cur != ':')
|
if (*cur != ':')
|
||||||
|
@ -425,7 +425,7 @@ virSysinfoParseProcessor(const char *base, virSysinfoDefPtr ret)
|
|||||||
int result = -1;
|
int result = -1;
|
||||||
virSysinfoProcessorDefPtr processor;
|
virSysinfoProcessorDefPtr processor;
|
||||||
|
|
||||||
if (!(tmp_base=virSysinfoParseLine(base, "vendor_id", &manufacturer)))
|
if (!(tmp_base = virSysinfoParseLine(base, "vendor_id", &manufacturer)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
/* Find processor N: line and gather the processor manufacturer,
|
/* Find processor N: line and gather the processor manufacturer,
|
||||||
|
@ -2841,7 +2841,7 @@ xenUnifiedDomainInfoListFree(xenUnifiedDomainInfoListPtr list)
|
|||||||
if (list == NULL)
|
if (list == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (i=0; i<list->count; i++) {
|
for (i = 0; i < list->count; i++) {
|
||||||
VIR_FREE(list->doms[i]->name);
|
VIR_FREE(list->doms[i]->name);
|
||||||
VIR_FREE(list->doms[i]);
|
VIR_FREE(list->doms[i]);
|
||||||
}
|
}
|
||||||
@ -2865,7 +2865,7 @@ xenUnifiedAddDomainInfo(xenUnifiedDomainInfoListPtr list,
|
|||||||
int n;
|
int n;
|
||||||
|
|
||||||
/* check if we already have this callback on our list */
|
/* check if we already have this callback on our list */
|
||||||
for (n=0; n < list->count; n++) {
|
for (n = 0; n < list->count; n++) {
|
||||||
if (STREQ(list->doms[n]->name, name) &&
|
if (STREQ(list->doms[n]->name, name) &&
|
||||||
!memcmp(list->doms[n]->uuid, uuid, VIR_UUID_BUFLEN)) {
|
!memcmp(list->doms[n]->uuid, uuid, VIR_UUID_BUFLEN)) {
|
||||||
VIR_DEBUG("WARNING: dom already tracked");
|
VIR_DEBUG("WARNING: dom already tracked");
|
||||||
|
@ -616,7 +616,7 @@ static void
|
|||||||
xenStoreWatchListFree(xenStoreWatchListPtr list)
|
xenStoreWatchListFree(xenStoreWatchListPtr list)
|
||||||
{
|
{
|
||||||
size_t i;
|
size_t i;
|
||||||
for (i=0; i<list->count; i++) {
|
for (i = 0; i < list->count; i++) {
|
||||||
VIR_FREE(list->watches[i]->path);
|
VIR_FREE(list->watches[i]->path);
|
||||||
VIR_FREE(list->watches[i]->token);
|
VIR_FREE(list->watches[i]->token);
|
||||||
VIR_FREE(list->watches[i]);
|
VIR_FREE(list->watches[i]);
|
||||||
@ -648,7 +648,7 @@ xenStoreAddWatch(virConnectPtr conn,
|
|||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
/* check if we already have this callback on our list */
|
/* check if we already have this callback on our list */
|
||||||
for (n=0; n < list->count; n++) {
|
for (n = 0; n < list->count; n++) {
|
||||||
if (STREQ(list->watches[n]->path, path) &&
|
if (STREQ(list->watches[n]->path, path) &&
|
||||||
STREQ(list->watches[n]->token, token)) {
|
STREQ(list->watches[n]->token, token)) {
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||||
@ -825,7 +825,7 @@ retry:
|
|||||||
}
|
}
|
||||||
|
|
||||||
missing = 0;
|
missing = 0;
|
||||||
for (i=0; i < new_domain_cnt; i++) {
|
for (i = 0; i < new_domain_cnt; i++) {
|
||||||
found = 0;
|
found = 0;
|
||||||
for (j = 0; j < priv->activeDomainList->count; j++) {
|
for (j = 0; j < priv->activeDomainList->count; j++) {
|
||||||
if (priv->activeDomainList->doms[j]->id == new_domids[i]) {
|
if (priv->activeDomainList->doms[j]->id == new_domids[i]) {
|
||||||
@ -908,9 +908,9 @@ retry:
|
|||||||
}
|
}
|
||||||
|
|
||||||
removed = 0;
|
removed = 0;
|
||||||
for (j=0; j < priv->activeDomainList->count; j++) {
|
for (j = 0; j < priv->activeDomainList->count; j++) {
|
||||||
found = 0;
|
found = 0;
|
||||||
for (i=0; i < new_domain_cnt; i++) {
|
for (i = 0; i < new_domain_cnt; i++) {
|
||||||
if (priv->activeDomainList->doms[j]->id == new_domids[i]) {
|
if (priv->activeDomainList->doms[j]->id == new_domids[i]) {
|
||||||
found = 1;
|
found = 1;
|
||||||
break;
|
break;
|
||||||
|
@ -582,7 +582,7 @@ xenapiDomainLookupByID(virConnectPtr conn, int id)
|
|||||||
xen_vm_set *result;
|
xen_vm_set *result;
|
||||||
xen_vm_record *record;
|
xen_vm_record *record;
|
||||||
unsigned char raw_uuid[VIR_UUID_BUFLEN];
|
unsigned char raw_uuid[VIR_UUID_BUFLEN];
|
||||||
virDomainPtr domP=NULL;
|
virDomainPtr domP = NULL;
|
||||||
xen_session *session = ((struct _xenapiPrivate *)(conn->privateData))->session;
|
xen_session *session = ((struct _xenapiPrivate *)(conn->privateData))->session;
|
||||||
|
|
||||||
xen_session_get_this_host(session, &host, session);
|
xen_session_get_this_host(session, &host, session);
|
||||||
@ -722,7 +722,7 @@ xenapiDomainSuspend(virDomainPtr dom)
|
|||||||
{
|
{
|
||||||
/* vm.pause() */
|
/* vm.pause() */
|
||||||
xen_vm vm;
|
xen_vm vm;
|
||||||
xen_vm_set *vms=NULL;
|
xen_vm_set *vms = NULL;
|
||||||
xen_session *session = ((struct _xenapiPrivate *)(dom->conn->privateData))->session;
|
xen_session *session = ((struct _xenapiPrivate *)(dom->conn->privateData))->session;
|
||||||
if (xen_vm_get_by_name_label(session, &vms, dom->name) && vms->size > 0) {
|
if (xen_vm_get_by_name_label(session, &vms, dom->name) && vms->size > 0) {
|
||||||
if (vms->size != 1) {
|
if (vms->size != 1) {
|
||||||
@ -931,10 +931,10 @@ xenapiDomainDestroy(virDomainPtr dom)
|
|||||||
static char *
|
static char *
|
||||||
xenapiDomainGetOSType(virDomainPtr dom)
|
xenapiDomainGetOSType(virDomainPtr dom)
|
||||||
{
|
{
|
||||||
xen_vm vm=NULL;
|
xen_vm vm = NULL;
|
||||||
xen_vm_set *vms;
|
xen_vm_set *vms;
|
||||||
char *ostype = NULL;
|
char *ostype = NULL;
|
||||||
char *boot_policy=NULL;
|
char *boot_policy = NULL;
|
||||||
xen_session *session = ((struct _xenapiPrivate *)(dom->conn->privateData))->session;
|
xen_session *session = ((struct _xenapiPrivate *)(dom->conn->privateData))->session;
|
||||||
|
|
||||||
if (xen_vm_get_by_name_label(session, &vms, dom->name) && vms->size > 0) {
|
if (xen_vm_get_by_name_label(session, &vms, dom->name) && vms->size > 0) {
|
||||||
@ -1360,14 +1360,14 @@ xenapiDomainGetMaxVcpus(virDomainPtr dom)
|
|||||||
static char *
|
static char *
|
||||||
xenapiDomainGetXMLDesc(virDomainPtr dom, unsigned int flags)
|
xenapiDomainGetXMLDesc(virDomainPtr dom, unsigned int flags)
|
||||||
{
|
{
|
||||||
xen_vm vm=NULL;
|
xen_vm vm = NULL;
|
||||||
xen_vm_set *vms;
|
xen_vm_set *vms;
|
||||||
xen_string_string_map *result=NULL;
|
xen_string_string_map *result = NULL;
|
||||||
xen_session *session = ((struct _xenapiPrivate *)(dom->conn->privateData))->session;
|
xen_session *session = ((struct _xenapiPrivate *)(dom->conn->privateData))->session;
|
||||||
virDomainDefPtr defPtr = NULL;
|
virDomainDefPtr defPtr = NULL;
|
||||||
char *boot_policy = NULL;
|
char *boot_policy = NULL;
|
||||||
unsigned long memory=0;
|
unsigned long memory = 0;
|
||||||
int64_t dynamic_mem=0;
|
int64_t dynamic_mem = 0;
|
||||||
char *val = NULL;
|
char *val = NULL;
|
||||||
struct xen_vif_set *vif_set = NULL;
|
struct xen_vif_set *vif_set = NULL;
|
||||||
char *xml;
|
char *xml;
|
||||||
@ -1700,9 +1700,9 @@ static virDomainPtr
|
|||||||
xenapiDomainDefineXML(virConnectPtr conn, const char *xml)
|
xenapiDomainDefineXML(virConnectPtr conn, const char *xml)
|
||||||
{
|
{
|
||||||
struct _xenapiPrivate *priv = conn->privateData;
|
struct _xenapiPrivate *priv = conn->privateData;
|
||||||
xen_vm_record *record=NULL;
|
xen_vm_record *record = NULL;
|
||||||
xen_vm vm=NULL;
|
xen_vm vm = NULL;
|
||||||
virDomainPtr domP=NULL;
|
virDomainPtr domP = NULL;
|
||||||
if (!priv->caps)
|
if (!priv->caps)
|
||||||
return NULL;
|
return NULL;
|
||||||
virDomainDefPtr defPtr = virDomainDefParseString(xml,
|
virDomainDefPtr defPtr = virDomainDefParseString(xml,
|
||||||
|
@ -857,10 +857,10 @@ static int test21(const void *unused ATTRIBUTE_UNUSED)
|
|||||||
int ret = -1;
|
int ret = -1;
|
||||||
const char *wrbuf = "Hello world\n";
|
const char *wrbuf = "Hello world\n";
|
||||||
char *outbuf = NULL, *errbuf = NULL;
|
char *outbuf = NULL, *errbuf = NULL;
|
||||||
const char *outbufExpected="BEGIN STDOUT\n"
|
const char *outbufExpected = "BEGIN STDOUT\n"
|
||||||
"Hello world\n"
|
"Hello world\n"
|
||||||
"END STDOUT\n";
|
"END STDOUT\n";
|
||||||
const char *errbufExpected="BEGIN STDERR\n"
|
const char *errbufExpected = "BEGIN STDERR\n"
|
||||||
"Hello world\n"
|
"Hello world\n"
|
||||||
"END STDERR\n";
|
"END STDERR\n";
|
||||||
|
|
||||||
|
@ -705,7 +705,7 @@ testQemuMonitorJSONAttachChardev(const void *data)
|
|||||||
chr = (virDomainChrSourceDef) { .type = VIR_DOMAIN_CHR_TYPE_NULL };
|
chr = (virDomainChrSourceDef) { .type = VIR_DOMAIN_CHR_TYPE_NULL };
|
||||||
CHECK("chr_null", "{\"return\": {}}");
|
CHECK("chr_null", "{\"return\": {}}");
|
||||||
|
|
||||||
chr = (virDomainChrSourceDef) { .type =VIR_DOMAIN_CHR_TYPE_VC };
|
chr = (virDomainChrSourceDef) { .type = VIR_DOMAIN_CHR_TYPE_VC };
|
||||||
CHECK("chr_vc", "{\"return\": {}}");
|
CHECK("chr_vc", "{\"return\": {}}");
|
||||||
|
|
||||||
#define PTY_PATH "/dev/ttyS0"
|
#define PTY_PATH "/dev/ttyS0"
|
||||||
|
@ -9846,11 +9846,11 @@ cmdDetachInterface(vshControl *ctl, const vshCmd *cmd)
|
|||||||
{
|
{
|
||||||
virDomainPtr dom = NULL;
|
virDomainPtr dom = NULL;
|
||||||
xmlDocPtr xml = NULL;
|
xmlDocPtr xml = NULL;
|
||||||
xmlXPathObjectPtr obj=NULL;
|
xmlXPathObjectPtr obj = NULL;
|
||||||
xmlXPathContextPtr ctxt = NULL;
|
xmlXPathContextPtr ctxt = NULL;
|
||||||
xmlNodePtr cur = NULL, matchNode = NULL;
|
xmlNodePtr cur = NULL, matchNode = NULL;
|
||||||
char *detach_xml = NULL;
|
char *detach_xml = NULL;
|
||||||
const char *mac =NULL, *type = NULL;
|
const char *mac = NULL, *type = NULL;
|
||||||
char *doc = NULL;
|
char *doc = NULL;
|
||||||
char buf[64];
|
char buf[64];
|
||||||
int diff_mac;
|
int diff_mac;
|
||||||
@ -9986,7 +9986,7 @@ vshFindDisk(const char *doc,
|
|||||||
int type)
|
int type)
|
||||||
{
|
{
|
||||||
xmlDocPtr xml = NULL;
|
xmlDocPtr xml = NULL;
|
||||||
xmlXPathObjectPtr obj= NULL;
|
xmlXPathObjectPtr obj = NULL;
|
||||||
xmlXPathContextPtr ctxt = NULL;
|
xmlXPathContextPtr ctxt = NULL;
|
||||||
xmlNodePtr cur = NULL;
|
xmlNodePtr cur = NULL;
|
||||||
xmlNodePtr ret = NULL;
|
xmlNodePtr ret = NULL;
|
||||||
|
@ -149,7 +149,7 @@ cmdFreecell(vshControl *ctl, const vshCmd *cmd)
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
VIR_FREE(val);
|
VIR_FREE(val);
|
||||||
nodes_id[i]=id;
|
nodes_id[i] = id;
|
||||||
if (virNodeGetCellsFreeMemory(ctl->conn, &(nodes_free[i]),
|
if (virNodeGetCellsFreeMemory(ctl->conn, &(nodes_free[i]),
|
||||||
id, 1) != 1) {
|
id, 1) != 1) {
|
||||||
vshError(ctl, _("failed to get free memory for NUMA node "
|
vshError(ctl, _("failed to get free memory for NUMA node "
|
||||||
|
@ -117,7 +117,7 @@ cleanup:
|
|||||||
static char **virLoginShellGetShellArgv(virConfPtr conf)
|
static char **virLoginShellGetShellArgv(virConfPtr conf)
|
||||||
{
|
{
|
||||||
size_t i;
|
size_t i;
|
||||||
char **shargv=NULL;
|
char **shargv = NULL;
|
||||||
virConfValuePtr p;
|
virConfValuePtr p;
|
||||||
|
|
||||||
p = virConfGetValue(conf, "shell");
|
p = virConfGetValue(conf, "shell");
|
||||||
|
Loading…
Reference in New Issue
Block a user