WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

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

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] libblktap: Remove trailing null byte in xs_printf
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 08 Oct 2008 18:50:14 -0700
Delivery-date: Wed, 08 Oct 2008 18:50:30 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] libblktap: Remove trailing null byte in xs_printf, Xen patchbot-unstable <=