aboutsummaryrefslogtreecommitdiff
path: root/hurd/set-host.c
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1996-06-26 21:07:21 +0000
committerMiles Bader <miles@gnu.org>1996-06-26 21:07:21 +0000
commita5d96b254cf702682010d383cf28370defa13121 (patch)
tree9db054667fd21235c40c809e63938b5f09507d3d /hurd/set-host.c
parentf34e0ae3b003cff3c0448e7337fdf90fd8babdd7 (diff)
downloadglibc-a5d96b254cf702682010d383cf28370defa13121.zip
glibc-a5d96b254cf702682010d383cf28370defa13121.tar.gz
glibc-a5d96b254cf702682010d383cf28370defa13121.tar.bz2
* hurd/get-host.c <fcntl.h>: New include.cvs/libc-960627
* hurd/set-host.c <fcntl.h>: New include. (_hurd_set_host_config): Include NEW in args to dir_link. Return NWROTE, not NREAD.
Diffstat (limited to 'hurd/set-host.c')
-rw-r--r--hurd/set-host.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/hurd/set-host.c b/hurd/set-host.c
index e9af697..f8d2d69 100644
--- a/hurd/set-host.c
+++ b/hurd/set-host.c
@@ -17,6 +17,7 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
+#include <fcntl.h>
#include <hurd.h>
#include "hurdhost.h"
@@ -39,10 +40,10 @@ _hurd_set_host_config (const char *item, const char *value, size_t valuelen)
err = __io_write (new, value, valuelen, 0, &nwrote);
if (! err)
/* Atomically link the new node onto the name. */
- err = __dir_link (dir, item, 0);
+ err = __dir_link (dir, new, item, 0);
__mach_port_deallocate (__mach_task_self (), new);
}
__mach_port_deallocate (__mach_task_self (), dir);
- return nread;
+ return nwrote;
}