[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] problem using xenbus interface
On 8/9/05, Rusty Russell <rusty@xxxxxxxxxxxxxxx> 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 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |