*: use fopen_or_warn in few more places
authorDenis Vlasenko <vda.linux@googlemail.com>
Thu, 20 Mar 2008 21:19:35 +0000 (21:19 -0000)
committerDenis Vlasenko <vda.linux@googlemail.com>
Thu, 20 Mar 2008 21:19:35 +0000 (21:19 -0000)
e2fsprogs/old_e2fsprogs/fsck.c
networking/interface.c
networking/libiproute/iproute.c
shell/hush.c

index d4914a571a5855a1c1cb42e8aed6343872fc8e9d..a51c33a1cad9b6648287051fd2e83a3dde34c8b2 100644 (file)
@@ -477,8 +477,7 @@ static void load_fs_info(const char *filename)
        int     old_fstab = 1;
        struct fs_info *fs;
 
-       if ((f = fopen(filename, "r")) == NULL) {
-               bb_perror_msg("WARNING: cannot open %s", filename);
+       if ((f = fopen_or_warn(filename, "r")) == NULL) {
                return;
        }
        while (!feof(f)) {
index 367d2b0bc4a02c19ef4296498056e62ccc28ae7a..44bd8d3d9fda3016df1bf30af41a34b3803d0660 100644 (file)
@@ -560,9 +560,8 @@ static int if_readlist_proc(char *target)
        if (!target)
                proc_read = 1;
 
-       fh = fopen(_PATH_PROCNET_DEV, "r");
+       fh = fopen_or_warn(_PATH_PROCNET_DEV, "r");
        if (!fh) {
-               bb_perror_msg("warning: cannot open %s, limiting output", _PATH_PROCNET_DEV);
                return if_readconf();
        }
        fgets(buf, sizeof buf, fh);     /* eat line */
index 5ded99b2e8b6a34c25c051d8dcb01f734cf3658a..670f188eecdaf7ee42afb2638c3139732b8bad6e 100644 (file)
@@ -91,7 +91,6 @@ static int print_route(struct sockaddr_nl *who ATTRIBUTE_UNUSED,
        int host_len = -1;
        SPRINT_BUF(b1);
 
-
        if (n->nlmsg_type != RTM_NEWROUTE && n->nlmsg_type != RTM_DELROUTE) {
                fprintf(stderr, "Not a route: %08x %08x %08x\n",
                        n->nlmsg_len, n->nlmsg_type, n->nlmsg_flags);
index 2d5697269da70fce4ba3c3b6b79dc4d2fa2e585a..4e6d5009428b77f70e84bbcf7f6cc49bc39d25e9 100644 (file)
@@ -891,7 +891,8 @@ static int builtin_cd(char **argv)
 static int builtin_exec(char **argv)
 {
        if (argv[1] == NULL)
-               return EXIT_SUCCESS;   /* Really? */
+               return EXIT_SUCCESS; /* bash does this */
+// FIXME: if exec fails, bash does NOT exit! We do...
        pseudo_exec_argv(argv + 1);
        /* never returns */
 }