storage : sub path: add snapname argument

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
This commit is contained in:
Alexandre Derumier
2013-05-02 05:51:49 +02:00
committed by Dietmar Maurer
parent 41c5461bcd
commit 207ea85267

View File

@ -348,14 +348,14 @@ sub path_to_volume_id {
}
sub path {
my ($cfg, $volid) = @_;
my ($cfg, $volid, $snapname) = @_;
my ($storeid, $volname) = parse_volume_id($volid);
my $scfg = storage_config($cfg, $storeid);
my $plugin = PVE::Storage::Plugin->lookup($scfg->{type});
my ($path, $owner, $vtype) = $plugin->path($scfg, $volname, $storeid);
my ($path, $owner, $vtype) = $plugin->path($scfg, $volname, $storeid, $snapname);
return wantarray ? ($path, $owner, $vtype) : $path;
}