WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] ocaml: remove bogus /dev/xen/ev[en]tchn

To: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] ocaml: remove bogus /dev/xen/ev[en]tchn
From: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Date: Wed, 23 Jun 2010 22:22:44 +0100
Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Vincent Hanquez <Vincent.Hanquez@xxxxxxxxxxxxx>, Ian Campbell <Ian.Campbell@xxxxxxxxxx>
Delivery-date: Wed, 23 Jun 2010 14:24:39 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100430 Fedora/3.0.4-2.fc12 Lightning/1.0b2pre Thunderbird/3.0.4
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>

diff -r a24dbfcbdf69 tools/ocaml/libs/eventchn/eventchn_stubs.c
--- a/tools/ocaml/libs/eventchn/eventchn_stubs.c        Tue Jun 22 07:19:38 
2010 +0100
+++ b/tools/ocaml/libs/eventchn/eventchn_stubs.c        Wed Jun 23 22:17:29 
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 @@
 
 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-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] ocaml: remove bogus /dev/xen/ev[en]tchn, Jeremy Fitzhardinge <=