svn commit: trunk/busybox: e2fsprogs/old_e2fsprogs networking netwo etc...

vda at busybox.net vda at busybox.net
Thu Mar 20 21:19:36 UTC 2008


Author: vda
Date: 2008-03-20 14:19:35 -0700 (Thu, 20 Mar 2008)
New Revision: 21418

Log:
*: use fopen_or_warn in few more places



Modified:
   trunk/busybox/e2fsprogs/old_e2fsprogs/fsck.c
   trunk/busybox/networking/interface.c
   trunk/busybox/networking/libiproute/iproute.c
   trunk/busybox/shell/hush.c


Changeset:
Modified: trunk/busybox/e2fsprogs/old_e2fsprogs/fsck.c
===================================================================
--- trunk/busybox/e2fsprogs/old_e2fsprogs/fsck.c	2008-03-20 16:55:57 UTC (rev 21417)
+++ trunk/busybox/e2fsprogs/old_e2fsprogs/fsck.c	2008-03-20 21:19:35 UTC (rev 21418)
@@ -477,8 +477,7 @@
 	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)) {

Modified: trunk/busybox/networking/interface.c
===================================================================
--- trunk/busybox/networking/interface.c	2008-03-20 16:55:57 UTC (rev 21417)
+++ trunk/busybox/networking/interface.c	2008-03-20 21:19:35 UTC (rev 21418)
@@ -560,9 +560,8 @@
 	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 */

Modified: trunk/busybox/networking/libiproute/iproute.c
===================================================================
--- trunk/busybox/networking/libiproute/iproute.c	2008-03-20 16:55:57 UTC (rev 21417)
+++ trunk/busybox/networking/libiproute/iproute.c	2008-03-20 21:19:35 UTC (rev 21418)
@@ -91,7 +91,6 @@
 	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);

Modified: trunk/busybox/shell/hush.c
===================================================================
--- trunk/busybox/shell/hush.c	2008-03-20 16:55:57 UTC (rev 21417)
+++ trunk/busybox/shell/hush.c	2008-03-20 21:19:35 UTC (rev 21418)
@@ -891,7 +891,8 @@
 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 */
 }




More information about the busybox-cvs mailing list