[netfilter-cvslog] r7521 - trunk/iptables
kaber at trash.net
kaber at trash.net
Mon May 12 20:51:46 CEST 2008
Author: kaber at trash.net
Date: 2008-05-12 20:51:45 +0200 (Mon, 12 May 2008)
New Revision: 7521
Modified:
trunk/iptables/ip6tables-restore.c
trunk/iptables/iptables-restore.c
Log:
[patch 1/4] Make iptables-restore usable over a pipe
The attached patch flushes stdout between commands to make output
operations (-L etc) in iptables-restore usable over a pipe. stdio by
defaut buffers output if not connected to a terminal.
Henrik Nordstrom <henrik at henriknordstrom.net>
Modified: trunk/iptables/ip6tables-restore.c
===================================================================
--- trunk/iptables/ip6tables-restore.c 2008-05-12 16:11:23 UTC (rev 7520)
+++ trunk/iptables/ip6tables-restore.c 2008-05-12 18:51:45 UTC (rev 7521)
@@ -436,6 +436,7 @@
&newargv[2], &handle);
free_argv();
+ fflush(stdout);
}
if (!ret) {
fprintf(stderr, "%s: line %u failed\n",
Modified: trunk/iptables/iptables-restore.c
===================================================================
--- trunk/iptables/iptables-restore.c 2008-05-12 16:11:23 UTC (rev 7520)
+++ trunk/iptables/iptables-restore.c 2008-05-12 18:51:45 UTC (rev 7521)
@@ -442,6 +442,7 @@
&newargv[2], &handle);
free_argv();
+ fflush(stdout);
}
if (tablename && (strcmp(tablename, curtable) != 0))
continue;
More information about the netfilter-cvslog
mailing list