From 8296fd7fe688a203d71c63bdd2fbc4cd098989c1 Mon Sep 17 00:00:00 2001 From: Thomas Bushnell Date: Sun, 11 Jul 1999 05:27:55 +0000 Subject: 1999-07-09 Thomas Bushnell, BSG * ccache.c (ccache_read): Use mmap instead of vm_allocate. * netfs.c (get_dirents): Likewise. --- ftpfs/netfs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'ftpfs/netfs.c') diff --git a/ftpfs/netfs.c b/ftpfs/netfs.c index a7c8f7a0..ced7310a 100644 --- a/ftpfs/netfs.c +++ b/ftpfs/netfs.c @@ -180,7 +180,9 @@ get_dirents (struct ftpfs_dir *dir, ? DIRENTS_CHUNK_SIZE : max_data_len); - err = vm_allocate (mach_task_self (), (vm_address_t *) data, size, 1); + *data = mmap (0, size, PROT_READ|PROT_WRITE, + MAP_ANON, 0, 0); + err = ((void *) *data == (void *) -1) ? errno : 0; if (! err) { -- cgit v1.2.3