]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Remove 'brControl' object
authorDaniel P. Berrange <berrange@redhat.com>
Wed, 2 Nov 2011 10:56:38 +0000 (10:56 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Wed, 9 Nov 2011 16:33:14 +0000 (16:33 +0000)
commit6cfeb9a766430135dc57bbf965fd12d49b1bacbc
tree8fea01dd4c74089928d09ae9ab032a1a30579b6b
parent85cf8d38994db85b71e28958e04f03c90c0cd942
Remove 'brControl' object

The bridge management APIs in src/util/bridge.c require a brControl
object to be passed around. This holds the file descriptor for the
control socket. This extra object complicates use of the API for
only a minor efficiency gain, which is in turn entirely offset by
the need to fork/exec the brctl command for STP configuration.

This patch removes the 'brControl' object entirely, instead opening
the control socket & closing it again within the scope of each method.

The parameter names for the APIs are also made to consistently use
'brname' for bridge device name, and 'ifname' for an interface
device name. Finally annotations are added for non-NULL parameters
and return check validation

* src/util/bridge.c, src/util/bridge.h: Remove brControl object
  and update API parameter names & annotations.
* src/lxc/lxc_driver.c, src/network/bridge_driver.c,
  src/uml/uml_conf.h, src/uml/uml_conf.c, src/uml/uml_driver.c,
  src/qemu/qemu_command.c, src/qemu/qemu_conf.h,
  src/qemu/qemu_driver.c: Remove reference to 'brControl' object
src/lxc/lxc_driver.c
src/network/bridge_driver.c
src/qemu/qemu_command.c
src/qemu/qemu_conf.h
src/qemu/qemu_driver.c
src/uml/uml_conf.c
src/uml/uml_conf.h
src/uml/uml_driver.c
src/util/bridge.c
src/util/bridge.h