diff options
| author | David Gibson <david@gibson.dropbear.id.au> | 2026-05-03 23:55:48 +0200 |
|---|---|---|
| committer | Stefano Brivio <sbrivio@redhat.com> | 2026-05-07 08:06:30 +0200 |
| commit | 393c87e18498f77023ffc3b902810207c7b6c835 (patch) | |
| tree | 8df03a143e002e9f50c9c360d2bf2057ff73af99 /test/lib/git: | |
| parent | 279b679c273727db7d4d719a49f8b6e8610b7836 (diff) | |
| download | passt-393c87e18498f77023ffc3b902810207c7b6c835.tar passt-393c87e18498f77023ffc3b902810207c7b6c835.tar.gz passt-393c87e18498f77023ffc3b902810207c7b6c835.tar.bz2 passt-393c87e18498f77023ffc3b902810207c7b6c835.tar.lz passt-393c87e18498f77023ffc3b902810207c7b6c835.tar.xz passt-393c87e18498f77023ffc3b902810207c7b6c835.tar.zst passt-393c87e18498f77023ffc3b902810207c7b6c835.zip | |
fwd: Generalise fwd_rules_info()
fwd_rules_info() is used to print a full table of forwarding rules for
debugging or the like. Currently it has one caller, and uses info() to
dump the messages. However for the upcoming configuration client, we're
going to want to dump the rules in some similar, but not quite identical
ways. For example, at different severity levels, or to stdout instead of
stderr / system log / logfile.
So, generalise fwd_rules_info() to fwd_rules_dump() which takes a printing
function as a parameter. Because we want this to work with "functions"
like info, which is actually a macro, we have to convert fwd_rules_dump()
to a macro as well. We also allow the prefix and suffix for each rule /
line to be provided as a parameter.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'test/lib/git:')
0 files changed, 0 insertions, 0 deletions
