]> git.proxmox.com Git - pve-container.git/commitdiff
has_feature: check all mountpoints
authorDietmar Maurer <dietmar@proxmox.com>
Thu, 27 Aug 2015 08:05:59 +0000 (10:05 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 27 Aug 2015 08:05:59 +0000 (10:05 +0200)
src/PVE/LXC.pm

index 2250aa6f698da4084ef5bea723da7ba94d214f6e..65c588653d1e85e33594dfe3bcaaf16cc0cf1dd4 100644 (file)
@@ -1565,11 +1565,17 @@ my $snapshot_commit = sub {
 sub has_feature {
     my ($feature, $conf, $storecfg, $snapname) = @_;
     
-    #Fixme add other drives if necessary.
     my $err;
 
-    my $rootinfo = parse_ct_mountpoint($conf->{rootfs});
-    $err = 1 if !PVE::Storage::volume_has_feature($storecfg, $feature, $rootinfo->{volume}, $snapname);
+    foreach_mountpoint($conf, sub {
+       my ($ms, $mountpoint) = @_;
+
+       $err = 1 if !PVE::Storage::volume_has_feature($storecfg, $feature, $mountpoint->{volume}, $snapname);
+
+       # TODO: implement support for mountpoints
+       die "unable to handle mountpoint '$ms' - feature not implemented\n"
+           if $ms ne 'rootfs';
+    });
 
     return $err ? 0 : 1;
 }