From 511d0368972e61018b20e1debbefea04264fcd08 Mon Sep 17 00:00:00 2001 From: Thomas Bushnell Date: Sun, 11 Jul 1999 05:30:09 +0000 Subject: 1999-07-09 Thomas Bushnell, BSG * file-get-storage-info.c (netfs_S_file_get_storage_info): Use mmap instead of vm_allocate. * file-get-translator.c (netfs_S_file_get_translator): Likewise. * io-read.c (netfs_S_io_read): Likewise. --- libnetfs/file-get-storage-info.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'libnetfs/file-get-storage-info.c') diff --git a/libnetfs/file-get-storage-info.c b/libnetfs/file-get-storage-info.c index 05232e85..c8fec33c 100644 --- a/libnetfs/file-get-storage-info.c +++ b/libnetfs/file-get-storage-info.c @@ -1,5 +1,5 @@ /* - Copyright (C) 1995, 1996 Free Software Foundation, Inc. + Copyright (C) 1995, 1996, 1999 Free Software Foundation, Inc. Written by Michael I. Bushnell, p/BSG. This file is part of the GNU Hurd. @@ -41,10 +41,9 @@ netfs_S_file_get_storage_info (struct protid *user, if (*num_ints == 0) /* Argh */ { - error_t err = - vm_allocate (mach_task_self (), (vm_address_t *)ints, sizeof (int), 1); - if (err) - return err; + *ints = mmap (0, sizeof (int), PROT_READ|PROT_WRITE, MAP_ANON, 0, 0); + if (*ints == (int *) -1) + return errno; } *num_ints = 1; -- cgit v1.2.3