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

[Xen-devel] Re: [Xen-users] xendomains problem with long domain names?

To: "Daniel P. Berrange" <berrange@xxxxxxxxxx>
Subject: [Xen-devel] Re: [Xen-users] xendomains problem with long domain names?
From: "Henning Sprang" <henning_sprang@xxxxxx>
Date: Wed, 3 Jan 2007 15:46:43 +0100
Cc: Xen devel list <xen-devel@xxxxxxxxxxxxxxxxxxx>, "xen-users@xxxxxxxxxxxxxxxxxxx" <xen-users@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 03 Jan 2007 06:46:39 -0800
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=cQjOYUEkNQ8MMvywJqhNbviakPOSva9GzpnnyBQTaMBKZXDje+SquVY3RtihBsSkeec0BvyvFsxB+aarbPqIy9fLLFmpJMAt9ZGXEQT/6RphtEMTY9awv6QeMxOszRIbk2s09OTTS+2kT77GbQDFvVbRdMOpwdqTdp2ehF+6QL8=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20070103140243.GD3067@xxxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <5bb00b3f0701030554xc819e4bxd5013ed5f3d759b7@xxxxxxxxxxxxxx> <20070103140243.GD3067@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On 1/3/07, Daniel P. Berrange <berrange@xxxxxxxxxx> wrote:
[...]
which is used to parse the output of 'xm list'. The 'cut -c0-17' bit looks
like the obvious problem - truncating the name at 17 characters :-(

Yeah, thanks - I  also just found that (couldn't resist looking it up
even if busy with other things) - is there any good reason why this is
made like it is?

Otherwise I'd propose the parseln function be changed to this:

parseln()
{
   #name=`echo "$1" | cut -c0-17`
   name=`echo "$1" | cut -d " " -f 1`
   name=${name%% *}
   #rest=`echo "$1" | cut -c18- `
   rest=`echo "$1" | cut -d " " -f 2-`
   read id mem cpu vcpu state tm < <(echo "$rest")
}



That seems to make it work fine here.

Henning

(copy to the devel list - or do you prefer another way to receive patches?)

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

<Prev in Thread] Current Thread [Next in Thread>