summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZheng Da <zhengda1936@gmail.com>2009-12-06 23:34:15 +0100
committerZheng Da <zhengda1936@gmail.com>2009-12-06 23:34:15 +0100
commit03ce78689d4b67a4380938203b07cd140a25614b (patch)
tree8e4c42c9d88f87794ac3b45140bd3d89bc38ce5a
parentc27b7fd8a10207d5c1802370b2bb8c2dbcd7f153 (diff)
kmem gets its own priv host port by itself.
-rw-r--r--libddekit/kmem.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libddekit/kmem.c b/libddekit/kmem.c
index 2e6f7340..9814b501 100644
--- a/libddekit/kmem.c
+++ b/libddekit/kmem.c
@@ -22,6 +22,7 @@
*
*/
+#include <error.h>
#include <stdio.h>
#include <assert.h>
#include "mach_U.h"
@@ -120,8 +121,13 @@ int phys_to_virt (vm_address_t addr)
void
linux_kmem_init ()
{
- extern mach_port_t priv_host;
+ mach_port_t priv_host;
int i, j;
+ error_t err;
+
+ err = get_privileged_ports (&priv_host, NULL);
+ if (err)
+ error (2, err, "get_privileged_ports");
for (i = 0; i < MEM_CHUNKS; i++)
{