From e92147350c8a17b77173e19d5a8a4c5eacf1e592 Mon Sep 17 00:00:00 2001 From: "/C=EU/ST=EU/CN=Patrick McHardy/emailAddress=kaber@trash.net" Date: Wed, 17 Oct 2007 16:36:49 +0000 Subject: [PATCH iptables] print warnings to stderr iptables prints some of its error messages and warnings to stdout. This patch applies to svn r7075 and will make iptables print diagnostic messages to stderr instead. Signed-off-by: Max Kellermann --- iptables.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'iptables.c') diff --git a/iptables.c b/iptables.c index 25ca358..7096121 100644 --- a/iptables.c +++ b/iptables.c @@ -1818,7 +1818,7 @@ int do_command(int argc, char *argv[], char **table, iptc_handle_t *handle) optarg[0] = '\0'; continue; } - printf("Bad argument `%s'\n", optarg); + fprintf(stderr, "Bad argument `%s'\n", optarg); exit_tryhelp(2); default: @@ -1990,8 +1990,9 @@ int do_command(int argc, char *argv[], char **table, iptc_handle_t *handle) } if (target && iptc_is_chain(jumpto, *handle)) { - printf("Warning: using chain %s, not extension\n", - jumpto); + fprintf(stderr, + "Warning: using chain %s, not extension\n", + jumpto); if (target->t) free(target->t); -- cgit v1.2.3