On Wed, Jun 16, 2010 at 11:33:48AM -0400, Stefan Berger wrote:
Following Daniel Berrange's multiple helpful suggestions for
improving
this patch and introducing another driver interface, I now wrote the
below patch where the nwfilter driver registers the functions to
instantiate and teardown the nwfilters with a function in
conf/domain_nwfilter.c called virDomainConfNWFilterRegister. Previous
helper functions that were called from qemu_driver.c and qemu_conf.c
were move into conf/domain_nwfilter.h with slight renaming done for
consistency. Those functions now call the function expored by
domain_nwfilter.c, which in turn call the functions of the new driver
interface, if available.
V3: no more inline functions
Signed-off-by: Stefan Berger <stefanb(a)us.ibm.com>
---
src/Makefile.am | 3 +
src/conf/domain_nwfilter.c | 61
+++++++++++++++++++++++++++++++++
src/conf/domain_nwfilter.h | 43 +++++++++++++++++++++++
src/libvirt_private.syms | 5 ++
src/nwfilter/nwfilter_driver.c | 23 ++++++++++++
src/nwfilter/nwfilter_gentech_driver.h | 17 ---------
src/qemu/qemu_conf.c | 17 ++++-----
src/qemu/qemu_driver.c | 10 ++---
8 files changed, 148 insertions(+), 31 deletions(-)
ACK, this looks good now
Daniel
--
|: Red Hat, Engineering, London -o-
http://people.redhat.com/berrange/ :|
|:
http://libvirt.org -o-
http://virt-manager.org -o-
http://deltacloud.org :|
|:
http://autobuild.org -o-
http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|