diff options
author | Glenn L McGrath | 2001-06-26 02:06:08 +0000 |
---|---|---|
committer | Glenn L McGrath | 2001-06-26 02:06:08 +0000 |
commit | 78b0e379d7c2db84eec34ccd89cf9afb67b94901 (patch) | |
tree | ae5bb34caa3b88968102e93193a01e4d90109b92 /networking/hostname.c | |
parent | addabd6f16aece578d94d810d3a9e9dc88f2cdb7 (diff) | |
download | busybox-78b0e379d7c2db84eec34ccd89cf9afb67b94901.zip busybox-78b0e379d7c2db84eec34ccd89cf9afb67b94901.tar.gz |
Vladimir's last_patch_15
Diffstat (limited to 'networking/hostname.c')
-rw-r--r-- | networking/hostname.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/networking/hostname.c b/networking/hostname.c index 573c8ce..d878515 100644 --- a/networking/hostname.c +++ b/networking/hostname.c @@ -1,6 +1,6 @@ /* vi: set sw=4 ts=4: */ /* - * $Id: hostname.c,v 1.29 2001/06/23 13:49:14 andersen Exp $ + * $Id: hostname.c,v 1.30 2001/06/26 02:06:08 bug1 Exp $ * Mini hostname implementation for busybox * * Copyright (C) 1999 by Randolph Chung <tausq@debian.org> @@ -49,10 +49,11 @@ static void do_sethostname(char *s, int isfile) } else { f = xfopen(s, "r"); fgets(buf, 255, f); +#ifdef BB_FEATURE_CLEAN_UP fclose(f); +#endif chomp(buf); - if (sethostname(buf, strlen(buf)) < 0) - perror_msg_and_die("sethostname"); + do_sethostname(buf, 0); } } |