]> git.ipfire.org Git - thirdparty/libvirt.git/commit
util: don't use virFirewallRuleToString() to log the rule being applied
authorLaine Stump <laine@redhat.com>
Sun, 13 Mar 2022 18:21:02 +0000 (14:21 -0400)
committerLaine Stump <laine@redhat.com>
Wed, 24 Aug 2022 16:22:47 +0000 (12:22 -0400)
commit4c0310677a48fe3a64d560737b07469725e40ae4
tree86f8b3fd1eb3eacf4d6256d044c394d7f7a900c5
parent4dce6eee5c50ec8e2444d0975747e3006c484a81
util: don't use virFirewallRuleToString() to log the rule being applied

Instead of separately building the commandline into a string to log,
just wait a few lines until we've built the virCommand object, and
call virCommandToString, which does the same thing.

(As a bonus, we were already calling virCommandToString to put the
commandline in a string in case of a failure when running it - from
the point of view of *that* usage, we're just moving the call to
virCommandToString *up* a few lines, i.e. we now only construct the
commandline string once.)

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/util/virfirewall.c