[libvirt] Ongoing work on lock contention in qemu driver?
by Peter Feiner
Hello Daniel,
I've been working on improving scalability in OpenStack on libvirt+kvm
for the last couple of months. I'm particularly interested in reducing
the time it takes to create VMs when many VMs are requested in
parallel.
One apparent bottleneck during virtual machine creation is libvirt. As
more VMs are created in parallel, some libvirt calls (i.e.,
virConnectGetLibVersion and virDomainCreateWithFlags) take longer
without a commensurate increase in hardware utilization.
Thanks to your patches in libvirt-1.0.3, the situation has improved.
Some libvirt calls OpenStack makes during VM creation (i.e.,
virConnectDefineXML) have no measurable slowdown when many VMs are
created in parallel. In turn, parallel VM creation in OpenStack is
significantly faster with libvirt-1.0.3. On my standard benchmark
(create 20 VMs in parallel, wait until the VM is ACTIVE, which is
essentially after virDomainCreateWithFlags returns), libvirt-1.0.3
reduces the median creation time from 90s to 60s when compared to
libvirt-0.9.8.
I'd like to know if your concurrency work in the qemu driver is
ongoing. If it isn't, I'd like to pick the work up myself and work on
further improvements. Any advice or insight would be appreciated.
Thanks!
Peter Feiner
11 years, 5 months
[libvirt] [PATCH 1/2] Make virNetDevSetupControl() public.
by Roman Bogorodskiy
This method is useful not only in virnetdev.c.
---
src/libvirt_private.syms | 1 +
src/util/virnetdev.c | 15 +++++++++++++--
src/util/virnetdev.h | 12 ++++++++++++
src/util/virnetdevmacvlan.c | 2 +-
src/util/virnetdevvportprofile.c | 2 +-
5 files changed, 28 insertions(+), 4 deletions(-)
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index cc734da..d65ecc1 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -1526,6 +1526,7 @@ virNetDevSetMTUFromDevice;
virNetDevSetName;
virNetDevSetNamespace;
virNetDevSetOnline;
+virNetDevSetupControl;
virNetDevValidateConfig;
diff --git a/src/util/virnetdev.c b/src/util/virnetdev.c
index cee4001..f658c6d 100644
--- a/src/util/virnetdev.c
+++ b/src/util/virnetdev.c
@@ -88,11 +88,22 @@ static int virNetDevSetupControlFull(const char *ifname,
}
-static int virNetDevSetupControl(const char *ifname,
- struct ifreq *ifr)
+int
+virNetDevSetupControl(const char *ifname,
+ struct ifreq *ifr)
{
return virNetDevSetupControlFull(ifname, ifr, VIR_NETDEV_FAMILY, SOCK_DGRAM);
}
+#else
+int
+virNetDevSetupControl(const char *ifname ATTRIBUTE_UNUSED,
+ void *ifr ATTRIBUTE_UNUSED)
+{
+ virReportSystemError(ENOSYS,
+ _("%s is not supported on this platform"),
+ __func__);
+ return -1;
+}
#endif
diff --git a/src/util/virnetdev.h b/src/util/virnetdev.h
index bc0777c..73c267f 100644
--- a/src/util/virnetdev.h
+++ b/src/util/virnetdev.h
@@ -23,11 +23,23 @@
#ifndef __VIR_NETDEV_H__
# define __VIR_NETDEV_H__
+# include <config.h>
+# include <net/if.h>
+
# include "virsocketaddr.h"
# include "virnetlink.h"
# include "virmacaddr.h"
# include "virpci.h"
+#ifdef HAVE_STRUCT_IFREQ
+int virNetDevSetupControl(const char *ifname,
+ struct ifreq *ifr)
+ ATTRIBUTE_RETURN_CHECK ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
+#else
+int virNetDevSetupControl(const char *ifname,
+ void *ifr);
+#endif
+
int virNetDevExists(const char *brname)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
diff --git a/src/util/virnetdevmacvlan.c b/src/util/virnetdevmacvlan.c
index 5316520..d5d36e4 100644
--- a/src/util/virnetdevmacvlan.c
+++ b/src/util/virnetdevmacvlan.c
@@ -48,7 +48,7 @@ VIR_ENUM_IMPL(virNetDevMacVLanMode, VIR_NETDEV_MACVLAN_MODE_LAST,
# include <sys/socket.h>
# include <sys/ioctl.h>
-# include <linux/if.h>
+# include <net/if.h>
# include <linux/if_tun.h>
/* Older kernels lacked this enum value. */
diff --git a/src/util/virnetdevvportprofile.c b/src/util/virnetdevvportprofile.c
index 883aa46..71aae24 100644
--- a/src/util/virnetdevvportprofile.c
+++ b/src/util/virnetdevvportprofile.c
@@ -49,7 +49,7 @@ VIR_ENUM_IMPL(virNetDevVPortProfileOp, VIR_NETDEV_VPORT_PROFILE_OP_LAST,
# include <sys/socket.h>
# include <sys/ioctl.h>
-# include <linux/if.h>
+# include <net/if.h>
# include <linux/if_tun.h>
# include "virnetlink.h"
--
1.7.11.5
11 years, 5 months
[libvirt] Release of libvirt-1.0.6
by Daniel Veillard
According to plans, the release is available, I tagged it in git and
the tarball and rpms should be available shortly on the FTP:
ftp://libvirt.org/libvirt/
This is a fairly large release considering the number of commits which
went in, this is due in part to a lot of refactoring of the code base.
This still seem an homogenous release with a large set of bug fixes,
a few new user visible features, and a very large amount of incremental
improvements. There have been significant updates at the localization
and documentation level too !
Features:
- Move VirtualBox driver into libvirtd (Daniel P. Berrange)
- Support for static routes on a virtual bridge (Gene Czarcinski)
- Various improvement for hostdev SCSI support (Osier Yang and Han Cheng)
- Switch to VIR_STRDUP and VIR_STRNDUP (Michal Privoznik)
- Various cleanups and improvement in Xen and LXC drivers (Daniel P. Berrange)
Documentation:
- Document that runtime changes may be lost after S4 suspend (Jiri Denemark)
- domain: /dev/urandom isn't a valid rng patch (Cole Robinson)
- formatdomain: fix links in the table of contents (Ján Tomko)
- add another user (Eric Blake)
- datatypes: fix virGetStoragePool's comment (Ján Tomko)
- Expand documentation for LXC driver (Daniel P. Berrange)
- Fix/update syntax in Sysinfo/SMBIOS description (John Ferlan)
- Update formatdomain for lifecycle events (John Ferlan)
- Fix the wrong links in secret documentation (Osier Yang)
- Add the missed usage type 'iscsi' (Osier Yang)
- Add docs about cgroups layout and usage (Daniel P. Berrange)
- Point users to Virt-Viewer MSI installers for Windows builds (Daniel P. Berrange)
- Fix namespace bugs in API docs, todo page & hv support page (Daniel P. Berrange)
- Fix a few more docs XSL bugs related to the TOC (Daniel P. Berrange)
- Fix docs generator regression in previous commit (Daniel P. Berrange)
- Fix multiple formatting problems in HTML docs (Daniel P. Berrange)
- fix 'since' for socket path generation (Ján Tomko)
Portability:
- vbox: define DYNLIB_NAME for kFreeBSD (Guido Günther)
- build: skip qemu in tests when !WITH_QEMU (Eric Blake)
- build: use correct rpc.h for virtlockd (Eric Blake)
- build: work around cygwin header bug (Eric Blake)
- build: cast [ug]id_t when printing (Eric Blake)
- build: port qemu to cygwin (Eric Blake)
- build: use correct rpc.h for lockd (Eric Blake)
- build: work around broken sasl header (Eric Blake)
- build: fix build without libvirtd (Eric Blake)
- build: fix build with newer gnutls (Eric Blake)
- build: fix build with older gcc (Eric Blake)
- qemu: Fix build without gnutls (Jiri Denemark)
- spec: Build vbox packages only for x86 architectures (Viktor Mihajlovski)
- Add missing c-ctype.h to virfile.c (Daniel P. Berrange)
- test: fix VPATH fchosttest failure (Viktor Mihajlovski)
- libxl: fix build with Xen4.3 (Jim Fehlig)
- build: Fix check-driverimpls in VPATH (Jiri Denemark)
- util: Fix build without devmapper (Jiri Denemark)
- FreeBSD: disable buggy -fstack-protector-all (Roman Bogorodskiy)
- build: avoid gcrypt deprecation warnings (Roman Bogorodskiy)
- build: avoid shadowed variable in fdstreamtest (Eric Blake)
- fix virNetDevSetMAC and virNetDevExists on BSD (Roman Bogorodskiy)
- Disable some URI tests on older libxml2 (Daniel P. Berrange)
- Fix build of python bindings on Python 2.4 (Daniel P. Berrange)
- build: fix build with old polkit0 (Jim Fehlig)
- Fixup rpcgen code on kFreeBSD too (Guido Günther)
- build: avoid non-portable cast of pthread_t (Eric Blake)
- build: Fix build when WITH_HAL is defined (Jim Fehlig)
- build: fix mingw build of vbox (Eric Blake)
- build: fix mingw build of virprocess.c (Eric Blake)
- build: fix FreeBSD build (Eric Blake)
Bug Fixes:
- conf: Generate address for scsi host device automatically (Osier Yang)
- qemu: prevent termination of guests w/hostdev on driver reconnect (Laine Stump)
- qemu: escape literal IPv6 address in NBD migration (Ján Tomko)
- Check for existence of interface prior to setting terminate flag (John Ferlan)
- Resolve memory leak found by valgrind (John Ferlan)
- qemu: snapshot: Don't kill access to disk if snapshot creation fails (Peter Krempa)
- virsh: migrate: Don't disallow --p2p and --migrateuri (Cole Robinson)
- qemu: Don't report error on successful media eject (Cole Robinson)
- qemu: save domain state to XML after reboot (Sergey Fionov)
- esx: Fix dynamic VI object type detection (Matthias Bolte)
- storage_conf: Don't leak "uuid" in virStoragePoolDefParseAuthCephx (Osier Yang)
- storage_conf: Fix the wrong error message (Osier Yang)
- Fix blkdeviotune for shutoff domain (Martin Kletzander)
- virsh: Fix regression of vol-resize (Osier Yang)
- xen: Resolve Coverity FORWARD_NULL issue (John Ferlan)
- qemu: fix NBD migration to hosts with IPv6 enabled (Ján Tomko)
- conf: fix use after free in virChrdevOpen (Ján Tomko)
- virNetMessageSaveError: Fix copy and paste error (Michal Privoznik)
- virNWFilterHashTablePut: Free the correct variable (Michal Privoznik)
- umlConnectTapDevice: initialize tapfd variable (Michal Privoznik)
- remote: fix dom->id after virDomainCreateWithFlags (Marek Marczykowski)
- virsh: Fix virDomainFree for NULL domain in blkdeviotune (Martin Kletzander)
- virNetDevTapCreate: Fail on systems not supporting IFF_MULTI_QUEUE (Michal Privoznik)
- cgroup: be robust against cgroup movement races (Eric Blake)
- shunloadtest: Resolve Coverity CHECKED_RETURN error (John Ferlan)
- xencapstest: Resolve Coverity CHECKED_RETURN error (John Ferlan)
- qemu: fix a typo in qemuAddSharedDevice (Guannan Ren)
- qemuDomainChangeEjectableMedia: Unlock domain while waiting for event (Michal Privoznik)
- LXC: fix memory leak in virLXCControllerSetupDevPTS (Gao feng)
- LXC: remove unnecessary check on root filesystem (Gao feng)
- esx: Fix error reporting in esxVI_LookupManagedObjectHelper (Matthias Bolte)
- Fix failure to detect missing cgroup partitions (Daniel P. Berrange)
- libxl: fix leaking libxl events (Jim Fehlig)
- qemu: Fix cgroup handling when setting VCPU BW (Martin Kletzander)
- Don't mount selinux fs in LXC if selinux is disabled (Daniel P. Berrange)
- Fix LXC startup when /var/run is an absolute symlink (Daniel P. Berrange)
- conf: Fix the bug of disk->copy_on_read formating (Osier Yang)
- daemon: fix leak after listing all volumes (Ján Tomko)
- qemu: Fix crash in migration of graphics-less guests. (Viktor Mihajlovski)
- Adjust improperly formatted <sysinfo> uuid (John Ferlan)
- storage: Ensure 'qemu-img resize' size arg is a 512 multiple (Christophe Fergeau)
- spec: fix outdated comment (Eric Blake)
- Forbid use of ':' in RBD pool names (Daniel P. Berrange)
- qemu: fix bad free (Eric Blake)
- Fix starting domains when kernel has no cgroups support (Jim Fehlig)
- Fix error handling of readdir() in virFileLoopDeviceOpen (Daniel P. Berrange)
- util: Fix regression introduced by commit 4360a098441 (Osier Yang)
- util: Fix regression of wwn reading (Osier Yang)
- build: fix use of mmap (Eric Blake)
- conf: don't crash on a tpm device with no backends (Ján Tomko)
- don't mention disk controllers in generic controller errors (Ján Tomko)
- iscsi: don't leak portal string when starting a pool (Ján Tomko)
- virsh: Resolve Coverity 'MISSING_BREAK' (John Ferlan)
- lxc: Coverity false positive USE_AFTER_FREE (John Ferlan)
- Don't allow renaming of domains by the backdoor (Daniel P. Berrange)
- qemu: fix stupid typos in VFIO cgroup setup/teardown (Laine Stump)
- Ignore 'uri' parameter in lockd driver (Daniel P. Berrange)
- network: fix network driver startup for qemu:///session (Laine Stump)
- Fix warning about unsupported cookie flags in QEMU driver (Daniel P. Berrange)
- Fix release of resources with lockd plugin (Daniel P. Berrange)
- Fix F_DUPFD_CLOEXEC operation args (Daniel P. Berrange)
- build: fix make rpm failure (Laine Stump)
- Fix potential use of undefined variable in remote dispatch code (Daniel P. Berrange)
- virInitctlRequest: unbreak make syntax check (Guido Günther)
- virInitctlRequest: unbreak make syntax check (Guido Günther)
Improvements:
- nodedev_hal: Modernize the function's style (Osier Yang)
- Introduce virFilePrintf() as a portable fprintf() (Daniel P. Berrange)
- qemu: migration: error if tunnelled + storage specified (Cole Robinson)
- qemu: migration: Improve p2p error if we can't open conn (Cole Robinson)
- storage_conf: Use uid_t/gid_t instead of int to cast the value (Osier Yang)
- storage_conf: Improve error messages (Osier Yang)
- storage_conf: Use NULLSTR instead (Osier Yang)
- storage_conf: Improve the memory deallocation of virStorageVolDefParseXML (Osier Yang)
- storage_conf: Improve the memory deallocation of pool def parsing (Osier Yang)
- syntax: fix broken error message in previous patch (Eric Blake)
- util: fix the VIR_STRDUP when src is NULL (yangdongsheng)
- Adapt to new VIR_STRNDUP behavior (Michal Privoznik)
- virStrndup: Accept negative values as string length (Michal Privoznik)
- storage_conf: Fix the error type (Osier Yang)
- storage_conf: Put "%s" at the same line with error type (Osier Yang)
- storage_conf: Use xmlStrEqual instead of STREQ (Osier Yang)
- storage_conf: Remove the useless casting (Osier Yang)
- syntax-check: ignore all quoted strings in bracket-spacing (Ján Tomko)
- nwfilter: Remove error report in virNWFilterDHCPSnoopEnd (Stefan Berger)
- cgroups: Do not enforce nonexistent controllers (Viktor Mihajlovski)
- Introduce syntax-check rule to prefer VIR_STRDUP over strdup (Michal Privoznik)
- Adapt to VIR_STRDUP and VIR_STRNDUP in tools/virsh.c (Michal Privoznik)
- Adapt to VIR_STRDUP and VIR_STRNDUP in src/util/* (Michal Privoznik)
- Adapt to VIR_STRDUP and VIR_STRNDUP in src/util/vircgroup.c (Michal Privoznik)
- virCgroupAddTaskStrController: s/-1/-ENOMEM/ (Michal Privoznik)
- conf: add missing OOM errors (Ján Tomko)
- Adapt to VIR_STRDUP and VIR_STRNDUP in src/xenxs/* (Michal Privoznik)
- Adapt to VIR_STRDUP and VIR_STRNDUP in src/xenapi/* (Michal Privoznik)
- Adapt to VIR_STRDUP and VIR_STRNDUP in src/xen/* (Michal Privoznik)
- Fix the build failure (Osier Yang)
- Adapt to VIR_STRDUP and VIR_STRNDUP in src/security/* (Michal Privoznik)
- Adapt to VIR_STRDUP and VIR_STRNDUP in src/rpc/* (Michal Privoznik)
- Adapt to VIR_STRDUP and VIR_STRNDUP in src/remote/* (Michal Privoznik)
- Adapt to VIR_STRDUP and VIR_STRNDUP in src/qemu/* (Michal Privoznik)
- virsh: omit OPTION section in 'virsh help' if no option exists (Zhang Xiaohe)
- Change virConnectDomainEventGraphicsCallback signature (Michal Privoznik)
- Adapt to VIR_STRDUP and VIR_STRNDUP in src/openvz/* (Michal Privoznik)
- Adapt to VIR_STRDUP and VIR_STRNDUP in src/conf/* (Michal Privoznik)
- qemu: Enable multiqueue network (Michal Privoznik)
- qemu: Adapt qemuBuildInterfaceCommandLine to to multiqueue net (Michal Privoznik)
- qemu: Move interface cmd line construction into a separate function (Michal Privoznik)
- Introduce /domain/devices/interface/driver/@queues attribute (Michal Privoznik)
- qemu: add ', share=<policy>' to qemu commandline (Guannan Ren)
- conf: add 'sharePolicy' attribute to graphics element for vnc (Guannan Ren)
- qemu: new vnc display sharing policy caps flag (Guannan Ren)
- vbox: fix VIR_STRDUP value check (Ján Tomko)
- syntax-check: Add the rule to forbid whitespace before ";" (Osier Yang)
- Fix the syntax-check failure (Osier Yang)
- interface: list all interfaces with flags == 0 (Guannan Ren)
- Convert Xen domain core dump driver methods to use virDomainDefPtr (Daniel P. Berrange)
- Convert Xen domain stats/peek driver methods to use virDomainDefPtr (Daniel P. Berrange)
- Convert Xen domain scheduler driver methods to use virDomainDefPtr (Daniel P. Berrange)
- Convert Xen domain autostart driver methods to use virDomainDefPtr (Daniel P. Berrange)
- Convert Xen domain device hotplug driver methods to use virDomainDefPtr (Daniel P. Berrange)
- Convert Xen domain VCPU driver methods to use virDomainDefPtr (Daniel P. Berrange)
- Convert Xen domain create/define/getxml/migration APIs to use virDomainDefPtr (Daniel P. Berrange)
- Convert Xen domain managed save driver methods to use virDomainDefPtr (Daniel P. Berrange)
- Convert Xen domain property driver methods to use virDomainDefPtr (Daniel P. Berrange)
- Convert Xen domain lifecycle driver methods to use virDomainDefPtr (Daniel P. Berrange)
- Convert Xen domain lookup driver methods to use virDomainDefPtr (Daniel P. Berrange)
- qemu: Don't remove the "return 0" (Osier Yang)
- esx: Replace almost all esxVI_String_DeepCopyValue vith VIR_STRDUP (Matthias Bolte)
- vmware: Restore OOM error reporting in vmwareCopyVMXFileName (Matthias Bolte)
- maint: enforce correct copyright usage (Eric Blake)
- maint: refer to correct license file (Eric Blake)
- maint: follow recommended practice for using LGPL (Eric Blake)
- maint: use LGPL correctly (Eric Blake)
- openvzDomainSetNetwork: use virCommand (Michal Privoznik)
- qemu: Add callback struct for qemuBuildCommandLine (Osier Yang)
- storage_conf: Improve the coding style in storage_conf.h (Osier Yang)
- storage_conf: Fix indentions in storage_conf.c (Osier Yang)
- storage_conf: Fix the coding stype in storage_conf.c (Osier Yang)
- qemu: Abstract code for cpuset controller setting into a helper (Osier Yang)
- qemu: Abstract code for devices controller setting into a helper (Osier Yang)
- qemu: Abstract code for memory controller setting into a helper (Osier Yang)
- qemu: Abstract the code for blkio controller setting into a helper (Osier Yang)
- Add libvirt-daemon-vbox & libvirt-daemon-driver-vbox RPMs (Daniel P. Berrange)
- Include GNULIB mkdtemp module (Daniel P. Berrange)
- Set PKG_CONFIG_LIBDIR in autobuild.sh (Daniel P. Berrange)
- qemu: report useful error failling to destroy domain gracefully (Guannan Ren)
- qemu: Check conflicts for shared scsi host device (Osier Yang)
- Re-add selinux/selinux.h to lxc_container.c (Daniel P. Berrange)
- schema: make source optional in volume XML (Ján Tomko)
- schema: require target path in storage pool xml (Ján Tomko)
- qemu: Change values of disk discard (Osier Yang)
- qemu: Implement support for locking domain's memory pages (Jiri Denemark)
- Add support for locking domain's memory pages (Jiri Denemark)
- Fix build with VirtualBox (Jiri Denemark)
- qemu: Set unpriv_sgio for scsi host device (Osier Yang)
- qemu: Refactor qemuSetUnprivSGIO to support scsi host device (Osier Yang)
- qemu: Move qemuSetUnprivSGIO into qemu_conf.c (Osier Yang)
- conf: Introduce sgio for hostdev (Osier Yang)
- Rename virDomainDiskSGIO to virDomainDeviceSGIO (Osier Yang)
- qemu: Manage shared device entry for scsi host device (Osier Yang)
- qemu: Refactor the helpers to track shared scsi host device (Osier Yang)
- utils: Add a helper to get the device name that sg device mapped to (Osier Yang)
- qemu: Rename qemu_driver->sharedDisks to qemu_driver->sharedDevices (Osier Yang)
- conf: Introduce <shareable> for hostdev (Osier Yang)
- string: test VIR_STRDUP (Eric Blake)
- virsh: lookup interface by name or mac other than one by one (Guannan Ren)
- nwfilter: check for inverted ctdir (Stefan Berger)
- Validate the bios_date format for <sysinfo> (John Ferlan)
- Remove obsolete skipRoot flag in LXC driver (Daniel P. Berrange)
- Stop passing around old root directory prefix (Daniel P. Berrange)
- Remove obsolete pivotRoot flag in LXC driver (Daniel P. Berrange)
- qemu: Support discard for disk (Osier Yang)
- Handle the domain event 'on_reboot' and 'on_poweroff' settings (John Ferlan)
- Adjust comments to describe on_poweroff and on_reboot action (John Ferlan)
- Adjust usage of qemu -no-reboot and -no-shutdown options (John Ferlan)
- qemu: Add VNC WebSocket support (Martin Kletzander)
- Add VNC WebSocket support (Martin Kletzander)
- qemu: New XML to disable memory merge at guest startup (Osier Yang)
- qemu: detect -machine mem-merge capability (Eric Blake)
- Rename rbd-invalid.xml to rbd-no-colon.xml (Daniel P. Berrange)
- tests: Add fchostdata in EXTRA_DIST (Osier Yang)
- virsh: Pretty the output of qemu-agent-command (Osier Yang)
- virsh: Use vshPrint instead of printf (Osier Yang)
- Fix invalid argument reference in virnetdev.h (Martin Kletzander)
- Don't duplicate compiler warning flags when linking (Daniel P. Berrange)
- Only pass -export-dynamic to linker, not compiler (Daniel P. Berrange)
- Correctly detect warning flags with clang (Daniel P. Berrange)
- Ignore cast alignment warnings in inotify code for Xen. (Daniel P. Berrange)
- Workaround issue with clang and inline functions with static vars (Daniel P. Berrange)
- Ensure consistent enablement of gcc 'diagnostic' pragma (Daniel P. Berrange)
- qemu: query command line options in QMP (Eric Blake)
- qemu: simplify string cleanup (Eric Blake)
- qemu: use bool in monitor struct (Eric Blake)
- json: support removing a value from an object (Eric Blake)
- Don't overwrite useful message when creating macvlan fails (Daniel P. Berrange)
- Remove & ban use of select() for waiting for I/O (Daniel P. Berrange)
- qemu: Add hotplug support for scsi host device (Han Cheng)
- .gitignore: add fchosttest (Ján Tomko)
- qemu: Refactor helpers for USB device attachment (Osier Yang)
- Escaping leading '.' in cgroup names (Daniel P. Berrange)
- qemu: Introduce activeScsiHostdevs list for scsi host devices (Han Cheng)
- Adapt to VIR_STRDUP and VIR_STRNDUP in src/vbox/* (Michal Privoznik)
- Support NBD backed disks/filesystems in LXC driver (Daniel P. Berrange)
- Add 'nbd' as a valid filesystem driver type (Daniel P. Berrange)
- Add a helper API for setting up a NBD device with qemu-nbd (Daniel P. Berrange)
- Re-arrange code setting up ifs/disk loop devices for LXC (Daniel P. Berrange)
- Add support for storage format in FS <driver> (Daniel P. Berrange)
- security_apparmor.c: Include virscsi.h (Michal Privoznik)
- security: Manage the security label for scsi host device (Osier Yang)
- qemu: Allow the scsi-generic device in cgroup (Han Cheng)
- qemu: Support bootindex for scsi host device (Osier Yang)
- Introduce <readonly> for hostdev (Osier Yang)
- rng: Interleave hostdev elements (Osier Yang)
- qemu: Build qemu command line for scsi host device (Han Cheng)
- utils: util functions for scsi hostdev (Han Cheng)
- qemu: New cap flags for scsi-generic (Han Cheng)
- node_device: Clean up unused macros (Osier Yang)
- conf: Generic XMLs for scsi hostdev (Han Cheng)
- tests: Add tests for fc_host (Osier Yang)
- util: Honor the passed sysfs_prefix (Osier Yang)
- util: Update the comment for virGetFCHostNameByWWN (Osier Yang)
- util: Change virIsCapable* to return bool (Osier Yang)
- util: Don't miss the slash in constructed path (Osier Yang)
- build: update to latest gnulib, for syntax-check (Eric Blake)
- Update hellolibvirt to demo virGetLastErrorMessage() (Daniel P. Berrange)
- Add a test case for the fdstream file read/write code (Daniel P. Berrange)
- Allow the iohelper path to be customized by test programs (Daniel P. Berrange)
- Add a virGetLastErrorMessage() function (Daniel P. Berrange)
- Fix iohelper usage with streams opened for read (Daniel P. Berrange)
- Cope with missing swap cgroup controls (Daniel P. Berrange)
- util: move virFile* functions from virutil.c to virfile.c (Laine Stump)
- util: fix virFileOpenAs return value and resulting error logs (Laine Stump)
- Build breaker - requires VIR_FROM_THIS (John Ferlan)
- Adapt to VIR_STRDUP and VIR_STRNDUP in src/test/* (Michal Privoznik)
- virGetStorageVol: Don't ignore NULL pool name (Michal Privoznik)
- Adapt to VIR_STRDUP and VIR_STRNDUP in src/* (Michal Privoznik)
- Adapt to VIR_STRDUP and VIR_STRNDUP in tests/* (Michal Privoznik)
- Adapt to VIR_STRDUP and VIR_STRNDUP in src/storage/* (Michal Privoznik)
- dom event example: Add error check to impl call (Jesse J. Cook)
- dom event example: init before register event impl (Jesse J. Cook)
- conf: Fix typo in error message in ABI stability check (Peter Krempa)
- tests: use portable shell code (Eric Blake)
- Replace 'goto clean' with 'goto cleanup' in apparmor code (Daniel P. Berrange)
- Replace list of driver source files with variables (Daniel P. Berrange)
- Fix naming of methods in ESX storage backends to follow public APIs (Daniel P. Berrange)
- Skip virNWFilterTechDriver when validating API naming (Daniel P. Berrange)
- Replace 'goto cleanup' with 'goto error' in udev interface driver (Daniel P. Berrange)
- Replace 'goto err' with 'goto cleanup' in udev interface driver (Daniel P. Berrange)
- tests: files named '.*-invalid.xml' should fail validation (Ján Tomko)
- Simplify the Xen domain stats/peek / node memory driver methods (Daniel P. Berrange)
- Simplify the Xen domain autostart driver method (Daniel P. Berrange)
- Simplify the Xen domain scheduler parameter driver methods (Daniel P. Berrange)
- Simplify the Xen domain attach/dettach driver methods (Daniel P. Berrange)
- Simplify the Xen domain define/undefine driver methods (Daniel P. Berrange)
- Simplify the Xen domain start driver method (Daniel P. Berrange)
- Simplify the Xen driver define domain driver methods (Daniel P. Berrange)
- Simplify the Xen domain migration driver methods (Daniel P. Berrange)
- Simplify the Xen domain get XML driver method (Daniel P. Berrange)
- Simplify the Xen domain VCPU driver methods (Daniel P. Berrange)
- Simplify the Xen domain save/restore driver methods (Daniel P. Berrange)
- Simplify the Xen domain get info/state driver methods (Daniel P. Berrange)
- Simplify the Xen domain get/set (max) memory driver methods (Daniel P. Berrange)
- Remove Xen get hostname driver method (Daniel P. Berrange)
- Simplify the Xen domain get OS type driver method (Daniel P. Berrange)
- Simplify the Xen domain destroy driver method (Daniel P. Berrange)
- Simplify the Xen domain shutdown/reboot driver methods (Daniel P. Berrange)
- Simplify the Xen domain suspend/resume driver methods (Daniel P. Berrange)
- Simplify the Xen domain is persistent driver method (Daniel P. Berrange)
- Simplify the Xen domain lookup driver methods (Daniel P. Berrange)
- Simplify the Xen domain create driver method (Daniel P. Berrange)
- Simplify the Xen count/list domains driver methods (Daniel P. Berrange)
- Simplify the Xen get max vcpus / node get info driver methods (Daniel P. Berrange)
- Simplify the Xen get version driver method (Daniel P. Berrange)
- Simplify the Xen get type driver method (Daniel P. Berrange)
- Simplify opening of Xen drivers (Daniel P. Berrange)
- Remove pointless GET_PRIVATE macro from Xen driver (Daniel P. Berrange)
- Remove VIR_CONNECT_RO checks from xen drivers (Daniel P. Berrange)
- Remove xen driver checks for priv->handle < 0 (Daniel P. Berrange)
- Adapt to VIR_STRDUP and VIR_STRNDUP in src/vmx/* (Michal Privoznik)
- Adapt to VIR_STRDUP and VIR_STRNDUP in src/vmware/* (Michal Privoznik)
- Adapt to VIR_STRDUP and VIR_STRNDUP in src/uml/* (Michal Privoznik)
- Adapt to VIR_STRDUP and VIR_STRNDUP in src/secret/* (Michal Privoznik)
- Adapt to VIR_STRDUP and VIR_STRNDUP in src/phyp/* (Michal Privoznik)
- Adapt to VIR_STRDUP and VIR_STRNDUP in src/parallels/* (Michal Privoznik)
- Adapt to VIR_STRDUP and VIR_STRNDUP in src/nwfilter/* (Michal Privoznik)
- Adapt to VIR_STRDUP and VIR_STRNDUP in src/interface/* (Michal Privoznik)
- Adapt to VIR_STRDUP and VIR_STRNDUP in src/node_device/* (Michal Privoznik)
- Adapt to VIR_STRDUP and VIR_STRNDUP in src/network/* (Michal Privoznik)
- Adapt to VIR_STRDUP and VIR_STRNDUP in src/lxc/* (Michal Privoznik)
- Adapt to VIR_STRDUP and VIR_STRNDUP in src/locking/* (Michal Privoznik)
- Adapt to VIR_STRDUP and VIR_STRNDUP in src/libxl/* (Michal Privoznik)
- Adapt to VIR_STRDUP and VIR_STRNDUP in src/hyperv/* (Michal Privoznik)
- Adapt to VIR_STRDUP and VIR_STRNDUP in src/esx/* (Michal Privoznik)
- Adapt to VIR_STRDUP and VIR_STRNDUP in src/cpu/* (Michal Privoznik)
- Delete udevFreeIfaceDef function in udev interface driver (Daniel P. Berrange)
- maint: update to latest gnulib (Eric Blake)
- Unmerge attach/update/modify device APIs in drivers (Daniel P. Berrange)
- Pull parsing of migration xml up into QEMU driver APIs (Daniel P. Berrange)
- Fix naming of some node device APIs (Daniel P. Berrange)
- Separate internal node suspend APIs from public API (Daniel P. Berrange)
- Separate internal node device APIs from public API (Daniel P. Berrange)
- Separate virGetHostname() API contract from driver APIs (Daniel P. Berrange)
- Include process start time when doing polkit checks (Daniel P. Berrange)
- Rename "security context" to "selinux context" (Daniel P. Berrange)
- Fix possible undefined value in check-symsorting.pl (Daniel P. Berrange)
- storage: Skip inactive lv volumes (Osier Yang)
- string: make VIR_STRDUP easier to use (Eric Blake)
- alloc: make VIR_APPEND_ELEMENT safer (Eric Blake)
- syntax-check: forbid virBufferAsprintf with string literals (Ján Tomko)
- get rid of virBufferAsprintf where possible (Ján Tomko)
- qemu: allocate network connections sooner during domain startup (Laine Stump)
- Ensure stub todo.html.in file is HTML5 (Daniel P. Berrange)
- qemu: Enable the capability bit for -no-kvm-pit-reinjection on x86 only (Boris Fiuczynski)
- rpc: message related sizes enlarged (Daniel Hansel)
- qemu: Do fake auto-allocation of ports when generating native command (Peter Krempa)
- spec: proper soft static allocation of qemu uid (Eric Blake)
- build: always include libvirt_lxc.syms in tarball (Eric Blake)
- Adapt to VIR_STRDUP and VIR_STRNDUP in daemon/* (Michal Privoznik)
- virstring: Introduce VIR_STRDUP and VIR_STRNDUP (Michal Privoznik)
- Make detect_scsi_host_caps a function on all architectures (Guido Günther)
- More paranoid initialization of 'nparams' variable in dispatch code (Daniel P. Berrange)
- Fix format string handling in network driver (Daniel P. Berrange)
- esx: Reduce code duplication in generator (Matthias Bolte)
- build: avoid useless virAsprintf (Eric Blake)
- build: always include sanitytest in tarball (Eric Blake)
- util: fix compile errors caused by moving string functions (Laine Stump)
- virutil: Move string related functions to virstring.c (Michal Privoznik)
- qemu: Generate agent socket path if missing (Michal Privoznik)
Cleanups:
- Storage: Fix the indention of rbd test file (Osier Yang)
- qemu: Fix damaged whitespace (Peter Krempa)
- Properly indent function's opening bracket (Martin Kletzander)
- build: fix typo in earlier commit (Eric Blake)
- build: drop unused variable (Eric Blake)
- syntax-check: mandate space after mid-line semicolon (Eric Blake)
- syntax: prefer space after semicolon in for loop (Eric Blake)
- security_dac: Fix the coding style (Osier Yang)
- nwfilter: Change the comment style (Osier Yang)
- src/*.[ch]: Remove the whitespace before ";" (Osier Yang)
- src/locking: Remove the whitespace before ";" (Osier Yang)
- python: Remove the whitespace before ";" (Osier Yang)
- examples: Remove the whitespace before ';' (Osier Yang)
- src/lxc: Remove the whitespace before ";" (Osier Yang)
- src/remote: Remove the whitespace before ";" (Osier Yang)
- src/rpc: Remove the whitespace before ";" (Osier Yang)
- src/utils: Remove the whitespace before ";" (Osier Yang)
- tests/: Remove the whitespace before ";" (Osier Yang)
- daemon: Remove the whitespace before ";" (Osier Yang)
- tools: Remove the whitespace before ";" (Osier Yang)
- src/storage: Remove the whitespace before ';' (Osier Yang)
- src/security: Remove the whitespace before ';' (Osier Yang)
- src/xen: Remove the whitespace before ';' (Osier Yang)
- src/vmware: Remove the whitespace before ';' (Osier Yang)
- src/qemu: Remove the whitespace before ';' (Osier Yang)
- src/interface: Remove the whitespace before ';' (Osier Yang)
- src/parallels: Remove the whitespace before ';' (Osier Yang)
- src/uml: Remove the whitespace before ';' (Osier Yang)
- src/openvz: Remove the whitespace before ';' (Osier Yang)
- src/node_device: Remove the whitespace before ';' (Osier Yang)
- src/phyp: Remove the whitespace before ';' (Osier Yang)
- src/nwfilter: Remove the whitespace before ';' (Osier Yang)
- src/xenxs: Remove the whitespace before ';' (Osier Yang)
- src/vbox: Remove the whitespace before ';' (Osier Yang)
- src/test: Remove the whitespace before ';' (Osier Yang)
- src/conf: Remove the whitespace before ';' (Osier Yang)
- src/libxl: Remove the whitespace before ';' (Osier Yang)
- src/network: Remove the whitespace before ';' (Osier Yang)
- LXC: move the comments to the proper place (Gao feng)
- conf: Improve the coding style (Osier Yang)
- tests: Sort the EXTRA_DIST list (Osier Yang)
- libvirt.c: Fix the indention (Osier Yang)
- conf: Remove the unrelated comment (Osier Yang)
- build: clean up stray files found by 'make distcheck' (Eric Blake)
- Remove redundant () in expression (Daniel P. Berrange)
So thanks everybody for your contributions to this release, be it
ideas, bugs reports, documentation, patches, features or improved
localization !
Daniel
--
Daniel Veillard | Open Source and Standards, Red Hat
veillard(a)redhat.com | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | virtualization library http://libvirt.org/
11 years, 5 months
[libvirt] [PATCH] nodedev_hal: Modernize the function's style
by Osier Yang
Use style like:
void
foo (const char *name)
{
printf("Hello, %s\n", name);
}
Later patches will clean up node_device_hal.c more.
---
Pushed under trivial rule.
---
src/node_device/node_device_hal.c | 148 +++++++++++++++++++++++---------------
1 file changed, 89 insertions(+), 59 deletions(-)
diff --git a/src/node_device/node_device_hal.c b/src/node_device/node_device_hal.c
index eecbffa..99b5044 100644
--- a/src/node_device/node_device_hal.c
+++ b/src/node_device/node_device_hal.c
@@ -57,17 +57,19 @@ static virNodeDeviceDriverStatePtr driverState;
#define NODE_DEV_UDI(obj) ((const char *)((obj)->privateData)
-static const char *hal_name(const char *udi)
+static const char *
+hal_name(const char *udi)
{
const char *name = strrchr(udi, '/');
if (name)
- return name+1;
+ return name + 1;
return udi;
}
-static int get_str_prop(LibHalContext *ctxt, const char *udi,
- const char *prop, char **val_p)
+static int
+get_str_prop(LibHalContext *ctxt, const char *udi,
+ const char *prop, char **val_p)
{
char *val = libhal_device_get_property_string(ctxt, udi, prop, NULL);
@@ -84,8 +86,9 @@ static int 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)
+static int
+get_int_prop(LibHalContext *ctxt, const char *udi,
+ const char *prop, int *val_p)
{
DBusError err;
int val;
@@ -101,8 +104,9 @@ static int 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)
+static int
+get_bool_prop(LibHalContext *ctxt, const char *udi,
+ const char *prop, int *val_p)
{
DBusError err;
int val;
@@ -118,8 +122,9 @@ static int 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)
+static int
+get_uint64_prop(LibHalContext *ctxt, const char *udi,
+ const char *prop, unsigned long long *val_p)
{
DBusError err;
unsigned long long val;
@@ -135,8 +140,9 @@ static int get_uint64_prop(LibHalContext *ctxt, const char *udi,
return rv;
}
-static int gather_pci_cap(LibHalContext *ctx, const char *udi,
- union _virNodeDevCapData *d)
+static int
+gather_pci_cap(LibHalContext *ctx, const char *udi,
+ union _virNodeDevCapData *d)
{
char *sysfs_path;
@@ -177,8 +183,9 @@ static int gather_pci_cap(LibHalContext *ctx, const char *udi,
}
-static int gather_usb_cap(LibHalContext *ctx, const char *udi,
- union _virNodeDevCapData *d)
+static int
+gather_usb_cap(LibHalContext *ctx, const char *udi,
+ union _virNodeDevCapData *d)
{
(void)get_int_prop(ctx, udi, "usb.interface.number",
(int *)&d->usb_if.number);
@@ -194,8 +201,9 @@ static int gather_usb_cap(LibHalContext *ctx, const char *udi,
}
-static int gather_usb_device_cap(LibHalContext *ctx, const char *udi,
- union _virNodeDevCapData *d)
+static int
+gather_usb_device_cap(LibHalContext *ctx, const char *udi,
+ union _virNodeDevCapData *d)
{
(void)get_int_prop(ctx, udi, "usb_device.bus_number",
(int *)&d->usb_dev.bus);
@@ -215,8 +223,9 @@ static int gather_usb_device_cap(LibHalContext *ctx, const char *udi,
}
-static int gather_net_cap(LibHalContext *ctx, const char *udi,
- union _virNodeDevCapData *d)
+static int
+gather_net_cap(LibHalContext *ctx, const char *udi,
+ union _virNodeDevCapData *d)
{
unsigned long long dummy;
(void)get_str_prop(ctx, udi, "net.interface", &d->net.ifname);
@@ -234,8 +243,9 @@ static int gather_net_cap(LibHalContext *ctx, const char *udi,
}
-static int gather_scsi_host_cap(LibHalContext *ctx, const char *udi,
- union _virNodeDevCapData *d)
+static int
+gather_scsi_host_cap(LibHalContext *ctx, const char *udi,
+ union _virNodeDevCapData *d)
{
int retval = 0;
@@ -252,8 +262,9 @@ out:
}
-static int gather_scsi_cap(LibHalContext *ctx, const char *udi,
- union _virNodeDevCapData *d)
+static int
+gather_scsi_cap(LibHalContext *ctx, const char *udi,
+ union _virNodeDevCapData *d)
{
(void)get_int_prop(ctx, udi, "scsi.host", (int *)&d->scsi.host);
(void)get_int_prop(ctx, udi, "scsi.bus", (int *)&d->scsi.bus);
@@ -264,8 +275,9 @@ static int gather_scsi_cap(LibHalContext *ctx, const char *udi,
}
-static int gather_storage_cap(LibHalContext *ctx, const char *udi,
- union _virNodeDevCapData *d)
+static int
+gather_storage_cap(LibHalContext *ctx, const char *udi,
+ union _virNodeDevCapData *d)
{
int val;
(void)get_str_prop(ctx, udi, "block.device", &d->storage.block);
@@ -292,8 +304,9 @@ static int gather_storage_cap(LibHalContext *ctx, const char *udi,
}
-static int gather_system_cap(LibHalContext *ctx, const char *udi,
- union _virNodeDevCapData *d)
+static int
+gather_system_cap(LibHalContext *ctx, const char *udi,
+ union _virNodeDevCapData *d)
{
char *uuidstr;
@@ -341,16 +354,18 @@ static caps_tbl_entry caps_tbl[] = {
/* qsort/bsearch string comparator */
-static int cmpstringp(const void *p1, const void *p2)
+static int
+cmpstringp(const void *p1, const void *p2)
{
/* from man 3 qsort */
return strcmp(* (char * const *) p1, * (char * const *) p2);
}
-static int gather_capability(LibHalContext *ctx, const char *udi,
- const char *cap_name,
- virNodeDevCapsDefPtr *caps_p)
+static int
+gather_capability(LibHalContext *ctx, const char *udi,
+ const char *cap_name,
+ virNodeDevCapsDefPtr *caps_p)
{
caps_tbl_entry *entry;
@@ -377,8 +392,9 @@ static int gather_capability(LibHalContext *ctx, const char *udi,
}
-static int gather_capabilities(LibHalContext *ctx, const char *udi,
- virNodeDevCapsDefPtr *caps_p)
+static int
+gather_capabilities(LibHalContext *ctx, const char *udi,
+ virNodeDevCapsDefPtr *caps_p)
{
char *bus_name = NULL;
virNodeDevCapsDefPtr caps = NULL;
@@ -433,12 +449,14 @@ static int gather_capabilities(LibHalContext *ctx, const char *udi,
return rv;
}
-static void free_udi(void *udi)
+static void
+free_udi(void *udi)
{
VIR_FREE(udi);
}
-static void dev_create(const char *udi)
+static void
+dev_create(const char *udi)
{
LibHalContext *ctx;
char *parent_key = NULL;
@@ -503,7 +521,8 @@ cleanup:
nodeDeviceUnlock(driverState);
}
-static void dev_refresh(const char *udi)
+static void
+dev_refresh(const char *udi)
{
const char *name = hal_name(udi);
virNodeDeviceObjPtr dev;
@@ -524,16 +543,18 @@ static void dev_refresh(const char *udi)
}
}
-static void device_added(LibHalContext *ctx ATTRIBUTE_UNUSED,
- const char *udi)
+static void
+device_added(LibHalContext *ctx ATTRIBUTE_UNUSED,
+ const char *udi)
{
VIR_DEBUG("%s", hal_name(udi));
dev_create(udi);
}
-static void device_removed(LibHalContext *ctx ATTRIBUTE_UNUSED,
- const char *udi)
+static void
+device_removed(LibHalContext *ctx ATTRIBUTE_UNUSED,
+ const char *udi)
{
const char *name = hal_name(udi);
virNodeDeviceObjPtr dev;
@@ -549,8 +570,9 @@ static void device_removed(LibHalContext *ctx ATTRIBUTE_UNUSED,
}
-static void device_cap_added(LibHalContext *ctx,
- const char *udi, const char *cap)
+static void
+device_cap_added(LibHalContext *ctx,
+ const char *udi, const char *cap)
{
const char *name = hal_name(udi);
virNodeDeviceObjPtr dev;
@@ -568,9 +590,10 @@ static void device_cap_added(LibHalContext *ctx,
}
-static void device_cap_lost(LibHalContext *ctx ATTRIBUTE_UNUSED,
- const char *udi,
- const char *cap)
+static void
+device_cap_lost(LibHalContext *ctx ATTRIBUTE_UNUSED,
+ const char *udi,
+ const char *cap)
{
const char *name = hal_name(udi);
VIR_DEBUG("%s %s", cap, name);
@@ -579,11 +602,12 @@ static void device_cap_lost(LibHalContext *ctx ATTRIBUTE_UNUSED,
}
-static void device_prop_modified(LibHalContext *ctx ATTRIBUTE_UNUSED,
- const char *udi,
- const char *key,
- dbus_bool_t is_removed ATTRIBUTE_UNUSED,
- dbus_bool_t is_added ATTRIBUTE_UNUSED)
+static void
+device_prop_modified(LibHalContext *ctx ATTRIBUTE_UNUSED,
+ const char *udi,
+ const char *key,
+ dbus_bool_t is_removed ATTRIBUTE_UNUSED,
+ dbus_bool_t is_added ATTRIBUTE_UNUSED)
{
const char *name = hal_name(udi);
VIR_DEBUG("%s %s", name, key);
@@ -592,9 +616,10 @@ static void device_prop_modified(LibHalContext *ctx ATTRIBUTE_UNUSED,
}
-static int nodeStateInitialize(bool privileged ATTRIBUTE_UNUSED,
- virStateInhibitCallback callback ATTRIBUTE_UNUSED,
- void *opaque ATTRIBUTE_UNUSED)
+static int
+nodeStateInitialize(bool privileged ATTRIBUTE_UNUSED,
+ virStateInhibitCallback callback ATTRIBUTE_UNUSED,
+ void *opaque ATTRIBUTE_UNUSED)
{
LibHalContext *hal_ctx = NULL;
char **udi = NULL;
@@ -693,7 +718,8 @@ static int nodeStateInitialize(bool privileged ATTRIBUTE_UNUSED,
}
-static int nodeStateCleanup(void)
+static int
+nodeStateCleanup(void)
{
if (driverState) {
nodeDeviceLock(driverState);
@@ -710,7 +736,8 @@ static int nodeStateCleanup(void)
}
-static int nodeStateReload(void)
+static int
+nodeStateReload(void)
{
DBusError err;
char **udi = NULL;
@@ -742,9 +769,10 @@ static int nodeStateReload(void)
}
-static virDrvOpenStatus nodeDeviceOpen(virConnectPtr conn,
- virConnectAuthPtr auth ATTRIBUTE_UNUSED,
- unsigned int flags)
+static virDrvOpenStatus
+nodeDeviceOpen(virConnectPtr conn,
+ virConnectAuthPtr auth ATTRIBUTE_UNUSED,
+ unsigned int flags)
{
virCheckFlags(VIR_CONNECT_RO, VIR_DRV_OPEN_ERROR);
@@ -756,7 +784,8 @@ static virDrvOpenStatus nodeDeviceOpen(virConnectPtr conn,
return VIR_DRV_OPEN_SUCCESS;
}
-static int nodeDeviceClose(virConnectPtr conn ATTRIBUTE_UNUSED)
+static int
+nodeDeviceClose(virConnectPtr conn ATTRIBUTE_UNUSED)
{
conn->nodeDevicePrivateData = NULL;
return 0;
@@ -788,7 +817,8 @@ static virStateDriver halStateDriver = {
.stateReload = nodeStateReload, /* 0.5.0 */
};
-int halNodeRegister(void)
+int
+halNodeRegister(void)
{
if (virRegisterNodeDeviceDriver(&halNodeDeviceDriver) < 0)
return -1;
--
1.8.1.4
11 years, 5 months