|  |  | 
  
    |  |  | 
 
  |   |  | 
  
    |  |  | 
  
    |  |  | 
  
    |   xen-users
[Xen-devel] Re: [Xen-users] xendomains problem with long domain	names? 
| 
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
 | 
 |  | 
  
    |  |  |