From: Ian Campbell <ian.campbell@citrix.com>
To: Dave Scott <Dave.Scott@citrix.com>, Doug Goldstein <cardoe@cardoe.com>
Cc: "xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [PATCH] ocaml/xs: prefer using character device
Date: Wed, 2 Sep 2015 12:21:27 +0100 [thread overview]
Message-ID: <1441192887.26292.138.camel@citrix.com> (raw)
In-Reply-To: <AA65E462-D242-45AE-97BE-015B8157BA97@citrix.com>
On Wed, 2015-09-02 at 09:50 +0000, Dave Scott wrote:
> Looks fine to me.
>
> Acked-by: David Scott <dave.scott@citrix.com>
Applied.
>
> > On 1 Sep 2015, at 19:34, Doug Goldstein <cardoe@cardoe.com> wrote:
> >
> > Since 9c89dc95201ffed5fead17b35754bf9440fdbdc0 libxenstore prefers
> > using
> > /dev/xen/xenbus over /proc/xen/xenbus. This makes the OCaml xenstore
> > library contain the same preference.
> >
> > Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
> > ---
> > tools/ocaml/libs/xs/xs.ml | 8 +++++++-
> > 1 file changed, 7 insertions(+), 1 deletion(-)
> >
> > diff --git a/tools/ocaml/libs/xs/xs.ml b/tools/ocaml/libs/xs/xs.ml
> > index 5757571..7e14487 100644
> > --- a/tools/ocaml/libs/xs/xs.ml
> > +++ b/tools/ocaml/libs/xs/xs.ml
> > @@ -162,7 +162,13 @@ let daemon_open () =
> > with _ -> raise Failed_to_connect
> >
> > let domain_open () =
> > - let path = "/proc/xen/xenbus" in
> > + let path = try
> > + let devpath = "/dev/xen/xenbus" in
> > + Unix.access devpath [ Unix.F_OK ];
> > + devpath
> > + with Unix.Unix_error(_, _, _) ->
> > + "/proc/xen/xenbus" in
> > +
> > let fd = Unix.openfile path [ Unix.O_RDWR ] 0o550 in
> > Unix.set_close_on_exec fd;
> > make fd
next prev parent reply other threads:[~2015-09-02 11:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-01 18:34 [PATCH] ocaml/xs: prefer using character device Doug Goldstein
2015-09-01 18:53 ` Wei Liu
2015-09-02 9:50 ` Dave Scott
2015-09-02 11:21 ` Ian Campbell [this message]
2015-09-02 10:15 ` Wei Liu
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=1441192887.26292.138.camel@citrix.com \
--to=ian.campbell@citrix.com \
--cc=Dave.Scott@citrix.com \
--cc=cardoe@cardoe.com \
--cc=xen-devel@lists.xen.org \
/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.