diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2008-10-02 12:56:55 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2008-10-02 12:56:55 +0100 |
commit | 4b52a3871137abc1b3f84f4dd3dc8e5fcbb9f602 (patch) | |
tree | bb588f58b4b0a18a78562fbecc2d0671a11e680d | |
parent | 4a93b11b6753ae0e0afb93f7307b32543447253b (diff) | |
download | xen-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>
-rw-r--r-- | tools/blktap/lib/xs_api.c | 2 |
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); |