aboutsummaryrefslogtreecommitdiff
path: root/libnetfs/file-get-storage-info.c
diff options
context:
space:
mode:
authorThomas Bushnell <thomas@gnu.org>1999-07-11 05:30:09 +0000
committerThomas Bushnell <thomas@gnu.org>1999-07-11 05:30:09 +0000
commit511d0368972e61018b20e1debbefea04264fcd08 (patch)
treeccafc118b30fd95d85281ecab8c92021e9353474 /libnetfs/file-get-storage-info.c
parentad014b1412367ef9c9038b3b52fa83f6c748e520 (diff)
downloadhurd-511d0368972e61018b20e1debbefea04264fcd08.tar.gz
hurd-511d0368972e61018b20e1debbefea04264fcd08.tar.bz2
hurd-511d0368972e61018b20e1debbefea04264fcd08.zip
1999-07-09 Thomas Bushnell, BSG <tb@mit.edu>
* 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.
Diffstat (limited to 'libnetfs/file-get-storage-info.c')
-rw-r--r--libnetfs/file-get-storage-info.c9
1 files changed, 4 insertions, 5 deletions
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;