[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] libblktap: Remove trailing null byte in xs_printf



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1222948615 -3600
# Node ID 80365bc6df425c5c0a0b812d82f1ad84bc8c73d6
# Parent  9a7b46546e05ca452cfcc43f6bd4515b3ee710dc
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@xxxxxxx>
---
 tools/blktap/lib/xs_api.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -r 9a7b46546e05 -r 80365bc6df42 tools/blktap/lib/xs_api.c
--- a/tools/blktap/lib/xs_api.c Thu Oct 02 11:39:36 2008 +0100
+++ b/tools/blktap/lib/xs_api.c Thu Oct 02 12:56:55 2008 +0100
@@ -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);

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.