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

Re: [Xen-devel] [RFC PATCH 2/6] libxl: stop using libxl__xs_mkdir() for ~/control/shutdown



On Tue, 2015-11-24 at 17:20 +0000, Paul Durrant wrote:
> > -----Original Message-----
> > From: Ian Jackson [mailto:Ian.Jackson@xxxxxxxxxxxxx]
> > Sent: 24 November 2015 16:35
> > To: Paul Durrant
> > Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx; Stefano Stabellini; Ian Campbell;
> > Wei Liu
> > Subject: RE: [RFC PATCH 2/6] libxl: stop using libxl__xs_mkdir() for
> > ~/control/shutdown
> > 
> > Paul Durrant writes ("RE: [RFC PATCH 2/6] libxl: stop using
> > libxl__xs_mkdir()
> > for ~/control/shutdown"):
> > > [Ian Jackson]
> > > > Paul Durrant writes ("RE: [RFC PATCH 2/6] libxl: stop using
> > libxl__xs_mkdir()
> > > > for ~/control/shutdown"):
> > > > > [Ian Jackson:]
> > > > > > Maybe it would be easier to rename libxl__xs_mkdir to
> > > > > > libxl__xs_mknode ?ÂÂ(It's probably too late to rename
> > > > > > XS_MKDIR.)
> > > > > 
> > > > > There is still the need to set the path to an empty value though,
> > > > > which
> > is
> > > > not implicitly done by the XS_MKDIR.
> > > > 
> > > > Under what circumstances would this path not contain an empty value
> > > > after XS_MKDIR ?
> > > 
> > > In this case I believe you are correct, but my feeling was that
> > > people reading the code would be lulled into a false sense of
> > > security that XS_MKDIR always did the right thing to initialize a
> > > new path.
> > 
> > I'm not sure I follow this argument.ÂÂWhat did you think of my idea
> > of renaming libxl__xs_mkdir to libxl__xs_mknode ?
> > 
> 
> The issue, as I said, is the initial state of the node. If you use
> XS_MKDIR then it is not guaranteed to be empty.

Just to satisfy my curiosity, how can it be non-empty? What else could it
possibly contain, just garbage?

Or maybe this is the behaviour of XS_MKDIR on a path/node which already
exists?

Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

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