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/
Home Products Support Community News


Re: [Xen-devel] problem using xenbus interface

To: NAHieu <nahieu@xxxxxxxxx>
Subject: Re: [Xen-devel] problem using xenbus interface
From: Dan Smith <danms@xxxxxxxxxx>
Date: Mon, 08 Aug 2005 06:39:19 -0700
Cc: "List: Xen Developers" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Mon, 08 Aug 2005 13:38:15 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <5d7aca9505080805267dce691b@xxxxxxxxxxxxxx> (nahieu@xxxxxxxxx's message of "Mon, 8 Aug 2005 21:26:02 +0900")
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>
References: <5d7aca9505080805267dce691b@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.4 (gnu/linux)
> err = xenbus_scanf("/", "restart_mode", "%s", mode);

This will try to read //restart_mode, not /domain/<DOM>/restart_mode,
which I assume is not what you want.

Also, there is no way to access keys in the /domain/<DOM> directly,
only keys in subfolders.  For example, you should be using something
like /domain/<DOM>/control/restart_mode, like this:

err = xenbus_scanf("control", "restart_mode", "%s", mode);

Note the absence of the leading '/' in the directory parameter.  This
means the location is relative to the "home directory" of the domain.

> err = xenbus_mkdir("/", "test");

As I understand it, the plan is to remove the xenbus_mkdir() kernel
interface.  Directories should be created by the tools.  You should
have Xend (or something else) do the creation before the kernel needs

You may want to take a look at the XenBus wiki page some of us have
been working on, which might help:


Dan Smith
IBM Linux Technology Center
Open Hypervisor Team
email: danms@xxxxxxxxxx

Xen-devel mailing list