lio: list_lun: return early if volname cannot be parsed

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht
2019-09-26 15:31:07 +02:00
parent 2dbca26d99
commit 61137a54d6

View File

@ -207,6 +207,8 @@ my $list_view = sub {
my $object = $params[0];
my $volname = $extract_volname->($scfg, $object);
return undef if !defined($volname); # nothing to search for..
foreach my $lun (@{$SETTINGS->{target}->{luns}}) {
if ($lun->{storage_object} eq "$BACKSTORE/$volname") {
return $lun->{index};