aboutsummaryrefslogtreecommitdiff
path: root/networking/hostname.c
diff options
context:
space:
mode:
authorManuel Novoa III <mjn3@codepoet.org>2003-03-19 09:13:01 +0000
committerManuel Novoa III <mjn3@codepoet.org>2003-03-19 09:13:01 +0000
commitcad5364599eb5062d59e0c397ed638ddd61a8d5d (patch)
treea318d0f03aa076c74b576ea45dc543a5669e8e91 /networking/hostname.c
parente01f9662a5bd5d91be4f6b3941b57fff73cd5af1 (diff)
downloadbusybox-cad5364599eb5062d59e0c397ed638ddd61a8d5d.tar.gz
Major coreutils update.
Diffstat (limited to 'networking/hostname.c')
-rw-r--r--networking/hostname.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/networking/hostname.c b/networking/hostname.c
index f7c9fc426..6522bb21b 100644
--- a/networking/hostname.c
+++ b/networking/hostname.c
@@ -1,6 +1,6 @@
/* vi: set sw=4 ts=4: */
/*
- * $Id: hostname.c,v 1.34 2002/11/10 22:07:48 bug1 Exp $
+ * $Id: hostname.c,v 1.35 2003/03/19 09:12:37 mjn3 Exp $
* Mini hostname implementation for busybox
*
* Copyright (C) 1999 by Randolph Chung <tausq@debian.org>
@@ -46,12 +46,12 @@ static void do_sethostname(char *s, int isfile)
if (!isfile) {
if (sethostname(s, strlen(s)) < 0) {
if (errno == EPERM)
- error_msg_and_die("you must be root to change the hostname");
+ bb_error_msg_and_die("you must be root to change the hostname");
else
- perror_msg_and_die("sethostname");
+ bb_perror_msg_and_die("sethostname");
}
} else {
- f = xfopen(s, "r");
+ f = bb_xfopen(s, "r");
while (fgets(buf, 255, f) != NULL) {
if (buf[0] =='#') {
continue;
@@ -75,7 +75,7 @@ int hostname_main(int argc, char **argv)
char *p = NULL;
if (argc < 1)
- show_usage();
+ bb_show_usage();
while ((opt = getopt(argc, argv, "dfisF:")) > 0) {
switch (opt) {
@@ -89,7 +89,7 @@ int hostname_main(int argc, char **argv)
filename = optarg;
break;
default:
- show_usage();
+ bb_show_usage();
}
}