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-devel

[Xen-devel] [PATCH] tools: misc: xen-tmem-list-parse: fix output uglines

To: ian.jackson@xxxxxxxxxxxxx, stefano.stabellini@xxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] tools: misc: xen-tmem-list-parse: fix output ugliness
From: Dan Magenheimer <dan.magenheimer@xxxxxxxxxx>
Date: Wed, 9 Nov 2011 13:40:01 -0800 (PST)
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 09 Nov 2011 13:40:52 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
(This should apply cleanly to 4.0, 4.1, and unstable.  It would
be nice to apply to the next dot release of 4.0 and 4.1, but
please definitely apply at least to unstable.)

Fix ugly parse output for xen-tmem-list-parse

This program parses the output of xm/xl tmem-list into
human-readable format.  A missing NULL terminator sometimes
causes garbage to be spewed where the two-letter pool type
should be printed.

Signed-off-by: Dan Magenheimer <dan.magenheimer@xxxxxxxxxx>

diff -r 54a5e994a241 tools/misc/xen-tmem-list-parse.c
--- a/tools/misc/xen-tmem-list-parse.c  Wed Nov 02 17:09:09 2011 +0000
+++ b/tools/misc/xen-tmem-list-parse.c  Wed Nov 09 14:28:40 2011 -0700
@@ -64,6 +64,7 @@
         return;
     for ( i = 0; i < len; i++ )
         *buf++ = *s1++;
+    *buf = '\0';
 }
 
 void parse_sharers(char *s, char *match, char *buf, int len)

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] tools: misc: xen-tmem-list-parse: fix output ugliness, Dan Magenheimer <=