svn commit: trunk/busybox/networking

vda at busybox.net vda at busybox.net
Sun Sep 3 12:32:00 UTC 2006


Author: vda
Date: 2006-09-03 05:31:59 -0700 (Sun, 03 Sep 2006)
New Revision: 16040

Log:
zcip: bb_error_msg had stray newlines; small optimization in opt parsing



Modified:
   trunk/busybox/networking/zcip.c


Changeset:
Modified: trunk/busybox/networking/zcip.c
===================================================================
--- trunk/busybox/networking/zcip.c	2006-09-03 12:29:53 UTC (rev 16039)
+++ trunk/busybox/networking/zcip.c	2006-09-03 12:31:59 UTC (rev 16040)
@@ -171,7 +171,7 @@
 		}
 		if (WEXITSTATUS(status) != 0) {
 			if (FOREGROUND)
-				bb_error_msg("script %s failed, exit=%d\n",
+				bb_error_msg("script %s failed, exit=%d",
 					script, WEXITSTATUS(status));
 			else
 				syslog(LOG_ERR, "script %s failed, exit=%d",
@@ -233,7 +233,7 @@
 
 	// parse commandline: prog [options] ifname script
 	char *r_opt;
-	bb_opt_complementally = "vv"; // -v options accumulate
+	bb_opt_complementally = "vv:vf"; // -v accumulates and implies -f
 	opts = bb_getopt_ulflags(argc, argv, "fqr:v", &r_opt, &verbose);
 	if (opts & 4) { // -r n.n.n.n
 		if (inet_aton(r_opt, &ip) == 0
@@ -241,7 +241,6 @@
 			bb_error_msg_and_die("invalid link address");
 		}
 	}
-	if (verbose) opts |= 1; // -v implies -f
 	argc -= optind;
 	argv += optind;
 	if (argc != 2)
@@ -442,7 +441,7 @@
 				if (fds[0].revents & POLLERR) {
 					// FIXME: links routinely go down;
 					// this shouldn't necessarily exit.
-					bb_error_msg("%s: poll error\n", intf);
+					bb_error_msg("%s: poll error", intf);
 					if (ready) {
 						run(script, "deconfig",
 								intf, &ip);




More information about the busybox-cvs mailing list