Re: [PATCH 2/6] nwfilter: add nwfilterDefineXMLFlags()

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

 



On 8/20/21 1:57 PM, Kristina Hanicova wrote:
> I have added a new driver function which allows to define
> nwfilter with given flags. I have also replaced definition of
> nwfilterDefineXML() with function call to the new function.
> 
> Signed-off-by: Kristina Hanicova <khanicov@xxxxxxxxxx>
> ---
>  src/nwfilter/nwfilter_driver.c | 19 ++++++++++++++++---
>  1 file changed, 16 insertions(+), 3 deletions(-)
> 
> diff --git a/src/nwfilter/nwfilter_driver.c b/src/nwfilter/nwfilter_driver.c
> index edb284aa4b..4b355ffff1 100644
> --- a/src/nwfilter/nwfilter_driver.c
> +++ b/src/nwfilter/nwfilter_driver.c
> @@ -525,9 +525,11 @@ nwfilterConnectListAllNWFilters(virConnectPtr conn,
>      return ret;
>  }
>  
> +
>  static virNWFilterPtr
> -nwfilterDefineXML(virConnectPtr conn,
> -                  const char *xml)
> +nwfilterDefineXMLFlags(virConnectPtr conn,
> +                       const char *xml,
> +                       unsigned int flags)
>  {
>      virNWFilterDef *def;
>      virNWFilterObj *obj = NULL;
> @@ -540,13 +542,15 @@ nwfilterDefineXML(virConnectPtr conn,
>          return NULL;
>      }
>  
> +    virCheckFlags(0, NULL);
> +

I think this check should go before !driver->privileged check. That way
it's consistent with the rest of the code.

Michal




[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]

  Powered by Linux