aboutsummaryrefslogtreecommitdiff
path: root/hostname.c
diff options
context:
space:
mode:
Diffstat (limited to 'hostname.c')
-rw-r--r--hostname.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/hostname.c b/hostname.c
index 16a28ca43..44d529c83 100644
--- a/hostname.c
+++ b/hostname.c
@@ -1,6 +1,6 @@
/* vi: set sw=4 ts=4: */
/*
- * $Id: hostname.c,v 1.14 2000/09/27 02:43:35 kraai Exp $
+ * $Id: hostname.c,v 1.15 2000/10/12 22:30:31 andersen Exp $
* Mini hostname implementation for busybox
*
* Copyright (C) 1999 by Randolph Chung <tausq@debian.org>
@@ -89,6 +89,12 @@ int hostname_main(int argc, char **argv)
}
filename = *(++argv);
break;
+ case '-':
+ if (strcmp(++(*argv), "file") || --argc ==0 ) {
+ usage(hostname_usage);
+ }
+ filename = *(++argv);
+ break;
default:
usage(hostname_usage);
}