The branch main has been updated by kp:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=004062345bbfaa191252ac2df15ca151dcfdfc4f

commit 004062345bbfaa191252ac2df15ca151dcfdfc4f
Author:     Kristof Provost <k...@freebsd.org>
AuthorDate: 2025-07-07 07:07:31 +0000
Commit:     Kristof Provost <k...@freebsd.org>
CommitDate: 2025-07-12 09:57:50 +0000

    pfctl: Do the actual pfr_strerror() to pf_strerror() rename
    
    Missed in previous
    
    Obtained from:  OpenBSD, kn <k...@openbsd.org>, c802a0d9d6
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
---
 sbin/pfctl/parse.y          |  2 +-
 sbin/pfctl/pfctl.c          | 12 ++++++------
 sbin/pfctl/pfctl.h          |  2 +-
 sbin/pfctl/pfctl_optimize.c |  4 ++--
 sbin/pfctl/pfctl_table.c    |  6 +++---
 5 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y
index 28f461bf715d..2188324c15cb 100644
--- a/sbin/pfctl/parse.y
+++ b/sbin/pfctl/parse.y
@@ -5458,7 +5458,7 @@ process_tabledef(char *name, struct table_opts *opts, int 
popts)
                            name);
                else
                        yyerror("cannot define table %s: %s", name,
-                           pfr_strerror(errno));
+                           pf_strerror(errno));
 
                goto _error;
        }
diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c
index b4453c850de4..10f3ee1f44e9 100644
--- a/sbin/pfctl/pfctl.c
+++ b/sbin/pfctl/pfctl.c
@@ -1350,7 +1350,7 @@ pfctl_show_rules(int dev, char *path, int opts, enum 
pfctl_show format,
 
                for (nr = 0; nr < mnr; ++nr) {
                        if ((ret = pfctl_get_ruleset(pfh, npath, nr, &prs)) != 
0)
-                               errx(1, "%s", pfr_strerror(ret));
+                               errx(1, "%s", pf_strerror(ret));
                        INDENT(depth, !(opts & PF_OPT_VERBOSE));
                        printf("anchor \"%s\" all {\n", prs.name);
                        pfctl_show_rules(dev, npath, opts,
@@ -1365,14 +1365,14 @@ pfctl_show_rules(int dev, char *path, int opts, enum 
pfctl_show format,
        if (opts & PF_OPT_SHOWALL) {
                ret = pfctl_get_rules_info_h(pfh, &ri, PF_PASS, path);
                if (ret != 0) {
-                       warnx("%s", pfr_strerror(ret));
+                       warnx("%s", pf_strerror(ret));
                        goto error;
                }
                header++;
        }
        ret = pfctl_get_rules_info_h(pfh, &ri, PF_SCRUB, path);
        if (ret != 0) {
-               warnx("%s", pfr_strerror(ret));
+               warnx("%s", pf_strerror(ret));
                goto error;
        }
        if (opts & PF_OPT_SHOWALL) {
@@ -1565,12 +1565,12 @@ pfctl_show_nat(int dev, const char *path, int opts, 
char *anchorname, int depth,
                                fprintf(stderr, "NAT anchor '%s' "
                                    "not found.\n", anchorname);
                        else
-                               errx(1, "%s", pfr_strerror(ret));
+                               errx(1, "%s", pf_strerror(ret));
                }
 
                for (nr = 0; nr < mnr; ++nr) {
                        if ((ret = pfctl_get_ruleset(pfh, npath, nr, &prs)) != 
0)
-                               errx(1, "%s", pfr_strerror(ret));
+                               errx(1, "%s", pf_strerror(ret));
                        INDENT(depth, !(opts & PF_OPT_VERBOSE));
                        printf("nat-anchor \"%s\" all {\n", prs.name);
                        pfctl_show_nat(dev, npath, opts,
@@ -3645,7 +3645,7 @@ main(int argc, char *argv[])
 }
 
 char *
-pfr_strerror(int errnum)
+pf_strerror(int errnum)
 {
        switch (errnum) {
        case ESRCH:
diff --git a/sbin/pfctl/pfctl.h b/sbin/pfctl/pfctl.h
index 5b5b3d3e5fff..afecc78086e0 100644
--- a/sbin/pfctl/pfctl.h
+++ b/sbin/pfctl/pfctl.h
@@ -83,7 +83,7 @@ void  *pfr_buf_next(struct pfr_buffer *, const void *);
 int     pfr_buf_grow(struct pfr_buffer *, int);
 int     pfr_buf_load(struct pfr_buffer *, char *, int,
            int (*)(struct pfr_buffer *, char *, int, int), int);
-char   *pfr_strerror(int);
+char   *pf_strerror(int);
 int     pfi_get_ifaces(const char *, struct pfi_kif *, int *);
 int     pfi_clr_istats(const char *, int *, int);
 
diff --git a/sbin/pfctl/pfctl_optimize.c b/sbin/pfctl/pfctl_optimize.c
index 24b774bc66be..d65503a3efb3 100644
--- a/sbin/pfctl/pfctl_optimize.c
+++ b/sbin/pfctl/pfctl_optimize.c
@@ -909,7 +909,7 @@ load_feedback_profile(struct pfctl *pf, struct superblocks 
*superblocks)
        TAILQ_INIT(&prof_superblocks);
 
        if ((ret = pfctl_get_rules_info_h(pf->h, &rules, PF_PASS, "")) != 0) {
-               warnx("%s", pfr_strerror(ret));
+               warnx("%s", pf_strerror(ret));
                return (1);
        }
        mnr = rules.nr;
@@ -924,7 +924,7 @@ load_feedback_profile(struct pfctl *pf, struct superblocks 
*superblocks)
 
                if (pfctl_get_rule_h(pf->h, nr, rules.ticket, "", PF_PASS,
                    &rule, anchor_call)) {
-                       warnx("%s", pfr_strerror(ret));
+                       warnx("%s", pf_strerror(ret));
                        free(por);
                        return (1);
                }
diff --git a/sbin/pfctl/pfctl_table.c b/sbin/pfctl/pfctl_table.c
index 8033d3515572..f583f5ef8e79 100644
--- a/sbin/pfctl/pfctl_table.c
+++ b/sbin/pfctl/pfctl_table.c
@@ -79,7 +79,7 @@ static const char     *istats_text[2][2][2] = {
                    (opts & PF_OPT_DUMMYACTION)) &&                     \
                    (fct)) {                                            \
                        if ((opts & PF_OPT_RECURSE) == 0)               \
-                               warnx("%s", pfr_strerror(errno));       \
+                               warnx("%s", pf_strerror(errno));        \
                        goto _error;                                    \
                }                                                       \
        } while (0)
@@ -92,7 +92,7 @@ static const char     *istats_text[2][2][2] = {
                    (opts & PF_OPT_DUMMYACTION)) &&                     \
                    (pfr_add_table(&table, &nadd, flags)) &&            \
                    (errno != EPERM)) {                                 \
-                       warnx("%s", pfr_strerror(errno));               \
+                       warnx("%s", pf_strerror(errno));                \
                        goto _error;                                    \
                }                                                       \
                if (nadd) {                                             \
@@ -640,7 +640,7 @@ pfctl_show_ifaces(const char *filter, int opts)
                pfr_buf_grow(&b, b.pfrb_size);
                b.pfrb_size = b.pfrb_msize;
                if (pfi_get_ifaces(filter, b.pfrb_caddr, &b.pfrb_size))
-                       errx(1, "%s", pfr_strerror(errno));
+                       errx(1, "%s", pf_strerror(errno));
                if (b.pfrb_size <= b.pfrb_msize)
                        break;
        }

Reply via email to