From: Kuriakose Mathew Subject: Re: how to read value from xenstore inside kernel Date: Mon, 17 Aug 2009 23:25:36 +0530 Message-ID: <9e81bde0908171055q5504683cm19cb2c70e24dfb88@mail.gmail.com> References: <9e81bde0908162340h42011f5cn7606c962fda89da4@mail.gmail.com> <20090817143826.GA4551@phenom.dumpdata.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0558364995==" Return-path: In-Reply-To: <20090817143826.GA4551@phenom.dumpdata.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Konrad Rzeszutek Wilk , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --===============0558364995== Content-Type: multipart/alternative; boundary=001636ed66b4f549d304715a1b59 --001636ed66b4f549d304715a1b59 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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. 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 netback.c. Please help. -Mathew On Mon, Aug 17, 2009 at 8:08 PM, Konrad Rzeszutek Wilk < konrad.wilk@oracle.com> wrote: > On Mon, Aug 17, 2009 at 12:10:21PM +0530, Kuriakose Mathew wrote: > > Can someone please point me to a code( or help me to find some code)where > a > > value corresponding to a key is read from Xenstore inside the kernel . My > > requirement is to read a xenstore value from netback.c . > > In drivers/xen/blkback/xenbus.c, the function backend_changed exclusivy job > is > to read those values. Here is an example: > > 278 err = xenbus_scanf(XBT_NIL, dev->nodename, "physical-device", > "%x:%x", > 279 &major, &minor); > > I would recommend you get a copy of "Understanding Xen" to understand how > XenStore "transfers" the data from one domain to another. > > > > > Thanks > > Mathew > > > _______________________________________________ > > Xen-devel mailing list > > Xen-devel@lists.xensource.com > > http://lists.xensource.com/xen-devel > > --001636ed66b4f549d304715a1b59 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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 usin= g xenbus_scanf . But couldn't find where these functions are getting ca= lled.
Whether it will be possible to directly call xenbus_scanf directly in netba= ck.c ? I want a value in xenstore to be read in some function in netback.c.=

Please help.
-Mathew


On Mo= n, Aug 17, 2009 at 8:08 PM, Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> wrote:
<= div class=3D"h5">On Mon, Aug 17, 2009 at 12:10:21PM +0530, Kuriakose Mathew= wrote:
> Can someone please point me to a code( or help me to find some code)wh= ere a
> value corresponding to a key is read from Xenstore inside the kernel .= My
> requirement is to read a xenstore value from netback.c .

In drivers/xen/blkback/xenbus.c, the function backend_changed e= xclusivy job is
to read those values. Here is an example:

278 =A0 =A0 =A0 =A0 err =3D xenbus_scanf(XBT_NIL, dev->nodename, "p= hysical-device", "%x:%x",
279 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0&major, &= ;minor);

I would recommend you get a copy of "Understanding Xen" to unders= tand how
XenStore "transfers" the data from one domain to another.

>
> Thanks
> Mathew

> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xenso= urce.com
> htt= p://lists.xensource.com/xen-devel


--001636ed66b4f549d304715a1b59-- --===============0558364995== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============0558364995==--