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] xenconsoled: fix timestamp log

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xenconsoled: fix timestamp log
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 23 Jun 2009 03:45:19 -0700
Delivery-date: Tue, 23 Jun 2009 03:46:46 -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 1245752874 -3600
# Node ID 5f5112a7d2ffd203c062b3846bbce31912f499b2
# Parent  b6612dd06218b8da63b7e4bd2972f6b8a8476a4f
xenconsoled: fix timestamp log

timestamp log is broken.
Also, xenconsoled might die with segfault.

Signed-off-by: Kouya Shimura <kouya@xxxxxxxxxxxxxx>
---
 tools/console/daemon/io.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -r b6612dd06218 -r 5f5112a7d2ff tools/console/daemon/io.c
--- a/tools/console/daemon/io.c Tue Jun 23 11:26:22 2009 +0100
+++ b/tools/console/daemon/io.c Tue Jun 23 11:27:54 2009 +0100
@@ -127,7 +127,7 @@ static int write_with_timestamp(int fd, 
        const char *last_byte = data + sz - 1;
 
        while (data <= last_byte) {
-               const char *nl = memchr(data, '\n', sz);
+               const char *nl = memchr(data, '\n', last_byte + 1 - data);
                int found_nl = (nl != NULL);
                if (!found_nl)
                        nl = last_byte;

_______________________________________________
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] xenconsoled: fix timestamp log, Xen patchbot-unstable <=