summaryrefslogtreecommitdiff
path: root/libdiskfs/boot-start.c
diff options
context:
space:
mode:
authorThomas Bushnell <thomas@gnu.org>1999-07-11 05:28:45 +0000
committerThomas Bushnell <thomas@gnu.org>1999-07-11 05:28:45 +0000
commita439e9fc84397a7a802b2e9966df6d2bf7a63e73 (patch)
treecba25dc6e9e3c364866eb450b3d78ba2e7bc1f6b /libdiskfs/boot-start.c
parent6ae05c477f2d8931fc365f6f009817e6c26087fd (diff)
1999-07-09 Thomas Bushnell, BSG <tb@mit.edu>
* boot-start.c (diskfs_S_exec_startup_get_info): Use mmap instead of vm_allocate. (diskfs_S_fsys_init): Likewise. * file-get-trans.c (diskfs_S_file_get_translator): Likewise. * file-getfh.c (diskfs_S_file_getfh): Likewise. * io-read.c (diskfs_S_io_read): Likewise.
Diffstat (limited to 'libdiskfs/boot-start.c')
-rw-r--r--libdiskfs/boot-start.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libdiskfs/boot-start.c b/libdiskfs/boot-start.c
index 83ac5a91..baac9d00 100644
--- a/libdiskfs/boot-start.c
+++ b/libdiskfs/boot-start.c
@@ -348,14 +348,14 @@ diskfs_S_exec_startup_get_info (mach_port_t port,
*flags = EXEC_STACK_ARGS;
if (*portarraylen < INIT_PORT_MAX)
- vm_allocate (mach_task_self (), (vm_address_t *) portarrayP,
- (INIT_PORT_MAX * sizeof (mach_port_t)), 1);
+ *portarrayP = mmap (0, INIT_PORT_MAX * sizeof (mach_port_t),
+ PROT_READ|PROT_WRITE, MAP_ANON, 0, 0);
portarray = *portarrayP;
*portarraylen = INIT_PORT_MAX;
if (*dtablelen < 3)
- vm_allocate (mach_task_self (), (vm_address_t *) dtableP,
- (3 * sizeof (mach_port_t)), 1);
+ *dtableP = mmap (0, 3 * sizeof (mach_port_t), PROT_READ|PROT_WRITE,
+ MAP_ANON, 0, 0)
dtable = *dtableP;
*dtablelen = 3;
dtable[0] = dtable[1] = dtable[2] = get_console (); /* XXX */
@@ -594,8 +594,8 @@ diskfs_S_fsys_init (mach_port_t port,
and call _hurd_init. */
mach_port_t *portarray;
unsigned int i;
- vm_allocate (mach_task_self (), (vm_address_t *) &portarray,
- INIT_PORT_MAX * sizeof *portarray, 1);
+ portarray = mmap (0, INIT_PORT_MAX * sizeof *portarray,
+ PROT_READ|PROT_WRITE, MAP_ANON, 0, 0);
if (MACH_PORT_NULL != (mach_port_t) 0)
for (i = 0; i < INIT_PORT_MAX; ++i)
portarray[i] = MACH_PORT_NULL;