diff options
author | kaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk> | 2006-03-03 19:07:55 +0100 |
---|---|---|
committer | kaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk> | 2006-03-03 19:07:55 +0100 |
commit | 262bd587ceee8a192869e4b2e56a02d843da3276 (patch) | |
tree | 7b2944dc67e2b8022f588ab2e280cccc3831d2d1 /tools/xenstore/xenstored_domain.c | |
parent | 74bb865dac0aaedaf2cc87db49de3e1595bee473 (diff) | |
download | xen-262bd587ceee8a192869e4b2e56a02d843da3276.tar.gz xen-262bd587ceee8a192869e4b2e56a02d843da3276.tar.bz2 xen-262bd587ceee8a192869e4b2e56a02d843da3276.zip |
/proc/xen/xsd_kva exports mmap interface that xenstored now uses to map the
domain0 xenbus page.
Signed-off-by: Keir Fraser <keir@xensource.com>
Diffstat (limited to 'tools/xenstore/xenstored_domain.c')
-rw-r--r-- | tools/xenstore/xenstored_domain.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/tools/xenstore/xenstored_domain.c b/tools/xenstore/xenstored_domain.c index 563f07e596..27f906dda6 100644 --- a/tools/xenstore/xenstored_domain.c +++ b/tools/xenstore/xenstored_domain.c @@ -27,7 +27,6 @@ #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> -#include <paths.h> //#define DEBUG #include "utils.h" @@ -466,22 +465,9 @@ static int dom0_init(void) { int rc, fd; evtchn_port_t port; - unsigned long kva; char str[20]; struct domain *dom0; - fd = open(XENSTORED_PROC_KVA, O_RDONLY); - if (fd == -1) - return -1; - - rc = read(fd, str, sizeof(str)); - if (rc == -1) - goto outfd; - str[rc] = '\0'; - kva = strtoul(str, NULL, 0); - - close(fd); - fd = open(XENSTORED_PROC_PORT, O_RDONLY); if (fd == -1) return -1; @@ -496,12 +482,12 @@ static int dom0_init(void) dom0 = new_domain(NULL, 0, port); - fd = open(_PATH_KMEM, O_RDWR); + fd = open(XENSTORED_PROC_KVA, O_RDWR); if (fd == -1) return -1; dom0->interface = mmap(NULL, getpagesize(), PROT_READ|PROT_WRITE, - MAP_SHARED, fd, kva); + MAP_SHARED, fd, 0); if (dom0->interface == MAP_FAILED) goto outfd; |