projects
/
xen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4a93b11
)
libblktap: Remove trailing null byte in xs_printf
author
Keir Fraser
<keir.fraser@citrix.com>
Thu, 2 Oct 2008 11:56:55 +0000
(12:56 +0100)
committer
Keir Fraser
<keir.fraser@citrix.com>
Thu, 2 Oct 2008 11:56:55 +0000
(12:56 +0100)
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>
tools/blktap/lib/xs_api.c
patch
|
blob
|
history
diff --git
a/tools/blktap/lib/xs_api.c
b/tools/blktap/lib/xs_api.c
index 370a44aa4d69ae0ce7f93ab66afa67578c30761c..93d1cb91600a399e92f023d2f6b9c86d80fed7ac 100644
(file)
--- 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);