On Wed, Jan 15, 2020 at 11:12:46PM +0100, Alexandr Nedvedicky wrote:
> rename pfr_strerror() to pf_strerror() and move it from pfctl_radix.c
> to pfctl.c as it becomes more generic now.
Yes, makes sense; "pfr" is not the appropiate namespace here.
Hello,
> There are other occasions as well but those probably need additional
> tweaks, so here's the first round.
>
> Feedback? OK?
I like the idea. Just have one 'bike shedding' suggestion:
rename pfr_strerror() to pf_strerror() and move it from pfctl_radix.c
to pfctl.c
According to pf(4) all of DIOCGETRULE, DIOCGETRULES and DIOCGETRULESET
return EINVAL if the specified anchor does not exist; I double checked
pf_ioctl.c to verify.
This diff makes pfctl consistently use pfr_strerror() which now handles
EINVAL such that
# pfctl -a nope -sr
pfctl: