We recently started to enforce certain guideline rule a bit more, e.g. functions delimited by 2 newlines in *.c, by 1 newline in *.h, return types on a separate line, etc. This patch adjusts these issues in all nodedev modules. Signed-off-by: Erik Skultety <eskultet@xxxxxxxxxx> --- src/node_device/node_device_driver.c | 29 +++- src/node_device/node_device_driver.h | 82 +++++++---- src/node_device/node_device_hal.c | 9 ++ src/node_device/node_device_linux_sysfs.c | 1 + src/node_device/node_device_linux_sysfs.h | 9 +- src/node_device/node_device_udev.c | 233 ++++++++++++++++++------------ 6 files changed, 238 insertions(+), 125 deletions(-) diff --git a/src/node_device/node_device_driver.c b/src/node_device/node_device_driver.c index 99f7bc5476..9b1c5bb5e9 100644 --- a/src/node_device/node_device_driver.c +++ b/src/node_device/node_device_driver.c @@ -47,7 +47,8 @@ virNodeDeviceDriverStatePtr driver; -static int update_caps(virNodeDeviceObjPtr dev) +static int +update_caps(virNodeDeviceObjPtr dev) { virNodeDevCapsDefPtr cap = dev->def->caps; @@ -101,7 +102,8 @@ static int update_caps(virNodeDeviceObjPtr dev) * the driver name for a device each time its entry is used, both for * udev *and* HAL backends. */ -static int update_driver_name(virNodeDeviceObjPtr dev) +static int +update_driver_name(virNodeDeviceObjPtr dev) { char *driver_link = NULL; char *devpath = NULL; @@ -138,22 +140,28 @@ static int update_driver_name(virNodeDeviceObjPtr dev) } #else /* XXX: Implement me for non-linux */ -static int update_driver_name(virNodeDeviceObjPtr dev ATTRIBUTE_UNUSED) +static int +update_driver_name(virNodeDeviceObjPtr dev ATTRIBUTE_UNUSED) { return 0; } #endif -void nodeDeviceLock(void) +void +nodeDeviceLock(void) { virMutexLock(&driver->lock); } -void nodeDeviceUnlock(void) + + +void +nodeDeviceUnlock(void) { virMutexUnlock(&driver->lock); } + int nodeNumOfDevices(virConnectPtr conn, const char *cap, @@ -182,6 +190,7 @@ nodeNumOfDevices(virConnectPtr conn, return ndevs; } + int nodeListDevices(virConnectPtr conn, const char *cap, @@ -222,6 +231,7 @@ nodeListDevices(virConnectPtr conn, return -1; } + int nodeConnectListAllNodeDevices(virConnectPtr conn, virNodeDevicePtr **devices, @@ -242,6 +252,7 @@ nodeConnectListAllNodeDevices(virConnectPtr conn, return ret; } + virNodeDevicePtr nodeDeviceLookupByName(virConnectPtr conn, const char *name) { @@ -500,6 +511,7 @@ nodeDeviceListCaps(virNodeDevicePtr dev, char **const names, int maxnames) return ret; } + static int get_time(time_t *t) { @@ -565,6 +577,7 @@ find_new_device(virConnectPtr conn, const char *wwnn, const char *wwpn) return dev; } + virNodeDevicePtr nodeDeviceCreateXML(virConnectPtr conn, const char *xmlDesc, @@ -663,6 +676,7 @@ nodeDeviceDestroy(virNodeDevicePtr dev) return ret; } + int nodeConnectNodeDeviceEventRegisterAny(virConnectPtr conn, virNodeDevicePtr dev, @@ -684,6 +698,7 @@ nodeConnectNodeDeviceEventRegisterAny(virConnectPtr conn, return callbackID; } + int nodeConnectNodeDeviceEventDeregisterAny(virConnectPtr conn, int callbackID) @@ -704,7 +719,9 @@ nodeConnectNodeDeviceEventDeregisterAny(virConnectPtr conn, return ret; } -int nodedevRegister(void) + +int +nodedevRegister(void) { #ifdef WITH_UDEV return udevNodeRegister(); diff --git a/src/node_device/node_device_driver.h b/src/node_device/node_device_driver.h index bc8af8a9e7..0f55e7b71e 100644 --- a/src/node_device/node_device_driver.h +++ b/src/node_device/node_device_driver.h @@ -30,37 +30,67 @@ # define LINUX_NEW_DEVICE_WAIT_TIME 60 +extern virNodeDeviceDriverStatePtr driver; + # ifdef WITH_HAL -int halNodeRegister(void); +int +halNodeRegister(void); # endif # ifdef WITH_UDEV -int udevNodeRegister(void); +int +udevNodeRegister(void); # endif -void nodeDeviceLock(void); -void nodeDeviceUnlock(void); - -extern virNodeDeviceDriverStatePtr driver; - -int nodedevRegister(void); - -int nodeNumOfDevices(virConnectPtr conn, const char *cap, unsigned int flags); -int nodeListDevices(virConnectPtr conn, const char *cap, char **const names, - int maxnames, unsigned int flags); -int nodeConnectListAllNodeDevices(virConnectPtr conn, - virNodeDevicePtr **devices, - unsigned int flags); -virNodeDevicePtr nodeDeviceLookupByName(virConnectPtr conn, const char *name); -virNodeDevicePtr nodeDeviceLookupSCSIHostByWWN(virConnectPtr conn, - const char *wwnn, - const char *wwpn, - unsigned int flags); -char *nodeDeviceGetXMLDesc(virNodeDevicePtr dev, unsigned int flags); -char *nodeDeviceGetParent(virNodeDevicePtr dev); -int nodeDeviceNumOfCaps(virNodeDevicePtr dev); -int nodeDeviceListCaps(virNodeDevicePtr dev, char **const names, int maxnames); -virNodeDevicePtr nodeDeviceCreateXML(virConnectPtr conn, - const char *xmlDesc, unsigned int flags); +void +nodeDeviceLock(void); + +void +nodeDeviceUnlock(void); + +int +nodedevRegister(void); + +int +nodeNumOfDevices(virConnectPtr conn, const char *cap, unsigned int flags); + +int +nodeListDevices(virConnectPtr conn, + const char *cap, + char **const names, + int maxnames, + unsigned int flags); + +int +nodeConnectListAllNodeDevices(virConnectPtr conn, + virNodeDevicePtr **devices, + unsigned int flags); + +virNodeDevicePtr +nodeDeviceLookupByName(virConnectPtr conn, const char *name); + +virNodeDevicePtr +nodeDeviceLookupSCSIHostByWWN(virConnectPtr conn, + const char *wwnn, + const char *wwpn, + unsigned int flags); + +char * +nodeDeviceGetXMLDesc(virNodeDevicePtr dev, unsigned int flags); + +char * +nodeDeviceGetParent(virNodeDevicePtr dev); + +int +nodeDeviceNumOfCaps(virNodeDevicePtr dev); + +int +nodeDeviceListCaps(virNodeDevicePtr dev, char **const names, int maxnames); + +virNodeDevicePtr +nodeDeviceCreateXML(virConnectPtr conn, + const char *xmlDesc, + unsigned int flags); + int nodeDeviceDestroy(virNodeDevicePtr dev); int diff --git a/src/node_device/node_device_hal.c b/src/node_device/node_device_hal.c index 81e5ecc41d..5339218775 100644 --- a/src/node_device/node_device_hal.c +++ b/src/node_device/node_device_hal.c @@ -84,6 +84,7 @@ get_str_prop(LibHalContext *ctxt, const char *udi, return -1; } + static int get_int_prop(LibHalContext *ctxt, const char *udi, const char *prop, int *val_p) @@ -102,6 +103,7 @@ get_int_prop(LibHalContext *ctxt, const char *udi, return rv; } + static int get_bool_prop(LibHalContext *ctxt, const char *udi, const char *prop, int *val_p) @@ -120,6 +122,7 @@ get_bool_prop(LibHalContext *ctxt, const char *udi, return rv; } + static int get_uint64_prop(LibHalContext *ctxt, const char *udi, const char *prop, unsigned long long *val_p) @@ -138,6 +141,7 @@ get_uint64_prop(LibHalContext *ctxt, const char *udi, return rv; } + static int gather_pci_cap(LibHalContext *ctx, const char *udi, virNodeDevCapDataPtr d) @@ -290,6 +294,7 @@ gather_storage_cap(LibHalContext *ctx, const char *udi, return 0; } + static int gather_scsi_generic_cap(LibHalContext *ctx, const char *udi, virNodeDevCapDataPtr d) @@ -446,12 +451,14 @@ gather_capabilities(LibHalContext *ctx, const char *udi, return rv; } + static void free_udi(void *udi) { VIR_FREE(udi); } + static void dev_create(const char *udi) { @@ -516,6 +523,7 @@ dev_create(const char *udi) nodeDeviceUnlock(); } + static void dev_refresh(const char *udi) { @@ -538,6 +546,7 @@ dev_refresh(const char *udi) dev_create(udi); } + static void device_added(LibHalContext *ctx ATTRIBUTE_UNUSED, const char *udi) diff --git a/src/node_device/node_device_linux_sysfs.c b/src/node_device/node_device_linux_sysfs.c index 1b7aa9435c..ff22d6d55c 100644 --- a/src/node_device/node_device_linux_sysfs.c +++ b/src/node_device/node_device_linux_sysfs.c @@ -230,6 +230,7 @@ nodeDeviceSysfsGetSCSIHostCaps(virNodeDevCapSCSIHostPtr scsi_host ATTRIBUTE_UNUS return -1; } + int nodeDeviceSysfsGetPCIRelatedDevCaps(const char *sysfsPath ATTRIBUTE_UNUSED, virNodeDevCapPCIDevPtr pci_dev ATTRIBUTE_UNUSED) diff --git a/src/node_device/node_device_linux_sysfs.h b/src/node_device/node_device_linux_sysfs.h index 8deea66998..11b96e86b8 100644 --- a/src/node_device/node_device_linux_sysfs.h +++ b/src/node_device/node_device_linux_sysfs.h @@ -25,8 +25,11 @@ # include "node_device_conf.h" -int nodeDeviceSysfsGetSCSIHostCaps(virNodeDevCapSCSIHostPtr scsi_host); -int nodeDeviceSysfsGetPCIRelatedDevCaps(const char *sysfsPath, - virNodeDevCapPCIDevPtr pci_dev); +int +nodeDeviceSysfsGetSCSIHostCaps(virNodeDevCapSCSIHostPtr scsi_host); + +int +nodeDeviceSysfsGetPCIRelatedDevCaps(const char *sysfsPath, + virNodeDevCapPCIDevPtr pci_dev); #endif /* __VIR_NODE_DEVICE_LINUX_SYSFS_H__ */ diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c index bcae444d85..4a837e04dc 100644 --- a/src/node_device/node_device_udev.c +++ b/src/node_device/node_device_udev.c @@ -70,8 +70,9 @@ udevHasDeviceProperty(struct udev_device *dev, } -static const char *udevGetDeviceProperty(struct udev_device *udev_device, - const char *property_key) +static const char * +udevGetDeviceProperty(struct udev_device *udev_device, + const char *property_key) { const char *ret = NULL; @@ -84,9 +85,10 @@ static const char *udevGetDeviceProperty(struct udev_device *udev_device, } -static int udevGetStringProperty(struct udev_device *udev_device, - const char *property_key, - char **value) +static int +udevGetStringProperty(struct udev_device *udev_device, + const char *property_key, + char **value) { if (VIR_STRDUP(*value, udevGetDeviceProperty(udev_device, property_key)) < 0) @@ -96,10 +98,11 @@ static int udevGetStringProperty(struct udev_device *udev_device, } -static int udevGetIntProperty(struct udev_device *udev_device, - const char *property_key, - int *value, - int base) +static int +udevGetIntProperty(struct udev_device *udev_device, + const char *property_key, + int *value, + int base) { const char *str = NULL; @@ -114,10 +117,11 @@ static int udevGetIntProperty(struct udev_device *udev_device, } -static int udevGetUintProperty(struct udev_device *udev_device, - const char *property_key, - unsigned int *value, - int base) +static int +udevGetUintProperty(struct udev_device *udev_device, + const char *property_key, + unsigned int *value, + int base) { const char *str = NULL; @@ -132,8 +136,9 @@ static int udevGetUintProperty(struct udev_device *udev_device, } -static const char *udevGetDeviceSysfsAttr(struct udev_device *udev_device, - const char *attr_name) +static const char * +udevGetDeviceSysfsAttr(struct udev_device *udev_device, + const char *attr_name) { const char *ret = NULL; @@ -147,9 +152,10 @@ static const char *udevGetDeviceSysfsAttr(struct udev_device *udev_device, } -static int udevGetStringSysfsAttr(struct udev_device *udev_device, - const char *attr_name, - char **value) +static int +udevGetStringSysfsAttr(struct udev_device *udev_device, + const char *attr_name, + char **value) { if (VIR_STRDUP(*value, udevGetDeviceSysfsAttr(udev_device, attr_name)) < 0) return -1; @@ -163,10 +169,11 @@ static int udevGetStringSysfsAttr(struct udev_device *udev_device, } -static int udevGetIntSysfsAttr(struct udev_device *udev_device, - const char *attr_name, - int *value, - int base) +static int +udevGetIntSysfsAttr(struct udev_device *udev_device, + const char *attr_name, + int *value, + int base) { const char *str = NULL; @@ -182,10 +189,11 @@ static int udevGetIntSysfsAttr(struct udev_device *udev_device, } -static int udevGetUintSysfsAttr(struct udev_device *udev_device, - const char *attr_name, - unsigned int *value, - int base) +static int +udevGetUintSysfsAttr(struct udev_device *udev_device, + const char *attr_name, + unsigned int *value, + int base) { const char *str = NULL; @@ -201,9 +209,10 @@ static int udevGetUintSysfsAttr(struct udev_device *udev_device, } -static int udevGetUint64SysfsAttr(struct udev_device *udev_device, - const char *attr_name, - unsigned long long *value) +static int +udevGetUint64SysfsAttr(struct udev_device *udev_device, + const char *attr_name, + unsigned long long *value) { const char *str = NULL; @@ -219,9 +228,10 @@ static int udevGetUint64SysfsAttr(struct udev_device *udev_device, } -static int udevGenerateDeviceName(struct udev_device *device, - virNodeDeviceDefPtr def, - const char *s) +static int +udevGenerateDeviceName(struct udev_device *device, + virNodeDeviceDefPtr def, + const char *s) { size_t i; virBuffer buf = VIR_BUFFER_INITIALIZER; @@ -282,10 +292,11 @@ udevLogFunction(struct udev *udev ATTRIBUTE_UNUSED, #endif -static int udevTranslatePCIIds(unsigned int vendor, - unsigned int product, - char **vendor_string, - char **product_string) +static int +udevTranslatePCIIds(unsigned int vendor, + unsigned int product, + char **vendor_string, + char **product_string) { struct pci_id_match m; const char *vendor_name = NULL, *device_name = NULL; @@ -313,8 +324,9 @@ static int udevTranslatePCIIds(unsigned int vendor, } -static int udevProcessPCI(struct udev_device *device, - virNodeDeviceDefPtr def) +static int +udevProcessPCI(struct udev_device *device, + virNodeDeviceDefPtr def) { const char *syspath = NULL; virNodeDevCapPCIDevPtr pci_dev = &def->caps->data.pci_dev; @@ -411,7 +423,9 @@ static int udevProcessPCI(struct udev_device *device, return ret; } -static int drmGetMinorType(int minor) + +static int +drmGetMinorType(int minor) { int type = minor >> 6; @@ -428,8 +442,10 @@ static int drmGetMinorType(int minor) } } -static int udevProcessDRMDevice(struct udev_device *device, - virNodeDeviceDefPtr def) + +static int +udevProcessDRMDevice(struct udev_device *device, + virNodeDeviceDefPtr def) { virNodeDevCapDRMPtr drm = &def->caps->data.drm; int minor; @@ -448,8 +464,10 @@ static int udevProcessDRMDevice(struct udev_device *device, return 0; } -static int udevProcessUSBDevice(struct udev_device *device, - virNodeDeviceDefPtr def) + +static int +udevProcessUSBDevice(struct udev_device *device, + virNodeDeviceDefPtr def) { virNodeDevCapUSBDevPtr usb_dev = &def->caps->data.usb_dev; @@ -490,8 +508,9 @@ static int udevProcessUSBDevice(struct udev_device *device, } -static int udevProcessUSBInterface(struct udev_device *device, - virNodeDeviceDefPtr def) +static int +udevProcessUSBInterface(struct udev_device *device, + virNodeDeviceDefPtr def) { virNodeDevCapUSBIfPtr usb_if = &def->caps->data.usb_if; @@ -518,8 +537,9 @@ static int udevProcessUSBInterface(struct udev_device *device, } -static int udevProcessNetworkInterface(struct udev_device *device, - virNodeDeviceDefPtr def) +static int +udevProcessNetworkInterface(struct udev_device *device, + virNodeDeviceDefPtr def) { const char *devtype = udev_device_get_devtype(device); virNodeDevCapNetPtr net = &def->caps->data.net; @@ -581,8 +601,9 @@ static int udevProcessSCSIHost(struct udev_device *device ATTRIBUTE_UNUSED, } -static int udevProcessSCSITarget(struct udev_device *device ATTRIBUTE_UNUSED, - virNodeDeviceDefPtr def) +static int +udevProcessSCSITarget(struct udev_device *device ATTRIBUTE_UNUSED, + virNodeDeviceDefPtr def) { const char *sysname = NULL; virNodeDevCapSCSITargetPtr scsi_target = &def->caps->data.scsi_target; @@ -599,8 +620,9 @@ static int udevProcessSCSITarget(struct udev_device *device ATTRIBUTE_UNUSED, } -static int udevGetSCSIType(virNodeDeviceDefPtr def ATTRIBUTE_UNUSED, - unsigned int type, char **typestring) +static int +udevGetSCSIType(virNodeDeviceDefPtr def ATTRIBUTE_UNUSED, + unsigned int type, char **typestring) { int ret = 0; int foundtype = 1; @@ -657,8 +679,9 @@ static int udevGetSCSIType(virNodeDeviceDefPtr def ATTRIBUTE_UNUSED, } -static int udevProcessSCSIDevice(struct udev_device *device ATTRIBUTE_UNUSED, - virNodeDeviceDefPtr def) +static int +udevProcessSCSIDevice(struct udev_device *device ATTRIBUTE_UNUSED, + virNodeDeviceDefPtr def) { int ret = -1; unsigned int tmp = 0; @@ -700,8 +723,9 @@ static int udevProcessSCSIDevice(struct udev_device *device ATTRIBUTE_UNUSED, } -static int udevProcessDisk(struct udev_device *device, - virNodeDeviceDefPtr def) +static int +udevProcessDisk(struct udev_device *device, + virNodeDeviceDefPtr def) { virNodeDevCapStoragePtr storage = &def->caps->data.storage; @@ -718,9 +742,10 @@ static int udevProcessDisk(struct udev_device *device, } -static int udevProcessRemoveableMedia(struct udev_device *device, - virNodeDeviceDefPtr def, - int has_media) +static int +udevProcessRemoveableMedia(struct udev_device *device, + virNodeDeviceDefPtr def, + int has_media) { virNodeDevCapStoragePtr storage = &def->caps->data.storage; int is_removable = 0; @@ -759,8 +784,10 @@ static int udevProcessRemoveableMedia(struct udev_device *device, return 0; } -static int udevProcessCDROM(struct udev_device *device, - virNodeDeviceDefPtr def) + +static int +udevProcessCDROM(struct udev_device *device, + virNodeDeviceDefPtr def) { int has_media = 0; @@ -779,8 +806,10 @@ static int udevProcessCDROM(struct udev_device *device, return udevProcessRemoveableMedia(device, def, has_media); } -static int udevProcessFloppy(struct udev_device *device, - virNodeDeviceDefPtr def) + +static int +udevProcessFloppy(struct udev_device *device, + virNodeDeviceDefPtr def) { int has_media = 0; @@ -797,8 +826,9 @@ static int udevProcessFloppy(struct udev_device *device, } -static int udevProcessSD(struct udev_device *device, - virNodeDeviceDefPtr def) +static int +udevProcessSD(struct udev_device *device, + virNodeDeviceDefPtr def) { virNodeDevCapStoragePtr storage = &def->caps->data.storage; @@ -821,7 +851,8 @@ static int udevProcessSD(struct udev_device *device, * not provide a device type in the usual place, but udev told us it's * a storage device, and we can make a good guess at what kind of * storage device it is from other information that is provided. */ -static int udevKludgeStorageType(virNodeDeviceDefPtr def) +static int +udevKludgeStorageType(virNodeDeviceDefPtr def) { VIR_DEBUG("Could not find definitive storage type for device " "with sysfs path '%s', trying to guess it", @@ -842,8 +873,9 @@ static int udevKludgeStorageType(virNodeDeviceDefPtr def) } -static int udevProcessStorage(struct udev_device *device, - virNodeDeviceDefPtr def) +static int +udevProcessStorage(struct udev_device *device, + virNodeDeviceDefPtr def) { virNodeDevCapStoragePtr storage = &def->caps->data.storage; int ret = -1; @@ -938,6 +970,7 @@ static int udevProcessStorage(struct udev_device *device, return ret; } + static int udevProcessSCSIGeneric(struct udev_device *dev, virNodeDeviceDefPtr def) @@ -952,6 +985,7 @@ udevProcessSCSIGeneric(struct udev_device *dev, return 0; } + static int udevGetDeviceNodes(struct udev_device *device, virNodeDeviceDefPtr def) @@ -980,6 +1014,7 @@ udevGetDeviceNodes(struct udev_device *device, return 0; } + static int udevGetDeviceType(struct udev_device *device, virNodeDevCapType *type) @@ -1040,8 +1075,9 @@ udevGetDeviceType(struct udev_device *device, } -static int udevGetDeviceDetails(struct udev_device *device, - virNodeDeviceDefPtr def) +static int +udevGetDeviceDetails(struct udev_device *device, + virNodeDeviceDefPtr def) { int ret = 0; @@ -1090,7 +1126,8 @@ static int udevGetDeviceDetails(struct udev_device *device, } -static int udevRemoveOneDevice(struct udev_device *device) +static int +udevRemoveOneDevice(struct udev_device *device) { virNodeDeviceObjPtr dev = NULL; virObjectEventPtr event = NULL; @@ -1122,8 +1159,9 @@ static int udevRemoveOneDevice(struct udev_device *device) } -static int udevSetParent(struct udev_device *device, - virNodeDeviceDefPtr def) +static int +udevSetParent(struct udev_device *device, + virNodeDeviceDefPtr def) { struct udev_device *parent_device = NULL; const char *parent_sysfs_path = NULL; @@ -1170,7 +1208,8 @@ static int udevSetParent(struct udev_device *device, } -static int udevAddOneDevice(struct udev_device *device) +static int +udevAddOneDevice(struct udev_device *device) { virNodeDeviceDefPtr def = NULL; virNodeDeviceObjPtr dev = NULL; @@ -1239,8 +1278,9 @@ static int udevAddOneDevice(struct udev_device *device) } -static int udevProcessDeviceListEntry(struct udev *udev, - struct udev_list_entry *list_entry) +static int +udevProcessDeviceListEntry(struct udev *udev, + struct udev_list_entry *list_entry) { struct udev_device *device; const char *name = NULL; @@ -1272,7 +1312,8 @@ const char *subsystem_blacklist[] = { "acpi", "tty", "vc", "i2c", }; -static int udevEnumerateAddMatches(struct udev_enumerate *udev_enumerate) +static int +udevEnumerateAddMatches(struct udev_enumerate *udev_enumerate) { size_t i; @@ -1287,7 +1328,8 @@ static int udevEnumerateAddMatches(struct udev_enumerate *udev_enumerate) } -static int udevEnumerateDevices(struct udev *udev) +static int +udevEnumerateDevices(struct udev *udev) { struct udev_enumerate *udev_enumerate = NULL; struct udev_list_entry *list_entry = NULL; @@ -1317,7 +1359,8 @@ static int udevEnumerateDevices(struct udev *udev) } -static void udevPCITranslateDeinit(void) +static void +udevPCITranslateDeinit(void) { #if defined __s390__ || defined __s390x_ /* Nothing was initialized, nothing needs to be cleaned up */ @@ -1329,7 +1372,8 @@ static void udevPCITranslateDeinit(void) } -static int nodeStateCleanup(void) +static int +nodeStateCleanup(void) { udevPrivate *priv = NULL; struct udev_monitor *udev_monitor = NULL; @@ -1370,10 +1414,11 @@ static int nodeStateCleanup(void) } -static void udevEventHandleCallback(int watch ATTRIBUTE_UNUSED, - int fd, - int events ATTRIBUTE_UNUSED, - void *data ATTRIBUTE_UNUSED) +static void +udevEventHandleCallback(int watch ATTRIBUTE_UNUSED, + int fd, + int events ATTRIBUTE_UNUSED, + void *data ATTRIBUTE_UNUSED) { struct udev_device *device = NULL; struct udev_monitor *udev_monitor = DRV_STATE_UDEV_MONITOR(driver); @@ -1474,7 +1519,8 @@ udevGetDMIData(virNodeDevCapSystemPtr syscap) #endif -static int udevSetupSystemDev(void) +static int +udevSetupSystemDev(void) { virNodeDeviceDefPtr def = NULL; virNodeDeviceObjPtr dev = NULL; @@ -1508,7 +1554,9 @@ static int udevSetupSystemDev(void) return ret; } -static int udevPCITranslateInit(bool privileged ATTRIBUTE_UNUSED) + +static int +udevPCITranslateInit(bool privileged ATTRIBUTE_UNUSED) { #if defined __s390__ || defined __s390x_ /* On s390(x) system there is no PCI bus. @@ -1530,9 +1578,11 @@ static int udevPCITranslateInit(bool privileged ATTRIBUTE_UNUSED) return 0; } -static int nodeStateInitialize(bool privileged, - virStateInhibitCallback callback ATTRIBUTE_UNUSED, - void *opaque ATTRIBUTE_UNUSED) + +static int +nodeStateInitialize(bool privileged, + virStateInhibitCallback callback ATTRIBUTE_UNUSED, + void *opaque ATTRIBUTE_UNUSED) { udevPrivate *priv = NULL; struct udev *udev = NULL; @@ -1618,7 +1668,8 @@ static int nodeStateInitialize(bool privileged, } -static int nodeStateReload(void) +static int +nodeStateReload(void) { return 0; } @@ -1648,7 +1699,9 @@ static virStateDriver udevStateDriver = { .stateReload = nodeStateReload, /* 0.7.3 */ }; -int udevNodeRegister(void) + +int +udevNodeRegister(void) { VIR_DEBUG("Registering udev node device backend"); -- 2.12.2 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list