summaryrefslogtreecommitdiff
path: root/debian/patches
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2014-09-26 16:50:04 +0200
committerJustus Winter <4winter@informatik.uni-hamburg.de>2014-09-26 16:50:04 +0200
commit945ff78a7046f910f1eca4ae741b42040184bffd (patch)
tree25ce4907e54d0fed94235ac6705211df9ee7fd41 /debian/patches
parent3a31172e334b6f8ba2f7157604236c1a254de372 (diff)
polish make_send_right.patch
Diffstat (limited to 'debian/patches')
-rw-r--r--debian/patches/make_send_right.patch48
1 files changed, 43 insertions, 5 deletions
diff --git a/debian/patches/make_send_right.patch b/debian/patches/make_send_right.patch
index 084342e..b4d950d 100644
--- a/debian/patches/make_send_right.patch
+++ b/debian/patches/make_send_right.patch
@@ -1,21 +1,29 @@
diff --git a/kern/bootstrap.c b/kern/bootstrap.c
-index d919e90..5f82d19 100644
+index d919e90..6ea5b67 100644
--- a/kern/bootstrap.c
+++ b/kern/bootstrap.c
-@@ -96,9 +96,11 @@ task_insert_send_right(
+@@ -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;
-+ mach_port_t sright;
++ ipc_port_t sright;
-+ sright = ipc_port_make_send(port);
++ 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 +157,13 @@ void bootstrap_create(void)
+@@ -155,13 +158,13 @@ void bootstrap_create(void)
/* Initialize boot script variables. We leak these send rights. */
losers = boot_script_set_variable
("host-port", VAL_PORT,
@@ -31,3 +39,33 @@ index d919e90..5f82d19 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)
+ 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);
+ 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;
+ }