Skip to contentSkip to conversation

PATCH: fix xenstore doc

PATCH Tristan Gingold 2 participants 3 messages Mar 13, 2008 – Mar 17, 2008

lore
Share & tools
lore
#0 lore raw

Hi,

as highlighted by Samuel's patch there is no NUL after value for WRITE requests. This patch fixes the doc.

Tristan.

# HG changeset patch
# User Tristan Gingold <[email protected]> # Date 1205300775 -3600
# Node ID 7a00b54e1ce9b0ec3930f7d78d5a519cf588d680 # Parent 7aa1d39b7786d741fc89e3c4ceb24badbf674611 Fix doc: no NUL after value for WRITE request.

docs/misc/xenstore.txt +1 -1
diff -r 7aa1d39b7786 -r 7a00b54e1ce9 docs/misc/xenstore.txt
@@ -132,7 +132,7 @@ reply payloads as applicable:
 ---------- Database read, write and permissions operatons ----------
 
 READ			<path>|			<value|>
-WRITE			<path>|<value|>
+WRITE			<path>|<value>
 	Store and read the octet string <value> at <path>.
 	WRITE creates any missing parent paths, with empty values.
 

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#1 lore raw

Tristan Gingold writes (untabified):

docs/misc/xenstore.txt reply payloads as applicable: · line 135

Quoted 3 lines

READ <path>| <value|>

docs/misc/xenstore.txt +1 -1
-WRITE                <path>|<value|>
+WRITE                <path>|<value>

This change is not correct. The document was correct beforehand. In xenstore.txt the notation <value|> is used to indicate that the value _may_ contain nuls, not that it will contain one trailing nul.

Quoted 1 line

From the introduction, which explains the notation:

<foo|> 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.

#2 lore raw

Quoting Ian Jackson <[email protected]>:

Quoted 8 lines

Tristan Gingold writes (untabified):

docs/misc/xenstore.txt reply payloads as applicable: · line 135

Quoted 3 lines

READ <path>| <value|>

docs/misc/xenstore.txt +1 -1
-WRITE                <path>|<value|>
+WRITE                <path>|<value>

This change is not correct. The document was correct beforehand. In xenstore.txt the notation <value|> is used to indicate that the value _may_ contain nuls, not that it will contain one trailing nul.

You're right. I was confused by the notation.

Tristan.