]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virNWFilterRuleDefDetailsFormat: Refactor formatter
authorPeter Krempa <pkrempa@redhat.com>
Thu, 16 Feb 2023 13:09:31 +0000 (14:09 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 5 Jun 2023 11:23:06 +0000 (13:23 +0200)
commit9cb4e78ffd4806ff1ee1cf8bbf74046f27d90d24
tree74ab66214e48c966224db7f8f767a882372eaf7f
parent59a1455012a7c8a2f69ddd6a909083804400135f
virNWFilterRuleDefDetailsFormat: Refactor formatter

Format the rule attributes in two passes, first for positive 'match' and
second pass for negative. This removes the crazy logic for switching
between match modes inside the formatter.

The refactor makes it also more clear in which cases we actually do
format something.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/conf/nwfilter_conf.c
tests/nwfilterxml2xmlout/quirks-invalid.xml