]> xenbits.xensource.com Git - xcp/xen-api-libs.git/commitdiff
Use correct upstream name for /dev/xen/evtchn.
authorIan Campbell <ian.campbell@citrix.com>
Mon, 15 Feb 2010 17:35:01 +0000 (17:35 +0000)
committerIan Campbell <ian.campbell@citrix.com>
Mon, 15 Feb 2010 17:35:01 +0000 (17:35 +0000)
This name has been upstream since forever and the typo here was leaving us with two device nodes.

If the device is not present then do not create it. The assumption that /dev/xen/ev{en,}tchn is minor 63 does not hold since the driver requests a dynamic minor.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
eventchn/eventchn_stubs.c

index 1e15dabf7a24b992dba5cdef4b253baa6890b90d..1e2c354706896d71cd3a8bba02071e697f76a410 100644 (file)
@@ -41,9 +41,7 @@
 #include <caml/callback.h>
 #include <caml/fail.h>
 
-#define EVENTCHN_PATH "/dev/xen/eventchn"
-#define EVENTCHN_MAJOR 10
-#define EVENTCHN_MINOR 63
+#define EVENTCHN_PATH "/dev/xen/evtchn"
 
 #define WITH_INJECTION_CAPABILITY
 #include "eventchn_injection.c"
@@ -73,11 +71,7 @@ int eventchn_do_open(void)
        pre_eventchn_open();
 
        fd = open(EVENTCHN_PATH, O_RDWR);
-       if (fd == -1 && errno == ENOENT) {
-               mkdir("/dev/xen", 0640);
-               mknod(EVENTCHN_PATH, S_IFCHR | 0640, makedev(10, 63));
-               fd = open(EVENTCHN_PATH, O_RDWR);
-       }
+
        return fd;
 }