On Tue, Apr 29, 2025 at 13:40:31 +0100, Daniel P. Berrangé wrote:
> On Tue, Apr 29, 2025 at 02:38:45PM +0200, Peter Krempa wrote:
> > On Tue, Apr 29, 2025 at 12:14:16 +0100, Daniel P. Berrangé via Devel wrote:
> > > From: Daniel P. Berrangé <berra...@redhat.com>
> > > 
> > > Allow virCommand to find 'tc' in $PATH. This command is only used
> > > when running privileged in which case both 'bin' and 'sbin' dirs will
> > > be in $PATH, so virFindFileInPath will do the right thing to find it.
> > > 
> > > Signed-off-by: Daniel P. Berrangé <berra...@redhat.com>
> > > ---
> > >  meson.build                    | 10 ++----
> > >  src/util/virfirewall.h         |  1 +
> > >  src/util/virnetdevbandwidth.c  | 36 ++++++++++-----------
> > >  tests/virnetdevbandwidthtest.c | 58 +++++++++++++++++-----------------
> > >  4 files changed, 50 insertions(+), 55 deletions(-)
> > > 
> 
> > > diff --git a/src/util/virfirewall.h b/src/util/virfirewall.h
> > > index d42e60884b..07391bea67 100644
> > > --- a/src/util/virfirewall.h
> > > +++ b/src/util/virfirewall.h
> > > @@ -30,6 +30,7 @@
> > >  #define IPTABLES "iptables"
> > >  #define IP6TABLES "ip6tables"
> > >  #define NFT "nft"
> > > +#define TC "tc"
> > 
> > There are just two places referencing the TC macro after this. Do we
> > still need it?
> > 
> > src/util/virfirewall.c=VIR_ENUM_IMPL(virFirewallLayerCommand,
> > src/util/virfirewall.c:              TC,
> > src/util/virfirewall.c=virFirewallCmdNftablesApply(virFirewall *firewall 
> > G_GNUC_UNUSED,
> > src/util/virfirewall.c:        cmd = virCommandNew(TC);
> 
> I was borderline on this - in the end since we have NFT/IPTABLES/IP6TABLES
> constants I went for consistency within virfirewall.c

Fair enough keep it as is.

Reply via email to