mirror of https://gitee.com/openkylin/libvirt.git
Use K&R style for curly braces in src/xen*/
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
f19b3a5f0c
commit
6e28dee258
|
@ -164,7 +164,8 @@ static virDomainDefPtr xenGetDomainDefForDom(virDomainPtr dom)
|
||||||
* until reboot which might be false in future Xen implementations.
|
* until reboot which might be false in future Xen implementations.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
xenNumaInit(virConnectPtr conn) {
|
xenNumaInit(virConnectPtr conn)
|
||||||
|
{
|
||||||
virNodeInfo nodeInfo;
|
virNodeInfo nodeInfo;
|
||||||
xenUnifiedPrivatePtr priv;
|
xenUnifiedPrivatePtr priv;
|
||||||
int ret;
|
int ret;
|
||||||
|
@ -1916,7 +1917,8 @@ cleanup:
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
xenUnifiedDomainUndefine(virDomainPtr dom) {
|
xenUnifiedDomainUndefine(virDomainPtr dom)
|
||||||
|
{
|
||||||
return xenUnifiedDomainUndefineFlags(dom, 0);
|
return xenUnifiedDomainUndefineFlags(dom, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* xen_hypervisor.c: direct access to Xen hypervisor level
|
* xen_hypervisor.c: direct access to Xen hypervisor level
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005-2013 Red Hat, Inc.
|
* Copyright (C) 2005-2014 Red Hat, Inc.
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
@ -2006,7 +2006,8 @@ xenHypervisorInit(struct xenHypervisorVersions *override_versions)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int xenHypervisorOnceInit(void) {
|
static int xenHypervisorOnceInit(void)
|
||||||
|
{
|
||||||
return xenHypervisorInit(NULL);
|
return xenHypervisorInit(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* xm_internal.c: helper routines for dealing with inactive domains
|
* xm_internal.c: helper routines for dealing with inactive domains
|
||||||
*
|
*
|
||||||
* Copyright (C) 2006-2007, 2009-2013 Red Hat, Inc.
|
* Copyright (C) 2006-2007, 2009-2014 Red Hat, Inc.
|
||||||
* Copyright (C) 2006 Daniel P. Berrange
|
* Copyright (C) 2006 Daniel P. Berrange
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
|
@ -94,7 +94,8 @@ static int xenInotifyActive(virConnectPtr conn)
|
||||||
|
|
||||||
|
|
||||||
/* Release memory associated with a cached config object */
|
/* Release memory associated with a cached config object */
|
||||||
static void xenXMConfigFree(void *payload, const void *key ATTRIBUTE_UNUSED) {
|
static void xenXMConfigFree(void *payload, const void *key ATTRIBUTE_UNUSED)
|
||||||
|
{
|
||||||
xenXMConfCachePtr entry = (xenXMConfCachePtr)payload;
|
xenXMConfCachePtr entry = (xenXMConfCachePtr)payload;
|
||||||
virDomainDefFree(entry->def);
|
virDomainDefFree(entry->def);
|
||||||
VIR_FREE(entry->filename);
|
VIR_FREE(entry->filename);
|
||||||
|
@ -1117,7 +1118,10 @@ struct xenXMListIteratorContext {
|
||||||
};
|
};
|
||||||
|
|
||||||
static void
|
static void
|
||||||
xenXMListIterator(void *payload ATTRIBUTE_UNUSED, const void *name, void *data) {
|
xenXMListIterator(void *payload ATTRIBUTE_UNUSED,
|
||||||
|
const void *name,
|
||||||
|
void *data)
|
||||||
|
{
|
||||||
struct xenXMListIteratorContext *ctx = data;
|
struct xenXMListIteratorContext *ctx = data;
|
||||||
virDomainDefPtr def = NULL;
|
virDomainDefPtr def = NULL;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* xenapi_utils.c: Xen API driver -- utils parts.
|
* xenapi_utils.c: Xen API driver -- utils parts.
|
||||||
* Copyright (C) 2011-2013 Red Hat, Inc.
|
* Copyright (C) 2011-2014 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
|
||||||
|
@ -181,7 +181,8 @@ createXenAPIBootOrderString(int nboot, int *bootDevs)
|
||||||
|
|
||||||
/* convert boot order string to libvirt boot order enum */
|
/* convert boot order string to libvirt boot order enum */
|
||||||
enum virDomainBootOrder
|
enum virDomainBootOrder
|
||||||
map2LibvirtBootOrder(char c) {
|
map2LibvirtBootOrder(char c)
|
||||||
|
{
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case 'a':
|
case 'a':
|
||||||
return VIR_DOMAIN_BOOT_FLOPPY;
|
return VIR_DOMAIN_BOOT_FLOPPY;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* xen_xm.c: Xen XM parsing functions
|
* xen_xm.c: Xen XM parsing functions
|
||||||
*
|
*
|
||||||
* Copyright (C) 2006-2007, 2009-2010, 2012-2013 Red Hat, Inc.
|
* Copyright (C) 2006-2007, 2009-2010, 2012-2014 Red Hat, Inc.
|
||||||
* Copyright (C) 2011 Univention GmbH
|
* Copyright (C) 2011 Univention GmbH
|
||||||
* Copyright (C) 2006 Daniel P. Berrange
|
* Copyright (C) 2006 Daniel P. Berrange
|
||||||
*
|
*
|
||||||
|
@ -44,7 +44,8 @@
|
||||||
static int xenXMConfigGetBool(virConfPtr conf,
|
static int xenXMConfigGetBool(virConfPtr conf,
|
||||||
const char *name,
|
const char *name,
|
||||||
int *value,
|
int *value,
|
||||||
int def) {
|
int def)
|
||||||
|
{
|
||||||
virConfValuePtr val;
|
virConfValuePtr val;
|
||||||
|
|
||||||
*value = 0;
|
*value = 0;
|
||||||
|
@ -70,7 +71,8 @@ static int xenXMConfigGetBool(virConfPtr conf,
|
||||||
static int xenXMConfigGetULong(virConfPtr conf,
|
static int xenXMConfigGetULong(virConfPtr conf,
|
||||||
const char *name,
|
const char *name,
|
||||||
unsigned long *value,
|
unsigned long *value,
|
||||||
unsigned long def) {
|
unsigned long def)
|
||||||
|
{
|
||||||
virConfValuePtr val;
|
virConfValuePtr val;
|
||||||
|
|
||||||
*value = 0;
|
*value = 0;
|
||||||
|
@ -102,7 +104,8 @@ static int xenXMConfigGetULong(virConfPtr conf,
|
||||||
static int xenXMConfigGetULongLong(virConfPtr conf,
|
static int xenXMConfigGetULongLong(virConfPtr conf,
|
||||||
const char *name,
|
const char *name,
|
||||||
unsigned long long *value,
|
unsigned long long *value,
|
||||||
unsigned long long def) {
|
unsigned long long def)
|
||||||
|
{
|
||||||
virConfValuePtr val;
|
virConfValuePtr val;
|
||||||
|
|
||||||
*value = 0;
|
*value = 0;
|
||||||
|
@ -134,7 +137,8 @@ static int xenXMConfigGetULongLong(virConfPtr conf,
|
||||||
static int xenXMConfigGetString(virConfPtr conf,
|
static int xenXMConfigGetString(virConfPtr conf,
|
||||||
const char *name,
|
const char *name,
|
||||||
const char **value,
|
const char **value,
|
||||||
const char *def) {
|
const char *def)
|
||||||
|
{
|
||||||
virConfValuePtr val;
|
virConfValuePtr val;
|
||||||
|
|
||||||
*value = NULL;
|
*value = NULL;
|
||||||
|
@ -158,7 +162,8 @@ static int xenXMConfigGetString(virConfPtr conf,
|
||||||
static int xenXMConfigCopyStringInternal(virConfPtr conf,
|
static int xenXMConfigCopyStringInternal(virConfPtr conf,
|
||||||
const char *name,
|
const char *name,
|
||||||
char **value,
|
char **value,
|
||||||
int allowMissing) {
|
int allowMissing)
|
||||||
|
{
|
||||||
virConfValuePtr val;
|
virConfValuePtr val;
|
||||||
|
|
||||||
*value = NULL;
|
*value = NULL;
|
||||||
|
@ -201,7 +206,9 @@ static int xenXMConfigCopyStringOpt(virConfPtr conf,
|
||||||
|
|
||||||
|
|
||||||
/* Convenience method to grab a string UUID from the config file object */
|
/* Convenience method to grab a string UUID from the config file object */
|
||||||
static int xenXMConfigGetUUID(virConfPtr conf, const char *name, unsigned char *uuid) {
|
static int
|
||||||
|
xenXMConfigGetUUID(virConfPtr conf, const char *name, unsigned char *uuid)
|
||||||
|
{
|
||||||
virConfValuePtr val;
|
virConfValuePtr val;
|
||||||
|
|
||||||
if (!uuid || !name || !conf) {
|
if (!uuid || !name || !conf) {
|
||||||
|
@ -248,7 +255,8 @@ static int xenXMConfigGetUUID(virConfPtr conf, const char *name, unsigned char *
|
||||||
*/
|
*/
|
||||||
virDomainDefPtr
|
virDomainDefPtr
|
||||||
xenParseXM(virConfPtr conf, int xendConfigVersion,
|
xenParseXM(virConfPtr conf, int xendConfigVersion,
|
||||||
virCapsPtr caps) {
|
virCapsPtr caps)
|
||||||
|
{
|
||||||
const char *str;
|
const char *str;
|
||||||
int hvm = 0;
|
int hvm = 0;
|
||||||
int val;
|
int val;
|
||||||
|
@ -1139,7 +1147,8 @@ cleanup:
|
||||||
|
|
||||||
|
|
||||||
static
|
static
|
||||||
int xenXMConfigSetInt(virConfPtr conf, const char *setting, long long l) {
|
int xenXMConfigSetInt(virConfPtr conf, const char *setting, long long l)
|
||||||
|
{
|
||||||
virConfValuePtr value = NULL;
|
virConfValuePtr value = NULL;
|
||||||
|
|
||||||
if ((long) l != l) {
|
if ((long) l != l) {
|
||||||
|
@ -1158,8 +1167,9 @@ int xenXMConfigSetInt(virConfPtr conf, const char *setting, long long l) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static
|
static int
|
||||||
int xenXMConfigSetString(virConfPtr conf, const char *setting, const char *str) {
|
xenXMConfigSetString(virConfPtr conf, const char *setting, const char *str)
|
||||||
|
{
|
||||||
virConfValuePtr value = NULL;
|
virConfValuePtr value = NULL;
|
||||||
|
|
||||||
if (VIR_ALLOC(value) < 0)
|
if (VIR_ALLOC(value) < 0)
|
||||||
|
@ -1478,7 +1488,8 @@ verify(MAX_VIRT_CPUS <= sizeof(1UL) * CHAR_BIT);
|
||||||
|
|
||||||
virConfPtr xenFormatXM(virConnectPtr conn,
|
virConfPtr xenFormatXM(virConnectPtr conn,
|
||||||
virDomainDefPtr def,
|
virDomainDefPtr def,
|
||||||
int xendConfigVersion) {
|
int xendConfigVersion)
|
||||||
|
{
|
||||||
virConfPtr conf = NULL;
|
virConfPtr conf = NULL;
|
||||||
int hvm = 0, vmlocaltime = 0;
|
int hvm = 0, vmlocaltime = 0;
|
||||||
size_t i;
|
size_t i;
|
||||||
|
|
Loading…
Reference in New Issue