libblktap: Remove trailing null byte in xs_printf

xs_printf writes the terminating null byte of the passed string to
Xenstore. When reading, the null byte is returned in the following
form which confuses tools:

sector-size = "512\000"

This patch removes the null byte from the data to write.

Signed-off-by: Kevin Wolf <kwolf@suse.de>
This commit is contained in:
Keir Fraser committed 2008-10-02 12:56:55 +01:00
1 parent 4a93b11b67
commit 4b52a38711
1 file changed
+1 -1
+1 -1
View File
@@ -132,7 +132,7 @@ int xs_printf(struct xs_handle *h, const char *dir, const char *node,
return ENOMEM;
}
ret = xs_write(h, XBT_NULL, path, buf, strlen(buf)+1);
ret = xs_write(h, XBT_NULL, path, buf, strlen(buf));
free(buf);
free(path);
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.