Re: [PATCH v2 09/27] util: determine ignoreErrors value when creating virFirewallCmd, not when applying

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

 



On Sun, Apr 21, 2024 at 10:53:17PM -0400, Laine Stump wrote:
> We know at the time a virFirewallCmd is created (with
> virFirewallAddCmd*()) whether or not we will later want to ignore
> errors encountered when attempting to apply that command - if
> ignoreErrors is set in the AddCmd or if the group has already had
> VIR_FIREWALL_TRANSACTION_IGNORE_ERRORS set, then we ignore the errors.
> 
> Rather than setting the fwCmd->ignoreErrors only according to the arg
> sent to virFirewallAddCmdFull(), and then later (at ApplyCmd-time)
> combining that with the group transactionFlags setting (and passing it
> all the way down the call chain), just combine the two flags right
> away and store this final value in fwCmd->ignoreErrors when the
> virFirewallCmd is created (thus avoiding the need to look at anything
> other than fwCmd->ignoreErrors at the time the command is applied). Once
> that is done, we can simply grab ignoreErrors from the object down in
> virFirewallApply() rather than cluttering up the argument list on the
> entire call chain.
> 
> Signed-off-by: Laine Stump <laine@xxxxxxxxxx>
> ---
>  src/util/virfirewall.c | 28 +++++++++++++---------------
>  1 file changed, 13 insertions(+), 15 deletions(-)

Reviewed-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>


With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
_______________________________________________
Devel mailing list -- devel@xxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxx




[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