aboutsummaryrefslogtreecommitdiffstats
path: root/tools/blktap
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2008-10-02 12:56:55 +0100
committerKeir Fraser <keir.fraser@citrix.com>2008-10-02 12:56:55 +0100
commit4b52a3871137abc1b3f84f4dd3dc8e5fcbb9f602 (patch)
treebb588f58b4b0a18a78562fbecc2d0671a11e680d /tools/blktap
parent4a93b11b6753ae0e0afb93f7307b32543447253b (diff)
downloadxen-4b52a3871137abc1b3f84f4dd3dc8e5fcbb9f602.tar.gz
xen-4b52a3871137abc1b3f84f4dd3dc8e5fcbb9f602.tar.bz2
xen-4b52a3871137abc1b3f84f4dd3dc8e5fcbb9f602.zip
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>
Diffstat (limited to 'tools/blktap')
-rw-r--r--tools/blktap/lib/xs_api.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/blktap/lib/xs_api.c b/tools/blktap/lib/xs_api.c
index 370a44aa4d..93d1cb9160 100644
--- a/tools/blktap/lib/xs_api.c
+++ b/tools/blktap/lib/xs_api.c
@@ -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);