diff options
Diffstat (limited to 'libdiskfs/boot-start.c')
-rw-r--r-- | libdiskfs/boot-start.c | 12 |
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; |