summaryrefslogtreecommitdiff
path: root/networking
diff options
context:
space:
mode:
authorDenis Vlasenko2006-09-03 12:31:59 +0000
committerDenis Vlasenko2006-09-03 12:31:59 +0000
commit65113e8d97c62b6aed560ac73961c8a9020c1568 (patch)
tree26e63486b8cbf79dd02a939fe5475a03baa95853 /networking
parentaf906a3b6ca6e2ae098ed2b3beb34db351d2eae8 (diff)
downloadbusybox-65113e8d97c62b6aed560ac73961c8a9020c1568.zip
busybox-65113e8d97c62b6aed560ac73961c8a9020c1568.tar.gz
zcip: bb_error_msg had stray newlines; small optimization in opt parsing
Diffstat (limited to 'networking')
-rw-r--r--networking/zcip.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/networking/zcip.c b/networking/zcip.c
index a7f19d5..3a08382 100644
--- a/networking/zcip.c
+++ b/networking/zcip.c
@@ -171,7 +171,7 @@ static int run(char *script, char *arg, char *intf, struct in_addr *ip)
}
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 @@ int zcip_main(int argc, char *argv[])
// 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 @@ int zcip_main(int argc, char *argv[])
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 @@ int zcip_main(int argc, char *argv[])
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);