[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] ocaml: remove bogus /dev/xen/ev[en]tchn



# HG changeset patch
# User Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
# Date 1277379932 -3600
# Node ID e7b55cc5533aed48a47cf70e20aa9fb991bf2de4
# Parent  b54f9c9f9144f5f2d02a18a4f2841f9c5f361d5b
ocaml: remove bogus /dev/xen/ev[en]tchn

Oxenstored should not try to create the evtchn device, as it:

    * creates the wrong name (/dev/xen/eventchn rather than evtchn)
    * uses a hard-coded minor number, even though this dynamically
      depends on what other misc devices are in the kernel

Remove all this code and just rely on the system to create the device.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@xxxxxxxxxx>
---
 tools/ocaml/libs/eventchn/eventchn_stubs.c |   15 ++-------------
 1 files changed, 2 insertions(+), 13 deletions(-)

diff -r b54f9c9f9144 -r e7b55cc5533a tools/ocaml/libs/eventchn/eventchn_stubs.c
--- a/tools/ocaml/libs/eventchn/eventchn_stubs.c        Wed Jun 23 23:24:42 
2010 +0100
+++ b/tools/ocaml/libs/eventchn/eventchn_stubs.c        Thu Jun 24 12:45:32 
2010 +0100
@@ -34,10 +34,7 @@
 #include <caml/callback.h>
 #include <caml/fail.h>
 
-#define EVENTCHN_PATH "/dev/xen/eventchn"
-
-static int eventchn_major = 10;
-static int eventchn_minor = 61;
+#define EVENTCHN_PATH "/dev/xen/evtchn"
 
 static int do_ioctl(int handle, int cmd, void *arg)
 {
@@ -56,15 +53,7 @@ static int do_write_port(int handle, evt
 
 int eventchn_do_open(void)
 {
-       int fd;
-
-       fd = open(EVENTCHN_PATH, O_RDWR);
-       if (fd == -1 && errno == ENOENT) {
-               mkdir("/dev/xen", 0640);
-               mknod(EVENTCHN_PATH, S_IFCHR | 0640, makedev(eventchn_major, 
eventchn_minor));
-               fd = open(EVENTCHN_PATH, O_RDWR);
-       }
-       return fd;
+       return open(EVENTCHN_PATH, O_RDWR);
 }
 
 CAMLprim value stub_eventchn_init(value unit)

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.