On 11/03/2011 01:29 PM, Daniel P. Berrange wrote:
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 | 10 +- src/network/bridge_driver.c | 41 ++--- src/qemu/qemu_command.c | 8 +- src/qemu/qemu_conf.h | 1 - src/qemu/qemu_driver.c | 3 - src/uml/uml_conf.c | 13 +-- src/uml/uml_conf.h | 1 - src/uml/uml_driver.c | 9 +- src/util/bridge.c | 454 +++++++++++++++++++++---------------------- src/util/bridge.h | 104 +++++----- 10 files changed, 295 insertions(+), 349 deletions(-)
ACK. Visually checks out, and make && make check && make syntax-check pass. -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list