Re: [PATCH 12/20] openvz: reject unknown flags

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jul 06, 2011 at 05:23:55PM -0600, Eric Blake wrote:
> * src/openvz/openvz_driver.c (openvzDomainReboot, openvzOpen):
> Reject unknown flags.
> ---
>  src/openvz/openvz_driver.c |    9 +++++++--
>  1 files changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c
> index 2c6c870..2b4bf9e 100644
> --- a/src/openvz/openvz_driver.c
> +++ b/src/openvz/openvz_driver.c
> @@ -613,12 +613,15 @@ cleanup:
>  }
> 
>  static int openvzDomainReboot(virDomainPtr dom,
> -                              unsigned int flags ATTRIBUTE_UNUSED) {
> +                              unsigned int flags)
> +{
>      struct openvz_driver *driver = dom->conn->privateData;
>      virDomainObjPtr vm;
>      const char *prog[] = {VZCTL, "--quiet", "restart", PROGRAM_SENTINAL, NULL};
>      int ret = -1;
> 
> +    virCheckFlags(0, -1);
> +
>      openvzDriverLock(driver);
>      vm = virDomainFindByUUID(&driver->domains, dom->uuid);
>      openvzDriverUnlock(driver);
> @@ -1281,10 +1284,12 @@ openvzDomainSetVcpus(virDomainPtr dom, unsigned int nvcpus)
> 
>  static virDrvOpenStatus openvzOpen(virConnectPtr conn,
>                                     virConnectAuthPtr auth ATTRIBUTE_UNUSED,
> -                                   unsigned int flags ATTRIBUTE_UNUSED)
> +                                   unsigned int flags)
>  {
>      struct openvz_driver *driver;
> 
> +    virCheckFlags(0, VIR_DRV_OPEN_ERROR);
> +
>      if (conn->uri == NULL) {
>          if (!virFileExists("/proc/vz"))
>              return VIR_DRV_OPEN_DECLINED;

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


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]