summaryrefslogtreecommitdiff
path: root/libnetfs/file-get-storage-info.c
diff options
context:
space:
mode:
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;