From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: Xen-devel <xen-devel@lists.xensource.com>,
Vincent Hanquez <Vincent.Hanquez@eu.citrix.com>,
Ian Campbell <Ian.Campbell@citrix.com>
Subject: [PATCH] ocaml: remove bogus /dev/xen/ev[en]tchn
Date: Wed, 23 Jun 2010 22:22:44 +0100 [thread overview]
Message-ID: <4C227B24.7080102@goop.org> (raw)
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@citrix.com>
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)
reply other threads:[~2010-06-23 21:22 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C227B24.7080102@goop.org \
--to=jeremy@goop.org \
--cc=Ian.Campbell@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=Vincent.Hanquez@eu.citrix.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.