From 99f2c1863d2f18ee0e733de83cbd1c8d64ed9478 Mon Sep 17 00:00:00 2001 From: "/C=EU/ST=EU/CN=Patrick McHardy/emailAddress=kaber@trash.net" Date: Thu, 18 Oct 2007 14:27:03 +0000 Subject: [PATCH]: Don't silenty exit on failure to open /proc/net/{ip,ip6}_tables_names Victor Stinner --- ip6tables-save.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'ip6tables-save.c') diff --git a/ip6tables-save.c b/ip6tables-save.c index 479a92b..d751fb3 100644 --- a/ip6tables-save.c +++ b/ip6tables-save.c @@ -231,7 +231,9 @@ static int for_each_table(int (*func)(const char *tablename)) procfile = fopen("/proc/net/ip6_tables_names", "r"); if (!procfile) - return 0; + exit_error(OTHER_PROBLEM, + "Unable to open /proc/net/ip6_tables_names: %s\n", + strerror(errno)); while (fgets(tablename, sizeof(tablename), procfile)) { if (tablename[strlen(tablename) - 1] != '\n') -- cgit v1.2.3