From: NAHieu <nahieu@gmail.com>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: xen-devel@lists.xensource.com
Subject: Re: problem using xenbus interface
Date: Tue, 9 Aug 2005 12:34:18 +0900 [thread overview]
Message-ID: <5d7aca9505080820341f19352@mail.gmail.com> (raw)
In-Reply-To: <1123554115.13481.15.camel@localhost.localdomain>
On 8/9/05, Rusty Russell <rusty@rustcorp.com.au> wrote:
> On Mon, 2005-08-08 at 21:26 +0900, NAHieu wrote:
> > Hello,
> >
> > I a writing a small kernel module for domU, in which I use xenbus and
> > have some problems:
> >
> > I use xenbus_scanf to read value of "/restart_mode", but the below
> > code always failed (got non-zero err)
> >
> > err = xenbus_scanf("/", "restart_mode", "%s", mode);
>
> OK, if you start the xenstored with "--trace-file=/tmp/trace" you can
> see what's happening in that file.
>
> In this case, it's actually a bug in xenbus_scanf: it will ask to read
> "//restart_mode" which is an invalid path since it has two "/" in a row.
> But it's not a big problem because you shouldn't be writing in the top
> level directory anyway...
>
> I would recommend the following:
>
> 1) Use xenbus_read here, not xenbus_scanf, since you are just reading a
> single string and xenbus_read won't overflow on long strings.
>
> 2) Use "restart-mode" not "restart_mode": we've chosen - over _ so far.
>
Rusty, as I understand, you meant that at the moment, it is "restart-mode"?
But as I checked in the latest -unstable, it is "restart_mode". So it
(and others) will be converted to "restart-mode" in the future?
Thank you a lot,
NAH
prev parent reply other threads:[~2005-08-09 3:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-08 12:26 problem using xenbus interface NAHieu
2005-08-08 13:39 ` Dan Smith
2005-08-09 6:47 ` aq
2005-08-09 2:21 ` Rusty Russell
2005-08-09 2:53 ` NAHieu
2005-08-09 3:14 ` NAHieu
2005-08-09 3:34 ` NAHieu [this message]
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=5d7aca9505080820341f19352@mail.gmail.com \
--to=nahieu@gmail.com \
--cc=rusty@rustcorp.com.au \
--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.