From e2d7e4852ab842d893675e56e6f48871b73371dc Mon Sep 17 00:00:00 2001 From: Thomas Bushnell Date: Sun, 11 Jul 1999 05:32:34 +0000 Subject: 1999-07-09 Thomas Bushnell, BSG * firmlink.c (trivfs_S_io_read): Use mmap instead of vm_allocate. --- trans/ChangeLog | 4 ++++ trans/firmlink.c | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/trans/ChangeLog b/trans/ChangeLog index 88d09c5a..34a5128e 100644 --- a/trans/ChangeLog +++ b/trans/ChangeLog @@ -2,6 +2,10 @@ * crash.c: Add #include for munmap decl. +1999-07-09 Thomas Bushnell, BSG + + * firmlink.c (trivfs_S_io_read): Use mmap instead of vm_allocate. + 1999-07-03 Thomas Bushnell, BSG * crash.c (stop_pgrp): Use munmap instead of vm_deallocate. diff --git a/trans/firmlink.c b/trans/firmlink.c index 568316dc..faf269f4 100644 --- a/trans/firmlink.c +++ b/trans/firmlink.c @@ -1,6 +1,6 @@ /* A translator for `firmlinks' - Copyright (C) 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc. Written by Miles Bader @@ -218,7 +218,9 @@ trivfs_S_io_read (struct trivfs_protid *cred, if (start + amount > max) amount = max - start; if (amount > *data_len) - err = vm_allocate (mach_task_self (), data, amount, 1); + *data = (vm_address_t) mmap (0, amount, PROT_READ|PROT_WRITE, + MAP_ANON, 0, 0); + err = (*data == -1) ? errno : 0; if (!err && amount > 0) { memcpy ((char *)(*data + start), target, amount); -- cgit v1.2.3