[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] how to read value from xenstore inside kernel


  • To: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
  • From: Kuriakose Mathew <kmathew123@xxxxxxxxx>
  • Date: Tue, 25 Aug 2009 16:27:22 +0530
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
  • Delivery-date: Tue, 25 Aug 2009 03:59:48 -0700
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=MeF8cc1ox7OeNUrRgMbWGJDp8lxHSZPFaYyRDboHr+M2bsX6gR0qPoeC/MMSfnL3gJ p0sugestBwXVkK2rTGudRLr2+3mC0yB99gl29yJSd2wJaXQW1mHd0U/Um8j/wS4CTTyw 6AKVFoCBq+6Vh2A1DWXNxO1+cY3zVUagIH/X0=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

Hi ,

I have been trying to use to xenbus_read.

I added the below code in netback.c , static void net_tx_action(unsigned long unused) function.

char * test;
const char *nodename = "console";
test = xenbus_read(XBT_NIL, nodename, "limit", NULL);

It is compiling fine. But when the kernel is crashing at this point during runtime.
I expect to read the /local/domain/0/console/limit , which I am able to read from shell using
xenstore-read . Am I missing something ?

Thanks
Mathew




On Mon, Aug 17, 2009 at 11:50 PM, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> wrote:
On Mon, Aug 17, 2009 at 11:25:36PM +0530, Kuriakose Mathew wrote:
> Thanks for the response.
> But I want the value to be read in netback.c . I checked the
> drivers/xen/netback/xenbus.c
> and found some functions using xenbus_scanf . But couldn't find where these
> functions are getting called.

I recommend you get acquinted with 'cscope' and run under your linux directory this
command: 'make cscope' to create the cscope files. Then look for xenbus_scanf.

> Whether it will be possible to directly call xenbus_scanf directly in
> netback.c ? I want a value in xenstore to be read in some function in

Yes, if you have all of the #include files set right.

> netback.c.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.