[PATCH v2 06/16] Use K&R style for curly braces in src/qemu/

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx>
---
 src/qemu/qemu_agent.c        |  5 ++-
 src/qemu/qemu_command.c      |  6 ++-
 src/qemu/qemu_driver.c       | 94 +++++++++++++++++++++++++++++---------------
 src/qemu/qemu_migration.c    |  3 +-
 src/qemu/qemu_monitor.c      |  3 +-
 src/qemu/qemu_monitor_json.c |  3 +-
 src/qemu/qemu_monitor_text.c | 20 +++++++---
 7 files changed, 90 insertions(+), 44 deletions(-)

diff --git a/src/qemu/qemu_agent.c b/src/qemu/qemu_agent.c
index 83f077f..9f02e52 100644
--- a/src/qemu/qemu_agent.c
+++ b/src/qemu/qemu_agent.c
@@ -1,7 +1,7 @@
 /*
  * qemu_agent.c: interaction with QEMU guest agent
  *
- * Copyright (C) 2006-2013 Red Hat, Inc.
+ * Copyright (C) 2006-2014 Red Hat, Inc.
  * Copyright (C) 2006 Daniel P. Berrange
  *
  * This library is free software; you can redistribute it and/or
@@ -574,7 +574,8 @@ static void qemuAgentUpdateWatch(qemuAgentPtr mon)


 static void
-qemuAgentIO(int watch, int fd, int events, void *opaque) {
+qemuAgentIO(int watch, int fd, int events, void *opaque)
+{
     qemuAgentPtr mon = opaque;
     bool error = false;
     bool eof = false;
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 5ca3f74..2311d89 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -1871,7 +1871,8 @@ cleanup:
 }

 static bool
-qemuDomainSupportsPCI(virDomainDefPtr def) {
+qemuDomainSupportsPCI(virDomainDefPtr def)
+{
     if ((def->os.arch != VIR_ARCH_ARMV7L) && (def->os.arch != VIR_ARCH_AARCH64))
         return true;

@@ -11197,7 +11198,8 @@ error:


 static void
-qemuParseCommandLineBootDevs(virDomainDefPtr def, const char *str) {
+qemuParseCommandLineBootDevs(virDomainDefPtr def, const char *str)
+{
     int n, b = 0;

     for (n = 0; str[n] && b < VIR_DOMAIN_BOOT_LAST; n++) {
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 2707bec..20239f1 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -172,9 +172,11 @@ virQEMUDriverPtr qemu_driver = NULL;


 static void
-qemuVMDriverLock(void) {}
+qemuVMDriverLock(void)
+{}
 static void
-qemuVMDriverUnlock(void) {}
+qemuVMDriverUnlock(void)
+{}

 static int
 qemuVMFilterRebuild(virDomainObjListIterator iter, void *data)
@@ -879,7 +881,8 @@ static void qemuNotifyLoadDomain(virDomainObjPtr vm, int newVM, void *opaque)
  * files and update its state and the networking
  */
 static int
-qemuStateReload(void) {
+qemuStateReload(void)
+{
     virQEMUDriverConfigPtr cfg = NULL;
     virCapsPtr caps = NULL;

@@ -910,7 +913,8 @@ cleanup:
  *
  */
 static int
-qemuStateStop(void) {
+qemuStateStop(void)
+{
     int ret = -1;
     virConnectPtr conn;
     int numDomains = 0;
@@ -967,7 +971,8 @@ qemuStateStop(void) {
  * Shutdown the QEmu daemon, it will stop all active domains and networks
  */
 static int
-qemuStateCleanup(void) {
+qemuStateCleanup(void)
+{
     if (!qemu_driver)
         return -1;

@@ -1145,7 +1150,8 @@ static int qemuConnectIsAlive(virConnectPtr conn ATTRIBUTE_UNUSED)


 static int
-kvmGetMaxVCPUs(void) {
+kvmGetMaxVCPUs(void)
+{
     int fd;
     int ret;

@@ -1201,7 +1207,9 @@ qemuConnectGetSysinfo(virConnectPtr conn, unsigned int flags)
     return virBufferContentAndReset(&buf);
 }

-static int qemuConnectGetMaxVcpus(virConnectPtr conn ATTRIBUTE_UNUSED, const char *type) {
+static int
+qemuConnectGetMaxVcpus(virConnectPtr conn ATTRIBUTE_UNUSED, const char *type)
+{
     if (virConnectGetMaxVcpusEnsureACL(conn) < 0)
         return -1;

@@ -1321,7 +1329,8 @@ qemuGetProcessInfo(unsigned long long *cpuTime, int *lastCpu, long *vm_rss,


 static virDomainPtr qemuDomainLookupByID(virConnectPtr conn,
-                                         int id) {
+                                         int id)
+{
     virQEMUDriverPtr driver = conn->privateData;
     virDomainObjPtr vm;
     virDomainPtr dom = NULL;
@@ -1347,7 +1356,8 @@ cleanup:
 }

 static virDomainPtr qemuDomainLookupByUUID(virConnectPtr conn,
-                                           const unsigned char *uuid) {
+                                           const unsigned char *uuid)
+{
     virQEMUDriverPtr driver = conn->privateData;
     virDomainObjPtr vm;
     virDomainPtr dom = NULL;
@@ -1375,7 +1385,8 @@ cleanup:
 }

 static virDomainPtr qemuDomainLookupByName(virConnectPtr conn,
-                                           const char *name) {
+                                           const char *name)
+{
     virQEMUDriverPtr driver = conn->privateData;
     virDomainObjPtr vm;
     virDomainPtr dom = NULL;
@@ -1458,7 +1469,8 @@ cleanup:
     return ret;
 }

-static int qemuConnectGetVersion(virConnectPtr conn, unsigned long *version) {
+static int qemuConnectGetVersion(virConnectPtr conn, unsigned long *version)
+{
     virQEMUDriverPtr driver = conn->privateData;
     int ret = -1;
     unsigned int qemuVersion = 0;
@@ -1493,7 +1505,8 @@ static char *qemuConnectGetHostname(virConnectPtr conn)
 }


-static int qemuConnectListDomains(virConnectPtr conn, int *ids, int nids) {
+static int qemuConnectListDomains(virConnectPtr conn, int *ids, int nids)
+{
     virQEMUDriverPtr driver = conn->privateData;
     int n;

@@ -1506,7 +1519,8 @@ static int qemuConnectListDomains(virConnectPtr conn, int *ids, int nids) {
     return n;
 }

-static int qemuConnectNumOfDomains(virConnectPtr conn) {
+static int qemuConnectNumOfDomains(virConnectPtr conn)
+{
     virQEMUDriverPtr driver = conn->privateData;
     int n;

@@ -1542,7 +1556,8 @@ qemuCanonicalizeMachine(virDomainDefPtr def, virQEMUCapsPtr qemuCaps)

 static virDomainPtr qemuDomainCreateXML(virConnectPtr conn,
                                         const char *xml,
-                                        unsigned int flags) {
+                                        unsigned int flags)
+{
     virQEMUDriverPtr driver = conn->privateData;
     virDomainDefPtr def = NULL;
     virDomainObjPtr vm = NULL;
@@ -1648,7 +1663,8 @@ cleanup:
 }


-static int qemuDomainSuspend(virDomainPtr dom) {
+static int qemuDomainSuspend(virDomainPtr dom)
+{
     virQEMUDriverPtr driver = dom->conn->privateData;
     virDomainObjPtr vm;
     int ret = -1;
@@ -1729,7 +1745,8 @@ cleanup:
 }


-static int qemuDomainResume(virDomainPtr dom) {
+static int qemuDomainResume(virDomainPtr dom)
+{
     virQEMUDriverPtr driver = dom->conn->privateData;
     virDomainObjPtr vm;
     int ret = -1;
@@ -1793,7 +1810,8 @@ cleanup:
     return ret;
 }

-static int qemuDomainShutdownFlags(virDomainPtr dom, unsigned int flags) {
+static int qemuDomainShutdownFlags(virDomainPtr dom, unsigned int flags)
+{
     virQEMUDriverPtr driver = dom->conn->privateData;
     virDomainObjPtr vm;
     int ret = -1;
@@ -2155,7 +2173,8 @@ cleanup:
 }

 static int qemuDomainSetMemoryFlags(virDomainPtr dom, unsigned long newmem,
-                                    unsigned int flags) {
+                                    unsigned int flags)
+{
     virQEMUDriverPtr driver = dom->conn->privateData;
     qemuDomainObjPrivatePtr priv;
     virDomainObjPtr vm;
@@ -2652,7 +2671,8 @@ struct _virQEMUSaveHeader {
 };

 static inline void
-bswap_header(virQEMUSaveHeaderPtr hdr) {
+bswap_header(virQEMUSaveHeaderPtr hdr)
+{
     hdr->version = bswap_32(hdr->version);
     hdr->xml_len = bswap_32(hdr->xml_len);
     hdr->was_running = bswap_32(hdr->was_running);
@@ -4248,7 +4268,8 @@ qemuDomainPinVcpuFlags(virDomainPtr dom,
                        unsigned int vcpu,
                        unsigned char *cpumap,
                        int maplen,
-                       unsigned int flags) {
+                       unsigned int flags)
+{

     virQEMUDriverPtr driver = dom->conn->privateData;
     virDomainObjPtr vm;
@@ -4424,7 +4445,8 @@ static int
 qemuDomainPinVcpu(virDomainPtr dom,
                    unsigned int vcpu,
                    unsigned char *cpumap,
-                   int maplen) {
+                   int maplen)
+{
     return qemuDomainPinVcpuFlags(dom, vcpu, cpumap, maplen,
                                   VIR_DOMAIN_AFFECT_LIVE);
 }
@@ -4434,7 +4456,8 @@ qemuDomainGetVcpuPinInfo(virDomainPtr dom,
                          int ncpumaps,
                          unsigned char *cpumaps,
                          int maplen,
-                         unsigned int flags) {
+                         unsigned int flags)
+{

     virQEMUDriverPtr driver = dom->conn->privateData;
     virDomainObjPtr vm = NULL;
@@ -4758,7 +4781,8 @@ qemuDomainGetVcpus(virDomainPtr dom,
                    virVcpuInfoPtr info,
                    int maxinfo,
                    unsigned char *cpumaps,
-                   int maplen) {
+                   int maplen)
+{
     virDomainObjPtr vm;
     size_t i;
     int v, maxcpu, hostcpus;
@@ -5951,7 +5975,8 @@ cleanup:
     return ret;
 }

-static int qemuConnectNumOfDefinedDomains(virConnectPtr conn) {
+static int qemuConnectNumOfDefinedDomains(virConnectPtr conn)
+{
     virQEMUDriverPtr driver = conn->privateData;
     int ret = -1;

@@ -6099,7 +6124,8 @@ qemuDomainCreate(virDomainPtr dom)
     return qemuDomainCreateWithFlags(dom, 0);
 }

-static virDomainPtr qemuDomainDefineXML(virConnectPtr conn, const char *xml) {
+static virDomainPtr qemuDomainDefineXML(virConnectPtr conn, const char *xml)
+{
     virQEMUDriverPtr driver = conn->privateData;
     virDomainDefPtr def = NULL;
     virDomainDefPtr oldDef = NULL;
@@ -7289,7 +7315,8 @@ static int qemuDomainDetachDevice(virDomainPtr dom, const char *xml)
 }

 static int qemuDomainGetAutostart(virDomainPtr dom,
-                                  int *autostart) {
+                                  int *autostart)
+{
     virDomainObjPtr vm;
     int ret = -1;

@@ -7309,7 +7336,8 @@ cleanup:
 }

 static int qemuDomainSetAutostart(virDomainPtr dom,
-                                  int autostart) {
+                                  int autostart)
+{
     virQEMUDriverPtr driver = dom->conn->privateData;
     virDomainObjPtr vm;
     char *configFile = NULL, *autostartLink = NULL;
@@ -11447,7 +11475,8 @@ cleanup:


 static int qemuDomainGetJobInfo(virDomainPtr dom,
-                                virDomainJobInfoPtr info) {
+                                virDomainJobInfoPtr info)
+{
     virDomainObjPtr vm;
     int ret = -1;
     qemuDomainObjPrivatePtr priv;
@@ -11634,7 +11663,8 @@ cleanup:
 }


-static int qemuDomainAbortJob(virDomainPtr dom) {
+static int qemuDomainAbortJob(virDomainPtr dom)
+{
     virQEMUDriverPtr driver = dom->conn->privateData;
     virDomainObjPtr vm;
     int ret = -1;
@@ -12006,7 +12036,8 @@ cleanup:


 static int
-qemuDomainSnapshotFSFreeze(virDomainObjPtr vm) {
+qemuDomainSnapshotFSFreeze(virDomainObjPtr vm)
+{
     qemuDomainObjPrivatePtr priv = vm->privateData;
     int freezed;

@@ -16711,7 +16742,8 @@ static virStateDriver qemuStateDriver = {
     .stateStop = qemuStateStop,
 };

-int qemuRegister(void) {
+int qemuRegister(void)
+{
     if (virRegisterDriver(&qemuDriver) < 0)
         return -1;
     if (virRegisterStateDriver(&qemuStateDriver) < 0)
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index 26ac99b..ab6f287 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -4340,7 +4340,8 @@ qemuMigrationPerform(virQEMUDriverPtr driver,
 }

 static int
-qemuMigrationVPAssociatePortProfiles(virDomainDefPtr def) {
+qemuMigrationVPAssociatePortProfiles(virDomainDefPtr def)
+{
     size_t i;
     int last_good_net = -1;
     virDomainNetDefPtr net;
diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c
index 56e82fd..1783201 100644
--- a/src/qemu/qemu_monitor.c
+++ b/src/qemu/qemu_monitor.c
@@ -597,7 +597,8 @@ static void qemuMonitorUpdateWatch(qemuMonitorPtr mon)


 static void
-qemuMonitorIO(int watch, int fd, int events, void *opaque) {
+qemuMonitorIO(int watch, int fd, int events, void *opaque)
+{
     qemuMonitorPtr mon = opaque;
     bool error = false;
     bool eof = false;
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index bd26eb1..f387933 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -294,7 +294,8 @@ cleanup:
 static int
 qemuMonitorJSONCommand(qemuMonitorPtr mon,
                        virJSONValuePtr cmd,
-                       virJSONValuePtr *reply) {
+                       virJSONValuePtr *reply)
+{
     return qemuMonitorJSONCommandWithFd(mon, cmd, -1, reply);
 }

diff --git a/src/qemu/qemu_monitor_text.c b/src/qemu/qemu_monitor_text.c
index efb3654..558f93c 100644
--- a/src/qemu/qemu_monitor_text.c
+++ b/src/qemu/qemu_monitor_text.c
@@ -1,7 +1,7 @@
 /*
  * qemu_monitor_text.c: interaction with QEMU monitor console
  *
- * Copyright (C) 2006-2013 Red Hat, Inc.
+ * Copyright (C) 2006-2014 Red Hat, Inc.
  * Copyright (C) 2006 Daniel P. Berrange
  *
  * This library is free software; you can redistribute it and/or
@@ -364,7 +364,8 @@ qemuMonitorSendDiskPassphrase(qemuMonitorPtr mon,

 int
 qemuMonitorTextStartCPUs(qemuMonitorPtr mon,
-                         virConnectPtr conn) {
+                         virConnectPtr conn)
+{
     char *reply;

     if (qemuMonitorTextCommandWithHandler(mon, "cont",
@@ -379,7 +380,8 @@ qemuMonitorTextStartCPUs(qemuMonitorPtr mon,


 int
-qemuMonitorTextStopCPUs(qemuMonitorPtr mon) {
+qemuMonitorTextStopCPUs(qemuMonitorPtr mon)
+{
     char *info;
     int ret;

@@ -434,7 +436,8 @@ cleanup:
 }


-int qemuMonitorTextSystemPowerdown(qemuMonitorPtr mon) {
+int qemuMonitorTextSystemPowerdown(qemuMonitorPtr mon)
+{
     char *info;
     int ret;

@@ -444,7 +447,11 @@ int qemuMonitorTextSystemPowerdown(qemuMonitorPtr mon) {
     return ret;
 }

-int qemuMonitorTextSetLink(qemuMonitorPtr mon, const char *name, enum virDomainNetInterfaceLinkState state) {
+int
+qemuMonitorTextSetLink(qemuMonitorPtr mon,
+                       const char *name,
+                       enum virDomainNetInterfaceLinkState state)
+{
     char *info = NULL;
     char *cmd = NULL;
     const char *st_str = NULL;
@@ -486,7 +493,8 @@ error:
     return -1;
 }

-int qemuMonitorTextSystemReset(qemuMonitorPtr mon) {
+int qemuMonitorTextSystemReset(qemuMonitorPtr mon)
+{
     char *info;
     int ret;

-- 
1.9.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]