
On Thu, May 02, 2013 at 01:03:43PM +0100, Daniel P. Berrange wrote:
From: "Daniel P. Berrange" <berrange@redhat.com>
The individual hypervisor drivers were directly referencing APIs in src/nodeinfo.c in their virDriverPtr struct. Separate these methods, so there is always a wrapper in the hypervisor driver. This allows the unused virConnectPtr args to be removed from the nodeinfo.c file. Again this will ensure that ACL checks will only be performed on invocations that are directly associated with public API usage.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com> --- src/check-driverimpls.pl | 3 -- src/lxc/lxc_driver.c | 92 +++++++++++++++++++++++++++++++++++---- src/nodeinfo.c | 42 ++++++++---------- src/nodeinfo.h | 22 ++++------ src/openvz/openvz_conf.c | 2 +- src/openvz/openvz_driver.c | 70 +++++++++++++++++++++++++++--- src/parallels/parallels_driver.c | 12 +++++- src/qemu/qemu_capabilities.c | 2 +- src/qemu/qemu_driver.c | 93 ++++++++++++++++++++++++++++++++++++---- src/uml/uml_driver.c | 92 +++++++++++++++++++++++++++++++++++---- src/vbox/vbox_tmpl.c | 30 +++++++++++-- src/xen/xen_driver.c | 24 ++++++++++- 12 files changed, 403 insertions(+), 81 deletions(-)
diff --git a/src/check-driverimpls.pl b/src/check-driverimpls.pl index 52b14e4..e385de0 100755 --- a/src/check-driverimpls.pl +++ b/src/check-driverimpls.pl @@ -42,9 +42,6 @@ while (<>) { my $prefix = $impl; $prefix =~ s/^([a-z]+(?:Unified)?)(.*?)$/$1/;
- # External impls - next if $prefix eq "node"; - if (defined $mainprefix) { if ($mainprefix ne $prefix) { print "$ARGV:$. Bad prefix '$prefix' for API '$api', expecting '$mainprefix'\n";
Opps, this hunk belongs a few patches later. Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|