mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 17:34:18 +03:00
Use K&R style for curly braces in remaining files
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
cd4da711a9
commit
95aed7febc
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* libvirtd-config.c: daemon start of day, guest process & i/o management
|
* libvirtd-config.c: daemon start of day, guest process & i/o management
|
||||||
*
|
*
|
||||||
* Copyright (C) 2006-2012 Red Hat, Inc.
|
* Copyright (C) 2006-2012, 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
|
||||||
@ -158,7 +158,12 @@ checkType(virConfValuePtr p, const char *filename,
|
|||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
|
||||||
static int remoteConfigGetAuth(virConfPtr conf, const char *key, int *auth, const char *filename) {
|
static int
|
||||||
|
remoteConfigGetAuth(virConfPtr conf,
|
||||||
|
const char *key,
|
||||||
|
int *auth,
|
||||||
|
const char *filename)
|
||||||
|
{
|
||||||
virConfValuePtr p;
|
virConfValuePtr p;
|
||||||
|
|
||||||
p = virConfGetValue(conf, key);
|
p = virConfGetValue(conf, key);
|
||||||
|
@ -560,7 +560,8 @@
|
|||||||
<pre>
|
<pre>
|
||||||
int runhook(const char *drvstr, const char *id,
|
int runhook(const char *drvstr, const char *id,
|
||||||
const char *opstr, const char *subopstr,
|
const char *opstr, const char *subopstr,
|
||||||
const char *extra) {
|
const char *extra)
|
||||||
|
{
|
||||||
int ret;
|
int ret;
|
||||||
char *path;
|
char *path;
|
||||||
virCommandPtr cmd;
|
virCommandPtr cmd;
|
||||||
|
@ -19,7 +19,8 @@
|
|||||||
* extract the domain 0 information
|
* extract the domain 0 information
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
getDomainInfo(int id) {
|
getDomainInfo(int id)
|
||||||
|
{
|
||||||
virConnectPtr conn = NULL; /* the hypervisor connection */
|
virConnectPtr conn = NULL; /* the hypervisor connection */
|
||||||
virDomainPtr dom = NULL; /* the domain being checked */
|
virDomainPtr dom = NULL; /* the domain being checked */
|
||||||
virDomainInfo info; /* the information being fetched */
|
virDomainInfo info; /* the information being fetched */
|
||||||
@ -55,8 +56,8 @@ error:
|
|||||||
virConnectClose(conn);
|
virConnectClose(conn);
|
||||||
}
|
}
|
||||||
|
|
||||||
int main() {
|
int main()
|
||||||
|
{
|
||||||
getDomainInfo(0);
|
getDomainInfo(0);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -696,7 +696,8 @@ cleanup:
|
|||||||
|
|
||||||
static int
|
static int
|
||||||
bhyveConnectGetMaxVcpus(virConnectPtr conn ATTRIBUTE_UNUSED,
|
bhyveConnectGetMaxVcpus(virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||||
const char *type) {
|
const char *type)
|
||||||
|
{
|
||||||
if (virConnectGetMaxVcpusEnsureACL(conn) < 0)
|
if (virConnectGetMaxVcpusEnsureACL(conn) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* interface_backend_netcf.c: backend driver methods to handle physical
|
* interface_backend_netcf.c: backend driver methods to handle physical
|
||||||
* interface configuration using the netcf library.
|
* interface configuration using the netcf library.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2006-2013 Red Hat, Inc.
|
* Copyright (C) 2006-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
|
||||||
@ -900,7 +900,8 @@ cleanup:
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int netcfInterfaceUndefine(virInterfacePtr ifinfo) {
|
static int netcfInterfaceUndefine(virInterfacePtr ifinfo)
|
||||||
|
{
|
||||||
virNetcfDriverStatePtr driver = ifinfo->conn->interfacePrivateData;
|
virNetcfDriverStatePtr driver = ifinfo->conn->interfacePrivateData;
|
||||||
struct netcf_if *iface = NULL;
|
struct netcf_if *iface = NULL;
|
||||||
virInterfaceDefPtr def = NULL;
|
virInterfaceDefPtr def = NULL;
|
||||||
@ -1190,7 +1191,8 @@ static virStateDriver interfaceStateDriver = {
|
|||||||
.stateReload = netcfStateReload,
|
.stateReload = netcfStateReload,
|
||||||
};
|
};
|
||||||
|
|
||||||
int netcfIfaceRegister(void) {
|
int netcfIfaceRegister(void)
|
||||||
|
{
|
||||||
if (virRegisterInterfaceDriver(&interfaceDriver) < 0) {
|
if (virRegisterInterfaceDriver(&interfaceDriver) < 0) {
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||||
_("failed to register netcf interface driver"));
|
_("failed to register netcf interface driver"));
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* interface_backend_udev.c: udev backend for virInterface
|
* interface_backend_udev.c: udev backend for virInterface
|
||||||
*
|
*
|
||||||
|
* Copyright (C) 2014 Red Hat, Inc.
|
||||||
* Copyright (C) 2012 Doug Goldstein <cardoe@cardoe.com>
|
* Copyright (C) 2012 Doug Goldstein <cardoe@cardoe.com>
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
@ -1186,7 +1187,8 @@ static virInterfaceDriver udevIfaceDriver = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
int
|
int
|
||||||
udevIfaceRegister(void) {
|
udevIfaceRegister(void)
|
||||||
|
{
|
||||||
if (virRegisterInterfaceDriver(&udevIfaceDriver) < 0) {
|
if (virRegisterInterfaceDriver(&udevIfaceDriver) < 0) {
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||||
_("failed to register udev interface driver"));
|
_("failed to register udev interface driver"));
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* interface_driver.c: loads the appropriate backend
|
* interface_driver.c: loads the appropriate backend
|
||||||
*
|
*
|
||||||
|
* Copyright (C) 2014 Red Hat, Inc.
|
||||||
* Copyright (C) 2012 Doug Goldstein <cardoe@cardoe.com>
|
* Copyright (C) 2012 Doug Goldstein <cardoe@cardoe.com>
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
@ -22,7 +23,8 @@
|
|||||||
#include "interface_driver.h"
|
#include "interface_driver.h"
|
||||||
|
|
||||||
int
|
int
|
||||||
interfaceRegister(void) {
|
interfaceRegister(void)
|
||||||
|
{
|
||||||
#ifdef WITH_NETCF
|
#ifdef WITH_NETCF
|
||||||
/* Attempt to load the netcf based backend first */
|
/* Attempt to load the netcf based backend first */
|
||||||
if (netcfIfaceRegister() == 0)
|
if (netcfIfaceRegister() == 0)
|
||||||
|
@ -739,7 +739,8 @@ libxlDomainEventQueue(libxlDriverPrivatePtr driver, virObjectEventPtr event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
char *
|
char *
|
||||||
libxlDomainManagedSavePath(libxlDriverPrivatePtr driver, virDomainObjPtr vm) {
|
libxlDomainManagedSavePath(libxlDriverPrivatePtr driver, virDomainObjPtr vm)
|
||||||
|
{
|
||||||
char *ret;
|
char *ret;
|
||||||
libxlDriverConfigPtr cfg = libxlDriverConfigGet(driver);
|
libxlDriverConfigPtr cfg = libxlDriverConfigGet(driver);
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* node_device_driver.c: node device enumeration
|
* node_device_driver.c: node device enumeration
|
||||||
*
|
*
|
||||||
* Copyright (C) 2010-2013 Red Hat, Inc.
|
* Copyright (C) 2010-2014 Red Hat, Inc.
|
||||||
* Copyright (C) 2008 Virtual Iron Software, Inc.
|
* Copyright (C) 2008 Virtual Iron Software, Inc.
|
||||||
* Copyright (C) 2008 David F. Lively
|
* Copyright (C) 2008 David F. Lively
|
||||||
*
|
*
|
||||||
@ -626,7 +626,8 @@ out:
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int nodedevRegister(void) {
|
int nodedevRegister(void)
|
||||||
|
{
|
||||||
#if defined(WITH_HAL) && defined(WITH_UDEV)
|
#if defined(WITH_HAL) && defined(WITH_UDEV)
|
||||||
/* Register only one of these two - they conflict */
|
/* Register only one of these two - they conflict */
|
||||||
if (udevNodeRegister() == -1)
|
if (udevNodeRegister() == -1)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* secret_driver.c: local driver for secret manipulation API
|
* secret_driver.c: local driver for secret manipulation API
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009-2012 Red Hat, Inc.
|
* Copyright (C) 2009-2012, 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
|
||||||
@ -537,7 +537,8 @@ secretOpen(virConnectPtr conn, virConnectAuthPtr auth ATTRIBUTE_UNUSED,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
secretClose(virConnectPtr conn) {
|
secretClose(virConnectPtr conn)
|
||||||
|
{
|
||||||
conn->secretPrivateData = NULL;
|
conn->secretPrivateData = NULL;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -631,7 +632,8 @@ secretUsageIDForDef(virSecretDefPtr def)
|
|||||||
static int
|
static int
|
||||||
secretConnectListAllSecrets(virConnectPtr conn,
|
secretConnectListAllSecrets(virConnectPtr conn,
|
||||||
virSecretPtr **secrets,
|
virSecretPtr **secrets,
|
||||||
unsigned int flags) {
|
unsigned int flags)
|
||||||
|
{
|
||||||
virSecretDriverStatePtr driver = conn->secretPrivateData;
|
virSecretDriverStatePtr driver = conn->secretPrivateData;
|
||||||
virSecretPtr *tmp_secrets = NULL;
|
virSecretPtr *tmp_secrets = NULL;
|
||||||
int nsecrets = 0;
|
int nsecrets = 0;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2010-2013 Red Hat, Inc.
|
* Copyright (C) 2010-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
|
||||||
@ -528,8 +528,10 @@ virSecurityStackSetHugepages(virSecurityManagerPtr mgr,
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *virSecurityStackGetMountOptions(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
|
static char *
|
||||||
virDomainDefPtr vm ATTRIBUTE_UNUSED) {
|
virSecurityStackGetMountOptions(virSecurityManagerPtr mgr ATTRIBUTE_UNUSED,
|
||||||
|
virDomainDefPtr vm ATTRIBUTE_UNUSED)
|
||||||
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user