diff options
author | Roland McGrath <roland@gnu.org> | 2001-08-17 10:28:22 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2001-08-17 10:28:22 +0000 |
commit | afc455ff671ddb540ebe14b6c6a3b96e569496c4 (patch) | |
tree | c037abd9f1522156be20a0faa65ae2fe3e4362e0 /boot/userland-boot.c | |
parent | 16f26b53445c06f8ce9f3d1100b92cce4653563e (diff) |
2001-08-17 Roland McGrath <roland@frob.com>
* userland-boot.c (boot_script_insert_right): Take new result
parameter for send right name in target task.
(boot_script_insert_task_port): New function.
* boot_script.h: Update those two decls.
(VAL_TASK): New macro.
* boot_script.c (VAL_SYM, VAL_FUNC): Increase these constants.
(builtin_symbols): Use VAL_TASK for "task-create".
(boot_script_exec): Update caller of boot_script_insert_right.
Treat VAL_TASK like VAL_PORT, but call boot_script_insert_task_port.
Diffstat (limited to 'boot/userland-boot.c')
-rw-r--r-- | boot/userland-boot.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/boot/userland-boot.c b/boot/userland-boot.c index b6f38290..c053b2b8 100644 --- a/boot/userland-boot.c +++ b/boot/userland-boot.c @@ -25,13 +25,13 @@ #include "boot_script.h" void * -boot_script_malloc (size_t size) +boot_script_malloc (unsigned int size) { return malloc (size); } void -boot_script_free (void *ptr, size_t size) +boot_script_free (void *ptr, unsigned int size) { free (ptr); } @@ -82,7 +82,7 @@ boot_script_free_task (task_t task, int aborting) } int -boot_script_insert_right (struct cmd *cmd , mach_port_t port) +boot_script_insert_right (struct cmd *cmd, mach_port_t port, mach_port_t *name) { error_t err = mach_port_insert_right (cmd->task, port, port, MACH_MSG_TYPE_COPY_SEND); @@ -91,5 +91,12 @@ boot_script_insert_right (struct cmd *cmd , mach_port_t port) error (0, err, "%s: task_resume", cmd->path); return BOOT_SCRIPT_MACH_ERROR; } + *name = port; return 0; } + +int +boot_script_insert_task_port (struct cmd *cmd, task_t task, mach_port_t *name) +{ + return boot_script_insert_right (cmd, task, name); +} |