1
/******************************************************************************
3
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
4
* Use is subject to license terms.
6
* Copyright (C) 2005 Rusty Russell IBM Corporation
8
* This program is free software; you can redistribute it and/or
9
* modify it under the terms of the GNU General Public License as
10
* published by the Free Software Foundation, version 2 of the
19
#include "xenstored_core.h"
21
#define XENSTORED_PROC_KVA "/dev/xsd_kva"
22
#define XENSTORED_PROC_PORT "/kern/xen/xsd_port"
24
evtchn_port_t xenbus_evtchn(void)
31
fd = open(XENSTORED_PROC_PORT, O_RDONLY);
35
rc = read(fd, str, sizeof(str));
45
port = strtoul(str, NULL, 0);
51
void *xenbus_map(void)
56
fd = open(XENSTORED_PROC_KVA, O_RDWR);
60
addr = mmap(NULL, getpagesize(), PROT_READ|PROT_WRITE,
63
if (addr == MAP_FAILED)
71
void xenbus_notify_running(void)