fix return value for path()
This commit is contained in:
@ -575,7 +575,7 @@ sub activate_volumes {
|
|||||||
activate_storage_list($cfg, [keys %$storagehash], $cache);
|
activate_storage_list($cfg, [keys %$storagehash], $cache);
|
||||||
|
|
||||||
foreach my $volid (@$vollist) {
|
foreach my $volid (@$vollist) {
|
||||||
my ($storeid, $volname) = parse_volume_id ($volid);
|
my ($storeid, $volname) = parse_volume_id($volid);
|
||||||
my $scfg = storage_config($cfg, $storeid);
|
my $scfg = storage_config($cfg, $storeid);
|
||||||
my $plugin = PVE::Storage::Plugin->lookup($scfg->{type});
|
my $plugin = PVE::Storage::Plugin->lookup($scfg->{type});
|
||||||
$plugin->activate_volume($storeid, $scfg, $volname, $exclusive, $cache);
|
$plugin->activate_volume($storeid, $scfg, $volname, $exclusive, $cache);
|
||||||
|
|||||||
@ -280,7 +280,7 @@ sub path {
|
|||||||
|
|
||||||
my $path = "/dev/disk/by-id/$name";
|
my $path = "/dev/disk/by-id/$name";
|
||||||
|
|
||||||
return ($path, $vmid, $vtype);
|
return wantarray ? ($path, $vmid, $vtype) : $path;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub alloc_image {
|
sub alloc_image {
|
||||||
|
|||||||
@ -231,7 +231,7 @@ sub path {
|
|||||||
|
|
||||||
my $path = "/dev/$vg/$name";
|
my $path = "/dev/$vg/$name";
|
||||||
|
|
||||||
return ($path, $vmid, $vtype);
|
return wantarray ? ($path, $vmid, $vtype) : $path;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub alloc_image {
|
sub alloc_image {
|
||||||
|
|||||||
Reference in New Issue
Block a user