diff options
author | Matt Kraai <kraai@debian.org> | 2000-07-14 01:51:25 +0000 |
---|---|---|
committer | Matt Kraai <kraai@debian.org> | 2000-07-14 01:51:25 +0000 |
commit | d537a95fdbc0b4a5f38edea8593b4c085fdd7fcb (patch) | |
tree | 62127f20fc07758e445d8c4e186306cbe83d77b1 /networking/hostname.c | |
parent | 4ac6cb534d78d63d7b0a206118c56bad7024b9f8 (diff) | |
download | busybox-w32-d537a95fdbc0b4a5f38edea8593b4c085fdd7fcb.tar.gz busybox-w32-d537a95fdbc0b4a5f38edea8593b4c085fdd7fcb.tar.bz2 busybox-w32-d537a95fdbc0b4a5f38edea8593b4c085fdd7fcb.zip |
Use errorMsg rather than fprintf.
Diffstat (limited to 'networking/hostname.c')
-rw-r--r-- | networking/hostname.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/networking/hostname.c b/networking/hostname.c index e909138e4..60f66c073 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.10 2000/06/19 17:25:39 andersen Exp $ | 3 | * $Id: hostname.c,v 1.11 2000/07/14 01:51:25 kraai 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> |
@@ -55,8 +55,7 @@ void do_sethostname(char *s, int isfile) | |||
55 | if (!isfile) { | 55 | if (!isfile) { |
56 | if (sethostname(s, strlen(s)) < 0) { | 56 | if (sethostname(s, strlen(s)) < 0) { |
57 | if (errno == EPERM) | 57 | if (errno == EPERM) |
58 | fprintf(stderr, | 58 | errorMsg("you must be root to change the hostname\n"); |
59 | "hostname: you must be root to change the hostname\n"); | ||
60 | else | 59 | else |
61 | perror("sethostname"); | 60 | perror("sethostname"); |
62 | exit(1); | 61 | exit(1); |