diff options
author | Thomas Bushnell <thomas@gnu.org> | 1999-07-11 05:32:44 +0000 |
---|---|---|
committer | Thomas Bushnell <thomas@gnu.org> | 1999-07-11 05:32:44 +0000 |
commit | e529ce98486b413cca7b16e7f7a51642b60f0a6f (patch) | |
tree | ff12d6201bb3d6244eb71328ffbb394cfe747db3 /ufs/hyper.c | |
parent | fbd6929a645721d3c1905900a9e1d9df1fed051e (diff) |
1999-07-09 Thomas Bushnell, BSG <tb@mit.edu>
* dir.c (diskfs_get_directs): Use mmap instead of vm_allocate.
* hyper.c (get_hypermetadata): Likewise.
* pager.c (pager_read_page): Likewise.
Diffstat (limited to 'ufs/hyper.c')
-rw-r--r-- | ufs/hyper.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/ufs/hyper.c b/ufs/hyper.c index deb4a5df..c907d274 100644 --- a/ufs/hyper.c +++ b/ufs/hyper.c @@ -257,8 +257,7 @@ get_hypermetadata (void) exit (1); } - vm_allocate (mach_task_self (), - (vm_address_t *)&zeroblock, sblock->fs_bsize, 1); + zeroblock = mmap (0, sblock->fs_bsize, PROT_READ|PROT_WRITE, MAP_ANON, 0, 0); /* If the filesystem has new features in it, don't pay attention to the user's request not to use them. */ @@ -397,9 +396,7 @@ diskfs_readonly_changed (int readonly) { (*(readonly ? store_set_flags : store_clear_flags)) (store, STORE_READONLY); - vm_protect (mach_task_self (), - (vm_address_t)disk_image, store->size, - 0, VM_PROT_READ | (readonly ? 0 : VM_PROT_WRITE)); + mprotect (disk_image, store->size, PROT_READ | (readonly ? 0 : PROT_WRITE)); if (readonly) { |