diff options
author | ae <ae@FreeBSD.org> | 2016-07-02 11:54:20 +0000 |
---|---|---|
committer | ae <ae@FreeBSD.org> | 2016-07-02 11:54:20 +0000 |
commit | fbde243b6c805b964a4459b3ded2ff9ddd921d93 (patch) | |
tree | 6633e91e57b3cbcc710b32d8e1eece8b6516b239 /sbin/ipfw | |
parent | d08d8c2ff3af6ce2ba65f9805f1f061373e78a82 (diff) | |
download | FreeBSD-src-fbde243b6c805b964a4459b3ded2ff9ddd921d93.zip FreeBSD-src-fbde243b6c805b964a4459b3ded2ff9ddd921d93.tar.gz |
Hide warning about non-existent lookup tables and informational messages
about modified table entry when quied mode enabled.
Approved by: re (hrs)
Obtained from: Yandex LLC
Diffstat (limited to 'sbin/ipfw')
-rw-r--r-- | sbin/ipfw/tables.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sbin/ipfw/tables.c b/sbin/ipfw/tables.c index 2264e32..d14c9e9 100644 --- a/sbin/ipfw/tables.c +++ b/sbin/ipfw/tables.c @@ -914,9 +914,10 @@ table_modify_record(ipfw_obj_header *oh, int ac, char *av[], int add, xi.vmask = vmask; strlcpy(xi.tablename, oh->ntlv.name, sizeof(xi.tablename)); - fprintf(stderr, "DEPRECATED: inserting data into " - "non-existent table %s. (auto-created)\n", - xi.tablename); + if (quiet == 0) + warnx("DEPRECATED: inserting data into " + "non-existent table %s. (auto-created)", + xi.tablename); table_do_create(oh, &xi); } @@ -937,8 +938,6 @@ table_modify_record(ipfw_obj_header *oh, int ac, char *av[], int add, error = table_do_modify_record(cmd, oh, tent_buf, count, atomic); - quiet = 0; - /* * Compatibility stuff: do not yell on duplicate keys or * failed deletions. |