From: Ian Campbell Subject: Re: [PATCH] xen-tmem-list-parse: fix ugly parse output Date: Wed, 14 Nov 2012 10:24:42 +0000 Message-ID: <1352888682.26873.23.camel@zakaz.uk.xensource.com> References: <38bc9a60-827c-41f8-a667-e08960b8c135@default> <90421d4a-2b5e-49de-9c0f-e4c914980e7f@default> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <90421d4a-2b5e-49de-9c0f-e4c914980e7f@default> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Dan Magenheimer Cc: Ian Jackson , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On Wed, 2012-11-14 at 00:08 +0000, Dan Magenheimer wrote: > > Signed-off-by: Dan Magenheimer Acked-by: Ian Campbell and applied, sorry for the delay. > > --- > > tools/misc/xen-tmem-list-parse.c | 2 ++ > > 1 files changed, 2 insertions(+), 0 deletions(-) > > > > diff --git a/tools/misc/xen-tmem-list-parse.c b/tools/misc/xen-tmem-list-parse.c > > index 977e4d3..f32b107 100644 > > --- a/tools/misc/xen-tmem-list-parse.c > > +++ b/tools/misc/xen-tmem-list-parse.c > > @@ -243,6 +243,7 @@ void parse_pool(char *s) > > unsigned long long flush_objs = parse(s,"ot"); > > > > parse_string(s,"PT",pool_type,2); > > + pool_type[2] = '\0'; > > if (pool_type[1] == 'S') > > return; /* no need to repeat print data for shared pools */ > > printf("domid%lu,id%lu[%s]:pgp=%llu(max=%llu) obj=%llu(%llu) " > > @@ -286,6 +287,7 @@ void parse_shared_pool(char *s) > > unsigned long long flush_objs = parse(s,"ot"); > > > > parse_string(s,"PT",pool_type,2); > > + pool_type[2] = '\0'; > > parse_sharers(s,"SC",buf,BUFSIZE); > > printf("poolid=%lu[%s] uuid=%llx.%llx, shared-by:%s: " > > "pgp=%llu(max=%llu) obj=%llu(%llu) " > > -- > > 1.7.1