From a439e9fc84397a7a802b2e9966df6d2bf7a63e73 Mon Sep 17 00:00:00 2001 From: Thomas Bushnell Date: Sun, 11 Jul 1999 05:28:45 +0000 Subject: 1999-07-09 Thomas Bushnell, BSG * 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. --- libdiskfs/boot-start.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'libdiskfs/boot-start.c') 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; -- cgit v1.2.3