WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: XenBus watches and values with null bytes

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] Re: XenBus watches and values with null bytes
From: Anthony Liguori <aliguori@xxxxxxxxxx>
Date: Wed, 10 May 2006 19:21:59 -0500
Delivery-date: Wed, 10 May 2006 17:22:47 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: IBM
References: <E1FbeuK-0004L2-Me@host-192-168-0-1-bcn-london> <ogt8xpa9im6.fsf@xxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Pan/0.14.2.91 (As She Crawled Across the Table (Debian GNU/Linux))
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

<Prev in Thread] Current Thread [Next in Thread>