delete trailing white spaces

This commit is contained in:
Dietmar Maurer
2012-07-16 09:13:19 +02:00
parent be6339fc3a
commit 7f8373d270

View File

@ -16,7 +16,7 @@ my $collie_cmd = sub {
my ($server, $port) = split(':', $portal); my ($server, $port) = split(':', $portal);
my $cmd = ['/usr/sbin/collie', $class, $op, '-a', $server]; my $cmd = ['/usr/sbin/collie', $class, $op, '-a', $server];
push @$cmd, '-p', $port if $port; push @$cmd, '-p', $port if $port;
push @$cmd, @options if scalar(@options); push @$cmd, @options if scalar(@options);
return $cmd; return $cmd;
@ -32,7 +32,7 @@ sub sheepdog_ls {
run_command($cmd, outfunc => sub { run_command($cmd, outfunc => sub {
my $line = shift; my $line = shift;
$line = trim($line); $line = trim($line);
if ($line =~ /= (vm-(\d+)-\S+)\s+(\d+)\s+(\d+)\s(\d+)\s(\d+)\s/) { if ($line =~ /= (vm-(\d+)-\S+)\s+(\d+)\s+(\d+)\s(\d+)\s(\d+)\s/) {
my $image = $1; my $image = $1;
my $owner = $2; my $owner = $2;
my $size = $4; my $size = $4;
@ -87,7 +87,7 @@ sub path {
my ($vtype, $name, $vmid) = $class->parse_volname($volname); my ($vtype, $name, $vmid) = $class->parse_volname($volname);
my $portal = $scfg->{portal}; my $portal = $scfg->{portal};
my $path = "sheepdog:$portal:$name"; my $path = "sheepdog:$portal:$name";
return ($path, $vmid, $vtype); return ($path, $vmid, $vtype);
@ -145,7 +145,6 @@ sub list_images {
my $volid = "$storeid:$volname"; my $volid = "$storeid:$volname";
my $owner = $dat->{$volname}->{vmid}; my $owner = $dat->{$volname}->{vmid};
if ($vollist) { if ($vollist) {
my $found = grep { $_ eq $volid } @$vollist; my $found = grep { $_ eq $volid } @$vollist;
@ -160,7 +159,7 @@ sub list_images {
push @$res, $info; push @$res, $info;
} }
} }
return $res; return $res;
} }