summaryrefslogtreecommitdiff
path: root/networking/hostname.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-02-14 21:23:06 +0000
committerEric Andersen <andersen@codepoet.org>2001-02-14 21:23:06 +0000
commit67991cf824f8df27e74c92d754fb507681c69ce6 (patch)
treea0b652f3dc794d1050c1a8de3afb014a621238fa /networking/hostname.c
parent68be2ab914e1e20fe666bbd22a89a18714be2789 (diff)
downloadbusybox-w32-67991cf824f8df27e74c92d754fb507681c69ce6.tar.gz
busybox-w32-67991cf824f8df27e74c92d754fb507681c69ce6.tar.bz2
busybox-w32-67991cf824f8df27e74c92d754fb507681c69ce6.zip
This patch, put together by Manuel Novoa III, is a merge of work
done by Evin Robertson (bug#1105) and work from Manuel to make usage messages occupy less space and simplify how usage messages are displayed.
Diffstat (limited to 'networking/hostname.c')
-rw-r--r--networking/hostname.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/networking/hostname.c b/networking/hostname.c
index ce17ba91c..e1486b365 100644
--- a/networking/hostname.c
+++ b/networking/hostname.c
@@ -1,6 +1,6 @@
1/* vi: set sw=4 ts=4: */ 1/* vi: set sw=4 ts=4: */
2/* 2/*
3 * $Id: hostname.c,v 1.23 2001/02/01 16:49:29 kraai Exp $ 3 * $Id: hostname.c,v 1.24 2001/02/14 21:23:06 andersen Exp $
4 * Mini hostname implementation for busybox 4 * Mini hostname implementation for busybox
5 * 5 *
6 * Copyright (C) 1999 by Randolph Chung <tausq@debian.org> 6 * Copyright (C) 1999 by Randolph Chung <tausq@debian.org>
@@ -66,7 +66,7 @@ int hostname_main(int argc, char **argv)
66 char *s = NULL; 66 char *s = NULL;
67 67
68 if (argc < 1) 68 if (argc < 1)
69 usage(hostname_usage); 69 show_usage();
70 70
71 while (--argc > 0 && **(++argv) == '-') { 71 while (--argc > 0 && **(++argv) == '-') {
72 while (*(++(*argv))) { 72 while (*(++(*argv))) {
@@ -82,18 +82,18 @@ int hostname_main(int argc, char **argv)
82 break; 82 break;
83 case 'F': 83 case 'F':
84 if (--argc == 0) { 84 if (--argc == 0) {
85 usage(hostname_usage); 85 show_usage();
86 } 86 }
87 filename = *(++argv); 87 filename = *(++argv);
88 break; 88 break;
89 case '-': 89 case '-':
90 if (strcmp(++(*argv), "file") || --argc ==0 ) { 90 if (strcmp(++(*argv), "file") || --argc ==0 ) {
91 usage(hostname_usage); 91 show_usage();
92 } 92 }
93 filename = *(++argv); 93 filename = *(++argv);
94 break; 94 break;
95 default: 95 default:
96 usage(hostname_usage); 96 show_usage();
97 } 97 }
98 if (filename != NULL) 98 if (filename != NULL)
99 break; 99 break;