[pve-devel] [PATCH 19/44] sheepdog : sheepdog_ls : parse base volumes

Alexandre Derumier aderumier at odiso.com
Tue Feb 5 12:55:46 CET 2013


Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
 PVE/Storage/SheepdogPlugin.pm |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/PVE/Storage/SheepdogPlugin.pm b/PVE/Storage/SheepdogPlugin.pm
index 50edfb0..4344e87 100644
--- a/PVE/Storage/SheepdogPlugin.pm
+++ b/PVE/Storage/SheepdogPlugin.pm
@@ -59,11 +59,11 @@ sub sheepdog_ls {
     run_command($cmd, outfunc => sub {
         my $line = shift;
         $line = trim($line);
-	if ($line =~ /(=|c) (vm-(\d+)-\S+)\s+(\d+)\s+(\d+)\s(\d+)\s(\d+)\s(\d+)\s(\S+)\s(\d+)/) {
+	if ($line =~ /(=|c) ((vm|base)-(\d+)-\S+)\s+(\d+)\s+(\d+)\s(\d+)\s(\d+)\s(\d+)\s(\S+)\s(\d+)/) {
 	    my $image = $2;
-	    my $owner = $3;
-	    my $size = $4;
-	    my $idvdi = $9;
+	    my $owner = $4;
+	    my $size = $5;
+	    my $idvdi = $10;
 	    my $parentid = $relationship->{$idvdi}->{parent} if $relationship->{$idvdi}->{parent};
 	    my $parent = $relationship->{$parentid}->{name} if $parentid;
 	    $list->{$storeid}->{$image} = {
-- 
1.7.10.4




More information about the pve-devel mailing list