Follow the libvirt hacking guide and make the code consistent.
Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
libvirt-lxc-override.c | 3 +-
libvirt-override.c | 305 +++++++++++++++++++++++++++++++++---------------
libvirt-qemu-override.c | 6 +-
libvirt-utils.c | 25 ++--
typewrappers.c | 3 +-
5 files changed, 232 insertions(+), 110 deletions(-)
diff --git a/libvirt-lxc-override.c b/libvirt-lxc-override.c
index e0d3e60..cdfbef6 100644
--- a/libvirt-lxc-override.c
+++ b/libvirt-lxc-override.c
@@ -55,7 +55,8 @@ extern void initcygvirtmod_lxc(void);
static PyObject *
libvirt_lxc_virDomainLxcOpenNamespace(PyObject *self ATTRIBUTE_UNUSED,
- PyObject *args) {
+ PyObject *args)
+{
PyObject *py_retval;
virDomainPtr domain;
PyObject *pyobj_domain;
diff --git a/libvirt-override.c b/libvirt-override.c
index ff6f338..fa9b693 100644
--- a/libvirt-override.c
+++ b/libvirt-override.c
@@ -62,7 +62,8 @@ extern void initcygvirtmod(void);
* number if some host CPUs are offline.
*/
static int
-getPyNodeCPUCount(virConnectPtr conn) {
+getPyNodeCPUCount(virConnectPtr conn)
+{
int i_retval;
virNodeInfo nodeinfo;
@@ -89,7 +90,9 @@ getPyNodeCPUCount(virConnectPtr conn) {
************************************************************************/
static PyObject *
-libvirt_virDomainBlockStats(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+libvirt_virDomainBlockStats(PyObject *self ATTRIBUTE_UNUSED,
+ PyObject *args)
+{
virDomainPtr domain;
PyObject *pyobj_domain;
char * path;
@@ -168,7 +171,8 @@ cleanup:
}
static PyObject *
-libvirt_virDomainGetCPUStats(PyObject *self ATTRIBUTE_UNUSED, PyObject *args)
+libvirt_virDomainGetCPUStats(PyObject *self ATTRIBUTE_UNUSED,
+ PyObject *args)
{
virDomainPtr domain;
PyObject *pyobj_domain, *totalbool;
@@ -304,7 +308,9 @@ error:
}
static PyObject *
-libvirt_virDomainInterfaceStats(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+libvirt_virDomainInterfaceStats(PyObject *self ATTRIBUTE_UNUSED,
+ PyObject *args)
+{
virDomainPtr domain;
PyObject *pyobj_domain;
char * path;
@@ -339,7 +345,9 @@ libvirt_virDomainInterfaceStats(PyObject *self ATTRIBUTE_UNUSED,
PyObject *args)
}
static PyObject *
-libvirt_virDomainMemoryStats(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+libvirt_virDomainMemoryStats(PyObject *self ATTRIBUTE_UNUSED,
+ PyObject *args)
+{
virDomainPtr domain;
PyObject *pyobj_domain;
unsigned int nr_stats;
@@ -411,7 +419,8 @@ libvirt_virDomainMemoryStats(PyObject *self ATTRIBUTE_UNUSED, PyObject
*args) {
static PyObject *
libvirt_virDomainGetSchedulerType(PyObject *self ATTRIBUTE_UNUSED,
- PyObject *args) {
+ PyObject *args)
+{
virDomainPtr domain;
PyObject *pyobj_domain, *info;
char *c_retval;
@@ -1422,7 +1431,8 @@ cleanup:
static PyObject *
libvirt_virDomainGetVcpuPinInfo(PyObject *self ATTRIBUTE_UNUSED,
- PyObject *args) {
+ PyObject *args)
+{
virDomainPtr domain;
PyObject *pyobj_domain, *pycpumaps = NULL;
virDomainInfo dominfo;
@@ -1771,7 +1781,8 @@ static PyObject *libvirt_virPythonErrorFuncHandler = NULL;
static PyObject *libvirt_virPythonErrorFuncCtxt = NULL;
static PyObject *
-libvirt_virGetLastError(PyObject *self ATTRIBUTE_UNUSED, PyObject *args
ATTRIBUTE_UNUSED)
+libvirt_virGetLastError(PyObject *self ATTRIBUTE_UNUSED,
+ PyObject *args ATTRIBUTE_UNUSED)
{
virError *err;
PyObject *info;
@@ -1795,7 +1806,8 @@ libvirt_virGetLastError(PyObject *self ATTRIBUTE_UNUSED, PyObject
*args ATTRIBUT
}
static PyObject *
-libvirt_virConnGetLastError(PyObject *self ATTRIBUTE_UNUSED, PyObject *args)
+libvirt_virConnGetLastError(PyObject *self ATTRIBUTE_UNUSED,
+ PyObject *args)
{
virError *err;
PyObject *info;
@@ -1828,7 +1840,8 @@ libvirt_virConnGetLastError(PyObject *self ATTRIBUTE_UNUSED,
PyObject *args)
}
static void
-libvirt_virErrorFuncHandler(ATTRIBUTE_UNUSED void *ctx, virErrorPtr err)
+libvirt_virErrorFuncHandler(ATTRIBUTE_UNUSED void *ctx,
+ virErrorPtr err)
{
PyObject *list, *info;
PyObject *result;
@@ -1870,7 +1883,7 @@ libvirt_virErrorFuncHandler(ATTRIBUTE_UNUSED void *ctx, virErrorPtr
err)
static PyObject *
libvirt_virRegisterErrorHandler(ATTRIBUTE_UNUSED PyObject * self,
- PyObject * args)
+ PyObject * args)
{
PyObject *py_retval;
PyObject *pyobj_f;
@@ -1905,9 +1918,11 @@ libvirt_virRegisterErrorHandler(ATTRIBUTE_UNUSED PyObject * self,
return py_retval;
}
-static int virConnectCredCallbackWrapper(virConnectCredentialPtr cred,
- unsigned int ncred,
- void *cbdata) {
+static int
+virConnectCredCallbackWrapper(virConnectCredentialPtr cred,
+ unsigned int ncred,
+ void *cbdata)
+{
PyObject *list;
PyObject *pycred;
PyObject *pyauth = (PyObject *)cbdata;
@@ -1988,7 +2003,9 @@ static int virConnectCredCallbackWrapper(virConnectCredentialPtr
cred,
static PyObject *
-libvirt_virConnectOpenAuth(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+libvirt_virConnectOpenAuth(PyObject *self ATTRIBUTE_UNUSED,
+ PyObject *args)
+{
PyObject *py_retval;
virConnectPtr c_retval;
char * name;
@@ -2037,7 +2054,8 @@ libvirt_virConnectOpenAuth(PyObject *self ATTRIBUTE_UNUSED, PyObject
*args) {
************************************************************************/
static PyObject *
-libvirt_virGetVersion(PyObject *self ATTRIBUTE_UNUSED, PyObject *args)
+libvirt_virGetVersion(PyObject *self ATTRIBUTE_UNUSED,
+ PyObject *args)
{
char *type = NULL;
unsigned long libVer, typeVer = 0;
@@ -2172,7 +2190,8 @@ libvirt_virConnectGetLibVersion(PyObject *self ATTRIBUTE_UNUSED,
static PyObject *
libvirt_virConnectListDomainsID(PyObject *self ATTRIBUTE_UNUSED,
- PyObject *args) {
+ PyObject *args)
+{
PyObject *py_retval;
int *ids = NULL, c_retval;
size_t i;
@@ -2265,7 +2284,8 @@ cleanup:
static PyObject *
libvirt_virConnectListDefinedDomains(PyObject *self ATTRIBUTE_UNUSED,
- PyObject *args) {
+ PyObject *args)
+{
PyObject *py_retval;
char **names = NULL;
int c_retval;
@@ -2518,7 +2538,8 @@ cleanup:
static PyObject *
libvirt_virDomainRevertToSnapshot(PyObject *self ATTRIBUTE_UNUSED,
- PyObject *args) {
+ PyObject *args)
+{
int c_retval;
virDomainSnapshotPtr snap;
PyObject *pyobj_snap;
@@ -2539,7 +2560,9 @@ libvirt_virDomainRevertToSnapshot(PyObject *self ATTRIBUTE_UNUSED,
}
static PyObject *
-libvirt_virDomainGetInfo(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+libvirt_virDomainGetInfo(PyObject *self ATTRIBUTE_UNUSED,
+ PyObject *args)
+{
PyObject *py_retval;
int c_retval;
virDomainPtr domain;
@@ -2566,7 +2589,8 @@ libvirt_virDomainGetInfo(PyObject *self ATTRIBUTE_UNUSED, PyObject
*args) {
}
static PyObject *
-libvirt_virDomainGetState(PyObject *self ATTRIBUTE_UNUSED, PyObject *args)
+libvirt_virDomainGetState(PyObject *self ATTRIBUTE_UNUSED,
+ PyObject *args)
{
PyObject *py_retval;
int c_retval;
@@ -2595,7 +2619,9 @@ libvirt_virDomainGetState(PyObject *self ATTRIBUTE_UNUSED, PyObject
*args)
}
static PyObject *
-libvirt_virDomainGetControlInfo(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+libvirt_virDomainGetControlInfo(PyObject *self ATTRIBUTE_UNUSED,
+ PyObject *args)
+{
PyObject *py_retval;
int c_retval;
virDomainPtr domain;
@@ -2621,7 +2647,9 @@ libvirt_virDomainGetControlInfo(PyObject *self ATTRIBUTE_UNUSED,
PyObject *args)
}
static PyObject *
-libvirt_virDomainGetBlockInfo(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+libvirt_virDomainGetBlockInfo(PyObject *self ATTRIBUTE_UNUSED,
+ PyObject *args)
+{
PyObject *py_retval;
int c_retval;
virDomainPtr domain;
@@ -2647,7 +2675,9 @@ libvirt_virDomainGetBlockInfo(PyObject *self ATTRIBUTE_UNUSED,
PyObject *args) {
}
static PyObject *
-libvirt_virNodeGetInfo(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+libvirt_virNodeGetInfo(PyObject *self ATTRIBUTE_UNUSED,
+ PyObject *args)
+{
PyObject *py_retval;
int c_retval;
virConnectPtr conn;
@@ -2676,7 +2706,9 @@ libvirt_virNodeGetInfo(PyObject *self ATTRIBUTE_UNUSED, PyObject
*args) {
}
static PyObject *
-libvirt_virNodeGetSecurityModel(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+libvirt_virNodeGetSecurityModel(PyObject *self ATTRIBUTE_UNUSED,
+ PyObject *args)
+{
PyObject *py_retval;
int c_retval;
virConnectPtr conn;
@@ -2699,7 +2731,9 @@ libvirt_virNodeGetSecurityModel(PyObject *self ATTRIBUTE_UNUSED,
PyObject *args)
}
static PyObject *
-libvirt_virDomainGetSecurityLabel(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+libvirt_virDomainGetSecurityLabel(PyObject *self ATTRIBUTE_UNUSED,
+ PyObject *args)
+{
PyObject *py_retval;
int c_retval;
virDomainPtr dom;
@@ -2783,7 +2817,9 @@ libvirt_virDomainGetSecurityLabelList(PyObject *self
ATTRIBUTE_UNUSED,
#endif /* LIBVIR_CHECK_VERSION(0, 10, 0) */
static PyObject *
-libvirt_virDomainGetUUID(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+libvirt_virDomainGetUUID(PyObject *self ATTRIBUTE_UNUSED,
+ PyObject *args)
+{
PyObject *py_retval;
unsigned char uuid[VIR_UUID_BUFLEN];
virDomainPtr domain;
@@ -2809,7 +2845,8 @@ libvirt_virDomainGetUUID(PyObject *self ATTRIBUTE_UNUSED, PyObject
*args) {
static PyObject *
libvirt_virDomainGetUUIDString(PyObject *self ATTRIBUTE_UNUSED,
- PyObject *args) {
+ PyObject *args)
+{
PyObject *py_retval;
char uuidstr[VIR_UUID_STRING_BUFLEN];
virDomainPtr dom;
@@ -2835,7 +2872,9 @@ libvirt_virDomainGetUUIDString(PyObject *self ATTRIBUTE_UNUSED,
}
static PyObject *
-libvirt_virDomainLookupByUUID(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+libvirt_virDomainLookupByUUID(PyObject *self ATTRIBUTE_UNUSED,
+ PyObject *args)
+{
PyObject *py_retval;
virDomainPtr c_retval;
virConnectPtr conn;
@@ -2860,7 +2899,8 @@ libvirt_virDomainLookupByUUID(PyObject *self ATTRIBUTE_UNUSED,
PyObject *args) {
static PyObject *
libvirt_virConnectListNetworks(PyObject *self ATTRIBUTE_UNUSED,
- PyObject *args) {
+ PyObject *args)
+{
PyObject *py_retval;
char **names = NULL;
int c_retval;
@@ -2906,7 +2946,8 @@ libvirt_virConnectListNetworks(PyObject *self ATTRIBUTE_UNUSED,
static PyObject *
libvirt_virConnectListDefinedNetworks(PyObject *self ATTRIBUTE_UNUSED,
- PyObject *args) {
+ PyObject *args)
+{
PyObject *py_retval;
char **names = NULL;
int c_retval;
@@ -3000,7 +3041,9 @@ cleanup:
static PyObject *
-libvirt_virNetworkGetUUID(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+libvirt_virNetworkGetUUID(PyObject *self ATTRIBUTE_UNUSED,
+ PyObject *args)
+{
PyObject *py_retval;
unsigned char uuid[VIR_UUID_BUFLEN];
virNetworkPtr domain;
@@ -3026,7 +3069,8 @@ libvirt_virNetworkGetUUID(PyObject *self ATTRIBUTE_UNUSED, PyObject
*args) {
static PyObject *
libvirt_virNetworkGetUUIDString(PyObject *self ATTRIBUTE_UNUSED,
- PyObject *args) {
+ PyObject *args)
+{
PyObject *py_retval;
char uuidstr[VIR_UUID_STRING_BUFLEN];
virNetworkPtr net;
@@ -3052,7 +3096,9 @@ libvirt_virNetworkGetUUIDString(PyObject *self ATTRIBUTE_UNUSED,
}
static PyObject *
-libvirt_virNetworkLookupByUUID(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+libvirt_virNetworkLookupByUUID(PyObject *self ATTRIBUTE_UNUSED,
+ PyObject *args)
+{
PyObject *py_retval;
virNetworkPtr c_retval;
virConnectPtr conn;
@@ -3076,7 +3122,9 @@ libvirt_virNetworkLookupByUUID(PyObject *self ATTRIBUTE_UNUSED,
PyObject *args)
static PyObject *
-libvirt_virDomainGetAutostart(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+libvirt_virDomainGetAutostart(PyObject *self ATTRIBUTE_UNUSED,
+ PyObject *args)
+{
PyObject *py_retval;
int c_retval, autostart;
virDomainPtr domain;
@@ -3099,7 +3147,9 @@ libvirt_virDomainGetAutostart(PyObject *self ATTRIBUTE_UNUSED,
PyObject *args) {
static PyObject *
-libvirt_virNetworkGetAutostart(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+libvirt_virNetworkGetAutostart(PyObject *self ATTRIBUTE_UNUSED,
+ PyObject *args)
+{
PyObject *py_retval;
int c_retval, autostart;
virNetworkPtr network;
@@ -3121,7 +3171,8 @@ libvirt_virNetworkGetAutostart(PyObject *self ATTRIBUTE_UNUSED,
PyObject *args)
}
static PyObject *
-libvirt_virNodeGetCellsFreeMemory(PyObject *self ATTRIBUTE_UNUSED, PyObject *args)
+libvirt_virNodeGetCellsFreeMemory(PyObject *self ATTRIBUTE_UNUSED,
+ PyObject *args)
{
PyObject *py_retval;
PyObject *pyobj_conn;
@@ -3158,7 +3209,8 @@ libvirt_virNodeGetCellsFreeMemory(PyObject *self ATTRIBUTE_UNUSED,
PyObject *arg
}
static PyObject *
-libvirt_virNodeGetCPUStats(PyObject *self ATTRIBUTE_UNUSED, PyObject *args)
+libvirt_virNodeGetCPUStats(PyObject *self ATTRIBUTE_UNUSED,
+ PyObject *args)
{
PyObject *ret = NULL;
PyObject *key = NULL;
@@ -3222,7 +3274,8 @@ error:
}
static PyObject *
-libvirt_virNodeGetMemoryStats(PyObject *self ATTRIBUTE_UNUSED, PyObject *args)
+libvirt_virNodeGetMemoryStats(PyObject *self ATTRIBUTE_UNUSED,
+ PyObject *args)
{
PyObject *ret = NULL;
PyObject *key = NULL;
@@ -3287,7 +3340,8 @@ error:
static PyObject *
libvirt_virConnectListStoragePools(PyObject *self ATTRIBUTE_UNUSED,
- PyObject *args) {
+ PyObject *args)
+{
PyObject *py_retval;
char **names = NULL;
int c_retval;
@@ -3341,7 +3395,8 @@ libvirt_virConnectListStoragePools(PyObject *self ATTRIBUTE_UNUSED,
static PyObject *
libvirt_virConnectListDefinedStoragePools(PyObject *self ATTRIBUTE_UNUSED,
- PyObject *args) {
+ PyObject *args)
+{
PyObject *py_retval;
char **names = NULL;
int c_retval;
@@ -3443,7 +3498,8 @@ cleanup:
static PyObject *
libvirt_virStoragePoolListVolumes(PyObject *self ATTRIBUTE_UNUSED,
- PyObject *args) {
+ PyObject *args)
+{
PyObject *py_retval;
char **names = NULL;
int c_retval;
@@ -3546,7 +3602,9 @@ cleanup:
static PyObject *
-libvirt_virStoragePoolGetAutostart(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+libvirt_virStoragePoolGetAutostart(PyObject *self ATTRIBUTE_UNUSED,
+ PyObject *args)
+{
PyObject *py_retval;
int c_retval, autostart;
virStoragePoolPtr pool;
@@ -3569,7 +3627,9 @@ libvirt_virStoragePoolGetAutostart(PyObject *self ATTRIBUTE_UNUSED,
PyObject *ar
}
static PyObject *
-libvirt_virStoragePoolGetInfo(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+libvirt_virStoragePoolGetInfo(PyObject *self ATTRIBUTE_UNUSED,
+ PyObject *args)
+{
PyObject *py_retval;
int c_retval;
virStoragePoolPtr pool;
@@ -3601,7 +3661,9 @@ libvirt_virStoragePoolGetInfo(PyObject *self ATTRIBUTE_UNUSED,
PyObject *args) {
static PyObject *
-libvirt_virStorageVolGetInfo(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+libvirt_virStorageVolGetInfo(PyObject *self ATTRIBUTE_UNUSED,
+ PyObject *args)
+{
PyObject *py_retval;
int c_retval;
virStorageVolPtr pool;
@@ -3629,7 +3691,9 @@ libvirt_virStorageVolGetInfo(PyObject *self ATTRIBUTE_UNUSED,
PyObject *args) {
}
static PyObject *
-libvirt_virStoragePoolGetUUID(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+libvirt_virStoragePoolGetUUID(PyObject *self ATTRIBUTE_UNUSED,
+ PyObject *args)
+{
PyObject *py_retval;
unsigned char uuid[VIR_UUID_BUFLEN];
virStoragePoolPtr pool;
@@ -3656,7 +3720,8 @@ libvirt_virStoragePoolGetUUID(PyObject *self ATTRIBUTE_UNUSED,
PyObject *args) {
static PyObject *
libvirt_virStoragePoolGetUUIDString(PyObject *self ATTRIBUTE_UNUSED,
- PyObject *args) {
+ PyObject *args)
+{
PyObject *py_retval;
char uuidstr[VIR_UUID_STRING_BUFLEN];
virStoragePoolPtr pool;
@@ -3681,7 +3746,9 @@ libvirt_virStoragePoolGetUUIDString(PyObject *self
ATTRIBUTE_UNUSED,
}
static PyObject *
-libvirt_virStoragePoolLookupByUUID(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+libvirt_virStoragePoolLookupByUUID(PyObject *self ATTRIBUTE_UNUSED,
+ PyObject *args)
+{
PyObject *py_retval;
virStoragePoolPtr c_retval;
virConnectPtr conn;
@@ -3705,7 +3772,8 @@ libvirt_virStoragePoolLookupByUUID(PyObject *self ATTRIBUTE_UNUSED,
PyObject *ar
static PyObject *
libvirt_virNodeListDevices(PyObject *self ATTRIBUTE_UNUSED,
- PyObject *args) {
+ PyObject *args)
+{
PyObject *py_retval;
char **names = NULL;
int c_retval;
@@ -3801,7 +3869,8 @@ cleanup:
static PyObject *
libvirt_virNodeDeviceListCaps(PyObject *self ATTRIBUTE_UNUSED,
- PyObject *args) {
+ PyObject *args)
+{
PyObject *py_retval;
char **names = NULL;
int c_retval;
@@ -3844,7 +3913,9 @@ libvirt_virNodeDeviceListCaps(PyObject *self ATTRIBUTE_UNUSED,
}
static PyObject *
-libvirt_virSecretGetUUID(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+libvirt_virSecretGetUUID(PyObject *self ATTRIBUTE_UNUSED,
+ PyObject *args)
+{
PyObject *py_retval;
unsigned char uuid[VIR_UUID_BUFLEN];
virSecretPtr secret;
@@ -3870,7 +3941,8 @@ libvirt_virSecretGetUUID(PyObject *self ATTRIBUTE_UNUSED, PyObject
*args) {
static PyObject *
libvirt_virSecretGetUUIDString(PyObject *self ATTRIBUTE_UNUSED,
- PyObject *args) {
+ PyObject *args)
+{
PyObject *py_retval;
char uuidstr[VIR_UUID_STRING_BUFLEN];
virSecretPtr dom;
@@ -3896,7 +3968,9 @@ libvirt_virSecretGetUUIDString(PyObject *self ATTRIBUTE_UNUSED,
}
static PyObject *
-libvirt_virSecretLookupByUUID(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+libvirt_virSecretLookupByUUID(PyObject *self ATTRIBUTE_UNUSED,
+ PyObject *args)
+{
PyObject *py_retval;
virSecretPtr c_retval;
virConnectPtr conn;
@@ -3921,7 +3995,8 @@ libvirt_virSecretLookupByUUID(PyObject *self ATTRIBUTE_UNUSED,
PyObject *args) {
static PyObject *
libvirt_virConnectListSecrets(PyObject *self ATTRIBUTE_UNUSED,
- PyObject *args) {
+ PyObject *args)
+{
PyObject *py_retval;
char **uuids = NULL;
virConnectPtr conn;
@@ -4014,7 +4089,8 @@ cleanup:
static PyObject *
libvirt_virSecretGetValue(PyObject *self ATTRIBUTE_UNUSED,
- PyObject *args) {
+ PyObject *args)
+{
PyObject *py_retval;
unsigned char *c_retval;
size_t size;
@@ -4042,7 +4118,8 @@ libvirt_virSecretGetValue(PyObject *self ATTRIBUTE_UNUSED,
static PyObject *
libvirt_virSecretSetValue(PyObject *self ATTRIBUTE_UNUSED,
- PyObject *args) {
+ PyObject *args)
+{
PyObject *py_retval;
int c_retval;
virSecretPtr secret;
@@ -4066,7 +4143,9 @@ libvirt_virSecretSetValue(PyObject *self ATTRIBUTE_UNUSED,
}
static PyObject *
-libvirt_virNWFilterGetUUID(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+libvirt_virNWFilterGetUUID(PyObject *self ATTRIBUTE_UNUSED,
+ PyObject *args)
+{
PyObject *py_retval;
unsigned char uuid[VIR_UUID_BUFLEN];
virNWFilterPtr nwfilter;
@@ -4092,7 +4171,8 @@ libvirt_virNWFilterGetUUID(PyObject *self ATTRIBUTE_UNUSED, PyObject
*args) {
static PyObject *
libvirt_virNWFilterGetUUIDString(PyObject *self ATTRIBUTE_UNUSED,
- PyObject *args) {
+ PyObject *args)
+{
PyObject *py_retval;
char uuidstr[VIR_UUID_STRING_BUFLEN];
virNWFilterPtr nwfilter;
@@ -4118,7 +4198,9 @@ libvirt_virNWFilterGetUUIDString(PyObject *self ATTRIBUTE_UNUSED,
}
static PyObject *
-libvirt_virNWFilterLookupByUUID(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+libvirt_virNWFilterLookupByUUID(PyObject *self ATTRIBUTE_UNUSED,
+ PyObject *args)
+{
PyObject *py_retval;
virNWFilterPtr c_retval;
virConnectPtr conn;
@@ -4143,7 +4225,8 @@ libvirt_virNWFilterLookupByUUID(PyObject *self ATTRIBUTE_UNUSED,
PyObject *args)
static PyObject *
libvirt_virConnectListNWFilters(PyObject *self ATTRIBUTE_UNUSED,
- PyObject *args) {
+ PyObject *args)
+{
PyObject *py_retval;
char **uuids = NULL;
virConnectPtr conn;
@@ -4236,7 +4319,8 @@ cleanup:
static PyObject *
libvirt_virConnectListInterfaces(PyObject *self ATTRIBUTE_UNUSED,
- PyObject *args) {
+ PyObject *args)
+{
PyObject *py_retval;
char **names = NULL;
int c_retval;
@@ -4290,7 +4374,8 @@ libvirt_virConnectListInterfaces(PyObject *self ATTRIBUTE_UNUSED,
static PyObject *
libvirt_virConnectListDefinedInterfaces(PyObject *self ATTRIBUTE_UNUSED,
- PyObject *args) {
+ PyObject *args)
+{
PyObject *py_retval;
char **names = NULL;
int c_retval;
@@ -4394,7 +4479,8 @@ cleanup:
static PyObject *
libvirt_virConnectBaselineCPU(PyObject *self ATTRIBUTE_UNUSED,
- PyObject *args) {
+ PyObject *args)
+{
PyObject *pyobj_conn;
PyObject *list;
virConnectPtr conn;
@@ -4448,7 +4534,9 @@ libvirt_virConnectBaselineCPU(PyObject *self ATTRIBUTE_UNUSED,
static PyObject *
-libvirt_virDomainGetJobInfo(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+libvirt_virDomainGetJobInfo(PyObject *self ATTRIBUTE_UNUSED,
+ PyObject *args)
+{
PyObject *py_retval;
int c_retval;
virDomainPtr domain;
@@ -4483,7 +4571,8 @@ libvirt_virDomainGetJobInfo(PyObject *self ATTRIBUTE_UNUSED,
PyObject *args) {
#if LIBVIR_CHECK_VERSION(1, 0, 3)
static PyObject *
-libvirt_virDomainGetJobStats(PyObject *self ATTRIBUTE_UNUSED, PyObject *args)
+libvirt_virDomainGetJobStats(PyObject *self ATTRIBUTE_UNUSED,
+ PyObject *args)
{
PyObject *pyobj_domain;
virDomainPtr domain;
@@ -4894,7 +4983,8 @@ static PyObject *libvirt_module = NULL;
static PyObject *libvirt_dict = NULL;
static PyObject *
-getLibvirtModuleObject(void) {
+getLibvirtModuleObject(void)
+{
if (libvirt_module)
return libvirt_module;
@@ -4911,7 +5001,8 @@ getLibvirtModuleObject(void) {
}
static PyObject *
-getLibvirtDictObject(void) {
+getLibvirtDictObject(void)
+{
if (libvirt_dict)
return libvirt_dict;
@@ -5037,7 +5128,7 @@ libvirt_virConnectDomainEventRegister(ATTRIBUTE_UNUSED PyObject
*self,
}
static PyObject *
-libvirt_virConnectDomainEventDeregister(ATTRIBUTE_UNUSED PyObject *self,
+libvirt_virConnectDomainEventDeregister(PyObject *self ATTRIBUTE_UNUSED,
PyObject *args)
{
PyObject *py_retval;
@@ -5086,11 +5177,11 @@ static char *removeTimeoutName;
#define NAME(fn) ( fn ## Name ? fn ## Name : # fn )
static int
-libvirt_virEventAddHandleFunc (int fd,
- int event,
- virEventHandleCallback cb,
- void *opaque,
- virFreeCallback ff)
+libvirt_virEventAddHandleFunc(int fd,
+ int event,
+ virEventHandleCallback cb,
+ void *opaque,
+ virFreeCallback ff)
{
PyObject *result;
PyObject *python_cb;
@@ -5144,7 +5235,8 @@ cleanup:
}
static void
-libvirt_virEventUpdateHandleFunc(int watch, int event)
+libvirt_virEventUpdateHandleFunc(int watch,
+ int event)
{
PyObject *result;
PyObject *pyobj_args;
@@ -5268,7 +5360,8 @@ cleanup:
}
static void
-libvirt_virEventUpdateTimeoutFunc(int timer, int timeout)
+libvirt_virEventUpdateTimeoutFunc(int timer,
+ int timeout)
{
PyObject *result = NULL;
PyObject *pyobj_args;
@@ -5332,7 +5425,7 @@ libvirt_virEventRemoveTimeoutFunc(int timer)
}
static PyObject *
-libvirt_virEventRegisterImpl(ATTRIBUTE_UNUSED PyObject * self,
+libvirt_virEventRegisterImpl(PyObject * self ATTRIBUTE_UNUSED,
PyObject * args)
{
/* Unref the previously-registered impl (if any) */
@@ -6596,7 +6689,7 @@ libvirt_virConnectDomainEventDeviceAddedCallback(virConnectPtr conn
ATTRIBUTE_UN
#endif /* VIR_DOMAIN_EVENT_ID_DEVICE_ADDED */
static PyObject *
-libvirt_virConnectDomainEventRegisterAny(ATTRIBUTE_UNUSED PyObject *self,
+libvirt_virConnectDomainEventRegisterAny(PyObject *self ATTRIBUTE_UNUSED,
PyObject *args)
{
PyObject *py_retval; /* return value */
@@ -6722,7 +6815,7 @@ libvirt_virConnectDomainEventRegisterAny(ATTRIBUTE_UNUSED PyObject
*self,
}
static PyObject *
-libvirt_virConnectDomainEventDeregisterAny(ATTRIBUTE_UNUSED PyObject *self,
+libvirt_virConnectDomainEventDeregisterAny(PyObject *self ATTRIBUTE_UNUSED,
PyObject *args)
{
PyObject *py_retval;
@@ -6871,9 +6964,9 @@ libvirt_virConnectNetworkEventRegisterAny(PyObject *self
ATTRIBUTE_UNUSED,
return py_retval;
}
-static PyObject
-*libvirt_virConnectNetworkEventDeregisterAny(PyObject *self ATTRIBUTE_UNUSED,
- PyObject *args)
+static PyObject *
+libvirt_virConnectNetworkEventDeregisterAny(PyObject *self ATTRIBUTE_UNUSED,
+ PyObject *args)
{
PyObject *py_retval;
PyObject *pyobj_conn;
@@ -6939,7 +7032,7 @@ libvirt_virConnectCloseCallbackDispatch(virConnectPtr conn
ATTRIBUTE_UNUSED,
}
static PyObject *
-libvirt_virConnectRegisterCloseCallback(ATTRIBUTE_UNUSED PyObject * self,
+libvirt_virConnectRegisterCloseCallback(PyObject * self ATTRIBUTE_UNUSED,
PyObject * args)
{
PyObject *py_retval; /* return value */
@@ -6977,7 +7070,7 @@ libvirt_virConnectRegisterCloseCallback(ATTRIBUTE_UNUSED PyObject *
self,
}
static PyObject *
-libvirt_virConnectUnregisterCloseCallback(ATTRIBUTE_UNUSED PyObject * self,
+libvirt_virConnectUnregisterCloseCallback(PyObject * self ATTRIBUTE_UNUSED,
PyObject * args)
{
PyObject *py_retval;
@@ -7232,7 +7325,9 @@ libvirt_virDomainMigrateGetCompressionCache(PyObject *self
ATTRIBUTE_UNUSED,
#endif /* LIBVIR_CHECK_VERSION(1, 0, 3) */
static PyObject *
-libvirt_virDomainMigrateGetMaxSpeed(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+libvirt_virDomainMigrateGetMaxSpeed(PyObject *self ATTRIBUTE_UNUSED,
+ PyObject *args)
+{
PyObject *py_retval;
int c_retval;
unsigned long bandwidth;
@@ -7322,7 +7417,8 @@ libvirt_virDomainMigrateToURI3(PyObject *self ATTRIBUTE_UNUSED,
static PyObject *
libvirt_virDomainBlockPeek(PyObject *self ATTRIBUTE_UNUSED,
- PyObject *args) {
+ PyObject *args)
+{
PyObject *py_retval = NULL;
int c_retval;
virDomainPtr domain;
@@ -7360,7 +7456,8 @@ cleanup:
static PyObject *
libvirt_virDomainMemoryPeek(PyObject *self ATTRIBUTE_UNUSED,
- PyObject *args) {
+ PyObject *args)
+{
PyObject *py_retval = NULL;
int c_retval;
virDomainPtr domain;
@@ -7591,7 +7688,9 @@ error:
#if LIBVIR_CHECK_VERSION(1, 1, 1)
static PyObject *
-libvirt_virDomainCreateWithFiles(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+libvirt_virDomainCreateWithFiles(PyObject *self ATTRIBUTE_UNUSED,
+ PyObject *args)
+{
PyObject *py_retval = NULL;
int c_retval;
virDomainPtr domain;
@@ -7636,7 +7735,9 @@ cleanup:
static PyObject *
-libvirt_virDomainCreateXMLWithFiles(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+libvirt_virDomainCreateXMLWithFiles(PyObject *self ATTRIBUTE_UNUSED,
+ PyObject *args)
+{
PyObject *py_retval = NULL;
virDomainPtr c_retval;
virConnectPtr conn;
@@ -7684,7 +7785,9 @@ cleanup:
#if LIBVIR_CHECK_VERSION(1, 2, 5)
static PyObject *
-libvirt_virDomainFSFreeze(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+libvirt_virDomainFSFreeze(PyObject *self ATTRIBUTE_UNUSED,
+ PyObject *args)
+{
PyObject *py_retval = NULL;
int c_retval;
virDomainPtr domain;
@@ -7730,7 +7833,9 @@ cleanup:
static PyObject *
-libvirt_virDomainFSThaw(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+libvirt_virDomainFSThaw(PyObject *self ATTRIBUTE_UNUSED,
+ PyObject *args)
+{
PyObject *py_retval = NULL;
int c_retval;
virDomainPtr domain;
@@ -7775,7 +7880,9 @@ libvirt_virDomainFSThaw(PyObject *self ATTRIBUTE_UNUSED, PyObject
*args) {
}
static PyObject *
-libvirt_virDomainGetTime(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+libvirt_virDomainGetTime(PyObject *self ATTRIBUTE_UNUSED,
+ PyObject *args)
+{
PyObject *py_retval = NULL;
PyObject *dict = NULL;
PyObject *pyobj_domain, *pyobj_seconds, *pyobj_nseconds;
@@ -7821,7 +7928,9 @@ libvirt_virDomainGetTime(PyObject *self ATTRIBUTE_UNUSED, PyObject
*args) {
static PyObject *
-libvirt_virDomainSetTime(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+libvirt_virDomainSetTime(PyObject *self ATTRIBUTE_UNUSED,
+ PyObject *args)
+{
PyObject *py_retval = NULL;
PyObject *pyobj_domain;
PyObject *pyobj_seconds;
@@ -7874,7 +7983,8 @@ libvirt_virDomainSetTime(PyObject *self ATTRIBUTE_UNUSED, PyObject
*args) {
#if LIBVIR_CHECK_VERSION(1, 2, 6)
static PyObject *
libvirt_virNodeGetFreePages(PyObject *self ATTRIBUTE_UNUSED,
- PyObject *args) {
+ PyObject *args)
+{
PyObject *py_retval = NULL;
PyObject *pyobj_conn;
PyObject *pyobj_pagesize;
@@ -8201,7 +8311,8 @@ libvirt_virDomainListGetStats(PyObject *self ATTRIBUTE_UNUSED,
static PyObject *
-libvirt_virDomainBlockCopy(PyObject *self ATTRIBUTE_UNUSED, PyObject *args)
+libvirt_virDomainBlockCopy(PyObject *self ATTRIBUTE_UNUSED,
+ PyObject *args)
{
PyObject *pyobj_dom = NULL;
PyObject *pyobj_dict = NULL;
@@ -8237,7 +8348,7 @@ libvirt_virDomainBlockCopy(PyObject *self ATTRIBUTE_UNUSED, PyObject
*args)
#if LIBVIR_CHECK_VERSION(1, 2, 9)
static PyObject *
libvirt_virNodeAllocPages(PyObject *self ATTRIBUTE_UNUSED,
- PyObject *args)
+ PyObject *args)
{
PyObject *pyobj_conn;
PyObject *pyobj_pages;
@@ -8301,7 +8412,9 @@ libvirt_virNodeAllocPages(PyObject *self ATTRIBUTE_UNUSED,
#if LIBVIR_CHECK_VERSION(1, 2, 11)
static PyObject *
-libvirt_virDomainGetFSInfo(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+libvirt_virDomainGetFSInfo(PyObject *self ATTRIBUTE_UNUSED,
+ PyObject *args)
+{
virDomainPtr domain;
PyObject *pyobj_domain;
unsigned int flags;
diff --git a/libvirt-qemu-override.c b/libvirt-qemu-override.c
index c082324..d73f9bf 100644
--- a/libvirt-qemu-override.c
+++ b/libvirt-qemu-override.c
@@ -125,7 +125,8 @@ libvirt_qemu_lookupPythonFunc(const char *funcname)
static PyObject *
libvirt_qemu_virDomainQemuMonitorCommand(PyObject *self ATTRIBUTE_UNUSED,
- PyObject *args) {
+ PyObject *args)
+{
PyObject *py_retval;
char *result = NULL;
virDomainPtr domain;
@@ -155,7 +156,8 @@ libvirt_qemu_virDomainQemuMonitorCommand(PyObject *self
ATTRIBUTE_UNUSED,
#if LIBVIR_CHECK_VERSION(0, 10, 0)
static PyObject *
-libvirt_qemu_virDomainQemuAgentCommand(PyObject *self ATTRIBUTE_UNUSED, PyObject *args)
+libvirt_qemu_virDomainQemuAgentCommand(PyObject *self ATTRIBUTE_UNUSED,
+ PyObject *args)
{
PyObject *py_retval;
char *result = NULL;
diff --git a/libvirt-utils.c b/libvirt-utils.c
index 651d74f..2dfffbc 100644
--- a/libvirt-utils.c
+++ b/libvirt-utils.c
@@ -46,8 +46,9 @@
*
* Returns -1 on failure to allocate, zero on success
*/
-int virAlloc(void *ptrptr,
- size_t size)
+int
+virAlloc(void *ptrptr,
+ size_t size)
{
*(void **)ptrptr = calloc(1, size);
if (*(void **)ptrptr == NULL) {
@@ -69,9 +70,10 @@ int virAlloc(void *ptrptr,
*
* Returns -1 on failure to allocate, zero on success
*/
-int virAllocN(void *ptrptr,
- size_t size,
- size_t count)
+int
+virAllocN(void *ptrptr,
+ size_t size,
+ size_t count)
{
*(void**)ptrptr = calloc(count, size);
if (*(void**)ptrptr == NULL) {
@@ -94,9 +96,10 @@ int virAllocN(void *ptrptr,
*
* Returns -1 on failure to allocate, zero on success
*/
-int virReallocN(void *ptrptr,
- size_t size,
- size_t count)
+int
+virReallocN(void *ptrptr,
+ size_t size,
+ size_t count)
{
void *tmp;
@@ -121,7 +124,8 @@ int virReallocN(void *ptrptr,
* the 'ptrptr' variable. After release, 'ptrptr' will be
* updated to point to NULL.
*/
-void virFree(void *ptrptr)
+void
+virFree(void *ptrptr)
{
int save_errno = errno;
@@ -131,7 +135,8 @@ void virFree(void *ptrptr)
}
-int virFileClose(int *fdptr)
+int
+virFileClose(int *fdptr)
{
int saved_errno = 0;
int rc = 0;
diff --git a/typewrappers.c b/typewrappers.c
index 5399fb7..a164a11 100644
--- a/typewrappers.c
+++ b/typewrappers.c
@@ -386,7 +386,8 @@ libvirt_charPtrUnwrap(PyObject *obj, char **str)
return ret && *str ? 0 : -1;
}
-int libvirt_charPtrSizeUnwrap(PyObject *obj, char **str, Py_ssize_t *size)
+int
+libvirt_charPtrSizeUnwrap(PyObject *obj, char **str, Py_ssize_t *size)
{
int ret;
#if PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION <= 4
--
2.5.3