|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] Re: XenBus watches and values with null bytes
On Wed, 10 May 2006 08:20:17 -0400, John D. Ramsdell wrote:
> I'm trying to understand the XenBus interface in
> linux-2.6-xen-sparse/include/xen/xenbus.h. I found the relevant page on
> the Xen Wiki, but it does not answer my questions.
>
> 1. I notice that xenbus_write has a prototype of
>
> int xenbus_write(xenbus_transaction_t t,
> const char *dir, const char *node,
> const char *string);
>
> How does one associate a value with a key when the value contains the
> null byte? Is zero the only character forbidden from being part of a
> value? For example, does a value have to be a UTF-8 encoded string?
XenStore supports setting values of arbitrary binary data. However, by
convention, we only ever store strings which is why the XenBus API only
supports strings.
You should ask yourself why you want to store binary data and if it's
truly necessary.
> 2. A watch includes a callback that provides an array of
> null terminated character strings. I assume these are the paths to the
> keys at or below the node being watched, but I saw no comment
> describing what a callback provides. Please fill me in.
The array currently only has two values the path and the token. See the
xenbus include file for the name of the defines for each of the indexes.
> 3. Is there a better source for XenBus/XenStore developer
> documentation? I Google'd, but came up empty handed.
Not that I know of.
Regards,
Anthony Liguori
> John
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|