From: Ian Jackson Subject: Re: PATCH: fix xenstore doc Date: Mon, 17 Mar 2008 10:48:56 +0000 Message-ID: <18398.19608.722528.86006@mariner.uk.xensource.com> References: <20080313124515.GA2738@saphi> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20080313124515.GA2738@saphi> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Tristan Gingold Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Tristan Gingold writes (untabified): > READ | > -WRITE | > +WRITE | This change is not correct. The document was correct beforehand. In xenstore.txt the notation is used to indicate that the value _may_ contain nuls, not that it will contain one trailing nul. >From the introduction, which explains the notation: Binary data (which may contain zero or more nul bytes) And it is clearly stated that the use of trailing nuls is not encouraged: While xenstore and most tools and APIs are capable of dealing with arbitrary binary data as values, this should generally be avoided. Data should generally be human-readable for ease of management and debugging; xenstore is not a high-performance facility and should be used only for small amounts of control plane data. Therefore xenstore values should normally be 7-bit ASCII text strings containing bytes 0x20..0x7f only, and should not contain a trailing nul byte. (The APIs used for accessing xenstore generally add a nul when reading, for the caller's convenience.) Ian.