* [PATCH] libblktap: Remove trailing null byte in xs_printf
@ 2008-10-02 11:51 Kevin Wolf
0 siblings, 0 replies; only message in thread
From: Kevin Wolf @ 2008-10-02 11:51 UTC (permalink / raw)
To: xen-devel
[-- Attachment #1: Type: text/plain, Size: 287 bytes --]
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>
[-- Attachment #2: fix-xs_printf.patch --]
[-- Type: text/x-patch, Size: 441 bytes --]
Index: xen-unstable.hg/tools/blktap/lib/xs_api.c
===================================================================
--- xen-unstable.hg.orig/tools/blktap/lib/xs_api.c
+++ xen-unstable.hg/tools/blktap/lib/xs_api.c
@@ -132,7 +132,7 @@ int xs_printf(struct xs_handle *h, const
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);
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-10-02 11:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-02 11:51 [PATCH] libblktap: Remove trailing null byte in xs_printf Kevin Wolf
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.