diff options
-rw-r--r-- | debian/patches/make_send_right.patch | 51 |
1 files changed, 5 insertions, 46 deletions
diff --git a/debian/patches/make_send_right.patch b/debian/patches/make_send_right.patch index b4d950d..43abdc5 100644 --- a/debian/patches/make_send_right.patch +++ b/debian/patches/make_send_right.patch @@ -1,29 +1,8 @@ diff --git a/kern/bootstrap.c b/kern/bootstrap.c -index d919e90..6ea5b67 100644 +index d919e90..4edae7b 100644 --- a/kern/bootstrap.c +++ b/kern/bootstrap.c -@@ -90,15 +90,18 @@ static void get_compat_strings(char *flags_str, char *root_str); /* forward */ - static mach_port_t - task_insert_send_right( - task_t task, -- ipc_port_t port) -+ ipc_port_t port, -+ boolean_t make_send) - { - mach_port_t name; - - for (name = 1;; name++) { - kern_return_t kr; -+ ipc_port_t sright; - -+ sright = make_send? ipc_port_make_send(port): port; - kr = mach_port_insert_right(task->itk_space, name, -- port, MACH_MSG_TYPE_PORT_SEND); -+ sright, MACH_MSG_TYPE_PORT_SEND); - if (kr == KERN_SUCCESS) - break; - assert(kr == KERN_NAME_EXISTS); -@@ -155,13 +158,13 @@ void bootstrap_create(void) +@@ -155,13 +155,13 @@ void bootstrap_create(void) /* Initialize boot script variables. We leak these send rights. */ losers = boot_script_set_variable ("host-port", VAL_PORT, @@ -39,33 +18,13 @@ index d919e90..6ea5b67 100644 if (losers) panic ("cannot set boot-script variable device-port: %s", boot_script_error_string (losers)); -@@ -287,11 +290,11 @@ bootstrap_exec_compat(void *e) - - boot_host_port = - task_insert_send_right(bootstrap_task, -- ipc_port_make_send(realhost.host_priv_self)); -+ realhost.host_priv_self, TRUE); - - boot_device_port = - task_insert_send_right(bootstrap_task, -- ipc_port_make_send(master_device_port)); -+ master_device_port, TRUE); - - /* - * Start the bootstrap thread. -@@ -838,13 +841,13 @@ boot_script_free_task (task_t task, int aborting) +@@ -838,7 +838,8 @@ boot_script_free_task (task_t task, int aborting) int boot_script_insert_right (struct cmd *cmd, mach_port_t port, mach_port_t *name) { - *name = task_insert_send_right (cmd->task, (ipc_port_t)port); -+ *name = task_insert_send_right (cmd->task, (ipc_port_t)port, TRUE); ++ *name = task_insert_send_right (cmd->task, ++ ipc_port_make_send((ipc_port_t) port)); return 0; } - int - boot_script_insert_task_port (struct cmd *cmd, task_t task, mach_port_t *name) - { -- *name = task_insert_send_right (cmd->task, task->itk_sself); -+ *name = task_insert_send_right (cmd->task, task->itk_sself, FALSE); - return 0; - } |