[pve-devel] [PATCH 03/44] rbd : rbd_ls : parse base

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


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

diff --git a/PVE/Storage/RBDPlugin.pm b/PVE/Storage/RBDPlugin.pm
index 2eb55ba..301f64d 100644
--- a/PVE/Storage/RBDPlugin.pm
+++ b/PVE/Storage/RBDPlugin.pm
@@ -59,8 +59,8 @@ sub rbd_ls {
     my $parser = sub {
 	my $line = shift;
 
-	if ($line =~  m/^(vm-(\d+)-disk-\d+)\s+(\d+)(M|G|T)\s((\S+)\/(vm-\d+-\S+@\S+))?/) {
-	    my ($image, $owner, $size, $unit, $parent) = ($1, $2, $3, $4, $7);
+	if ($line =~  m/^((vm|base)-(\d+)-disk-\d+)\s+(\d+)(M|G|T)\s((\S+)\/((vm|base)-\d+-\S+@\S+))?/) {
+	    my ($image, $owner, $size, $unit, $parent) = ($1, $3, $4, $5, $8);
 
 	    $list->{$scfg->{pool}}->{$image} = {
 		name => $image,
-- 
1.7.10.4




More information about the pve-devel mailing list