summaryrefslogtreecommitdiff
path: root/networking
diff options
context:
space:
mode:
authorGlenn L McGrath2002-09-15 17:20:45 +0000
committerGlenn L McGrath2002-09-15 17:20:45 +0000
commit6714862bdd2ee83d0e0f42cdbf4752629376b81e (patch)
tree58b273dec21745e31c42ce34e6b26e596987e63a /networking
parent7a32aaacd02c7f4035b0894aced7860658703985 (diff)
downloadbusybox-6714862bdd2ee83d0e0f42cdbf4752629376b81e.zip
busybox-6714862bdd2ee83d0e0f42cdbf4752629376b81e.tar.gz
Use busybox's show_usage function for help
Diffstat (limited to 'networking')
-rw-r--r--networking/udhcpc.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/networking/udhcpc.c b/networking/udhcpc.c
index e2ba46b..c05ca45 100644
--- a/networking/udhcpc.c
+++ b/networking/udhcpc.c
@@ -1254,7 +1254,7 @@ int udhcpc_main(int argc, char *argv[])
while (1) {
int option_index = 0;
- c = getopt_long(argc, argv, "c:fH:hi:np:qr:s:v", l_options,
+ c = getopt_long(argc, argv, "c:fH:i:np:qr:s:v", l_options,
&option_index);
if (c == -1) {
break;
@@ -1291,21 +1291,6 @@ int udhcpc_main(int argc, char *argv[])
client_config.hostname[OPT_LEN] = len;
strncpy(client_config.hostname + 2, optarg, len);
break;
- case 'h':
- puts("Usage: udhcpcd [OPTIONS]\n\n"
- " -c, --clientid=CLIENTID Client identifier\n"
- " -H, --hostname=HOSTNAME Client hostname\n"
- " -f, --foreground Do not fork after getting lease\n"
- " -i, --interface=INTERFACE Interface to use (default: eth0)\n"
- " -n, --now Exit with failure if lease cannot be\n"
- " immediately negotiated.\n"
- " -p, --pidfile=file Store process ID of daemon in file\n"
- " -q, --quit Quit after obtaining lease\n"
- " -r, --request=IP IP address to request (default: none)\n"
- " -s, --script=file Run file at dhcp events (default:\n"
- " " DEFAULT_SCRIPT ")\n"
- " -v, --version Display version");
- return 0;
case 'i':
client_config.interface = optarg;
break;
@@ -1328,6 +1313,8 @@ int udhcpc_main(int argc, char *argv[])
printf("udhcpcd, version %s\n\n", VERSION);
exit_client(0);
break;
+ default:
+ show_usage();
}
}