aboutsummaryrefslogtreecommitdiff
path: root/networking/hostname.c
diff options
context:
space:
mode:
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 @@
1/* vi: set sw=4 ts=4: */ 1/* vi: set sw=4 ts=4: */
2/* 2/*
3 * $Id: hostname.c,v 1.34 2002/11/10 22:07:48 bug1 Exp $ 3 * $Id: hostname.c,v 1.35 2003/03/19 09:12:37 mjn3 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>
@@ -46,12 +46,12 @@ static void do_sethostname(char *s, int isfile)
46 if (!isfile) { 46 if (!isfile) {
47 if (sethostname(s, strlen(s)) < 0) { 47 if (sethostname(s, strlen(s)) < 0) {
48 if (errno == EPERM) 48 if (errno == EPERM)
49 error_msg_and_die("you must be root to change the hostname"); 49 bb_error_msg_and_die("you must be root to change the hostname");
50 else 50 else
51 perror_msg_and_die("sethostname"); 51 bb_perror_msg_and_die("sethostname");
52 } 52 }
53 } else { 53 } else {
54 f = xfopen(s, "r"); 54 f = bb_xfopen(s, "r");
55 while (fgets(buf, 255, f) != NULL) { 55 while (fgets(buf, 255, f) != NULL) {
56 if (buf[0] =='#') { 56 if (buf[0] =='#') {
57 continue; 57 continue;
@@ -75,7 +75,7 @@ int hostname_main(int argc, char **argv)
75 char *p = NULL; 75 char *p = NULL;
76 76
77 if (argc < 1) 77 if (argc < 1)
78 show_usage(); 78 bb_show_usage();
79 79
80 while ((opt = getopt(argc, argv, "dfisF:")) > 0) { 80 while ((opt = getopt(argc, argv, "dfisF:")) > 0) {
81 switch (opt) { 81 switch (opt) {
@@ -89,7 +89,7 @@ int hostname_main(int argc, char **argv)
89 filename = optarg; 89 filename = optarg;
90 break; 90 break;
91 default: 91 default:
92 show_usage(); 92 bb_show_usage();
93 } 93 }
94 } 94 }
95 95