From: Wei Liu Subject: Re: [PATCH 3/5] libxl: use new QEMU xenstore protocol Date: Thu, 19 Mar 2015 11:04:14 +0000 Message-ID: <20150319110414.GF16267@zion.uk.xensource.com> References: <1426242875-24446-1-git-send-email-wei.liu2@citrix.com> <1426242875-24446-4-git-send-email-wei.liu2@citrix.com> <1426685440.14291.33.camel@citrix.com> <20150319103617.GC16267@zion.uk.xensource.com> <1426762551.610.29.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1426762551.610.29.camel@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: anthony.perard@citrix.com, ian.jackson@eu.citrix.com, stefano.stabellini@eu.citrix.com, Wei Liu , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Thu, Mar 19, 2015 at 10:55:51AM +0000, Ian Campbell wrote: [...] > > > > - return GCSPRINTF("/local/domain/0/device-model/%d/physmap/%s/%s", > > > > - domid, phys_offset, node); > > > > + return GCSPRINTF("/local/domain/%d/device-model/%d/physmap/%s/%s", > > > > + dm_domid, domid, phys_offset, node); > > > > > > This sort of thing might imply that the helper takes the tail of the > > > path? > > > > What do you mean? Sorry I don't follow. > > I suggested before having a helper to return > "/local/domain/0/device-model/%d/", this hunk made me wonder if perhaps > that helper should take a "const char *fmt, ..." which it appends, so > you would call it as: > > foo(dm_domid, domid, "physmap/%s/%s", phys_offset, node) > > or if you just want the base path for some reason > foo(dm_domid, domid, "") (or NULL as the last parameter). > OK. I get your idea. > (I'm unclear if dm_domid and domid are both needed or if the funcution > can call get_stubdom_id(domid) internally, I'm sure you know...). > dm_domid is still needed. Wei.