On Wed, Jul 06, 2011 at 05:24:01PM -0600, Eric Blake wrote: > * src/vmware/vmware_driver.c (vmwareOpen, vmwareDomainReboot) > (vmwareDomainCreateXML, vmwareDomainCreateWithFlags): Reject > unknown flags. > --- > src/vmware/vmware_driver.c | 17 ++++++++++++----- > 1 files changed, 12 insertions(+), 5 deletions(-) > > diff --git a/src/vmware/vmware_driver.c b/src/vmware/vmware_driver.c > index 3f0cfae..11dc504 100644 > --- a/src/vmware/vmware_driver.c > +++ b/src/vmware/vmware_driver.c > @@ -74,11 +74,13 @@ vmwareDataFreeFunc(void *data) > static virDrvOpenStatus > vmwareOpen(virConnectPtr conn, > virConnectAuthPtr auth ATTRIBUTE_UNUSED, > - unsigned int flags ATTRIBUTE_UNUSED) > + unsigned int flags) > { > struct vmware_driver *driver; > char * vmrun = NULL; > > + virCheckFlags(0, VIR_DRV_OPEN_ERROR); > + > if (conn->uri == NULL) { > /* @TODO accept */ > return VIR_DRV_OPEN_DECLINED; > @@ -446,11 +448,10 @@ vmwareDomainResume(virDomainPtr dom) > } > > static int > -vmwareDomainReboot(virDomainPtr dom, unsigned int flags ATTRIBUTE_UNUSED) > +vmwareDomainReboot(virDomainPtr dom, unsigned int flags) > { > struct vmware_driver *driver = dom->conn->privateData; > const char * vmxPath = NULL; > - > virDomainObjPtr vm; > const char *cmd[] = { > VMRUN, "-T", PROGRAM_SENTINAL, > @@ -458,6 +459,8 @@ vmwareDomainReboot(virDomainPtr dom, unsigned int flags ATTRIBUTE_UNUSED) > }; > int ret = -1; > > + virCheckFlags(0, -1); > + > vmwareDriverLock(driver); > vm = virDomainFindByUUID(&driver->domains, dom->uuid); > vmwareDriverUnlock(driver); > @@ -492,7 +495,7 @@ vmwareDomainReboot(virDomainPtr dom, unsigned int flags ATTRIBUTE_UNUSED) > > static virDomainPtr > vmwareDomainCreateXML(virConnectPtr conn, const char *xml, > - unsigned int flags ATTRIBUTE_UNUSED) > + unsigned int flags) > { > struct vmware_driver *driver = conn->privateData; > virDomainDefPtr vmdef = NULL; > @@ -503,6 +506,8 @@ vmwareDomainCreateXML(virConnectPtr conn, const char *xml, > vmwareDomainPtr pDomain = NULL; > virVMXContext ctx; > > + virCheckFlags(0, NULL); > + > ctx.formatFileName = vmwareCopyVMXFileName; > > vmwareDriverLock(driver); > @@ -562,12 +567,14 @@ cleanup: > > static int > vmwareDomainCreateWithFlags(virDomainPtr dom, > - unsigned int flags ATTRIBUTE_UNUSED) > + unsigned int flags) > { > struct vmware_driver *driver = dom->conn->privateData; > virDomainObjPtr vm; > int ret = -1; > > + virCheckFlags(0, -1); > + > vmwareDriverLock(driver); > vm = virDomainFindByUUID(&driver->domains, dom->uuid); > if (!vm) { ACK 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 :| -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list