From: Ian Campbell Subject: Re: [PATCH] tools: misc: xen-tmem-list-parse: fix output ugliness Date: Tue, 22 Nov 2011 17:33:55 +0000 Message-ID: <1321983235.20464.32.camel@dagon.hellion.org.uk> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Dan Magenheimer Cc: "xen-devel@lists.xensource.com" , Ian Jackson , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On Wed, 2011-11-09 at 21:40 +0000, Dan Magenheimer wrote: > (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. Why does xm/xl not just have a human readable output option (or more likely, default)? > A missing NULL terminator sometimes > causes garbage to be spewed where the two-letter pool type > should be printed. > > Signed-off-by: Dan Magenheimer > > 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@lists.xensource.com > http://lists.xensource.com/xen-devel