diff options
author | Thomas Bushnell <thomas@gnu.org> | 1999-07-11 05:27:55 +0000 |
---|---|---|
committer | Thomas Bushnell <thomas@gnu.org> | 1999-07-11 05:27:55 +0000 |
commit | 8296fd7fe688a203d71c63bdd2fbc4cd098989c1 (patch) | |
tree | 3d2c4db6217702a2fbc39e187aa79b41b74f066f /ftpfs/netfs.c | |
parent | b84e750c4abc10e5e1fb066abf1757b1ea42315e (diff) |
1999-07-09 Thomas Bushnell, BSG <tb@mit.edu>
* ccache.c (ccache_read): Use mmap instead of vm_allocate.
* netfs.c (get_dirents): Likewise.
Diffstat (limited to 'ftpfs/netfs.c')
-rw-r--r-- | ftpfs/netfs.c | 4 |
1 files changed, 3 insertions, 1 deletions
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) { |