[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
> -----Original Message----- > From: Ian Jackson [mailto:Ian.Jackson@xxxxxxxxxxxxx] > Sent: 24 November 2015 17:39 > 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"): > > From: Ian Jackson [mailto:Ian.Jackson@xxxxxxxxxxxxx] > > > And even if the node did somehow end up with a nonempty value, > nothing > > > would break because no-one would read it. > > > > Maybe. Personally I would have thought a toolstack would want to put > things into a known state and XS_MKDIR just doesn't do that. > > Hrm. > > > > > If you use XS_WRITE then it is and I think that is the correct > > > > semantic here (even though we happen to get away with it at the > > > > moment). I'm happy with the function rename, but would you be > happy > > > > with the change in semantic? > > > > > > XS_MKDIR creates missing parents, which XS_WRITE doesn't. > > > > According to the documentation it does: (from xenstore.txt) > > > > READ <path>| <value|> > > WRITE <path>|<value|> > > Store and read the octet string <value> at <path>. > > WRITE creates any missing parent paths, with empty values. > > Oh! > > Well so then perhaps we should jsut change libxl__xs_mkdir to use > WRITE. I think the rename to libxl__xs_mknode() is warranted, and will avoid anyone's belief that the implementer typo-ed the actual XS command :-) > This rather confusing situation is probably worth a doc > comment next to the prototype in libxl_internal.h. Yep. That sounds like a good idea. I'll do that. Paul > > Ian. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |