scstadmin, SCST.pm: Fix setLunAttribute() error return code

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5063 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2013-10-10 15:10:58 +00:00
parent bf82499635
commit 9e77adb8b8
@@ -3388,10 +3388,11 @@ sub setLunAttribute {
}
$rc = $self->lunExists($driver, $target, $lun, $group);
return SCST_C_GRP_NO_LUN if (!$rc);
return (defined($group) ? SCST_C_GRP_NO_LUN : SCST_C_TGT_NO_LUN)
if (!$rc);
return $rc if ($rc > 1);
my $attributes = $self->lunAttributes($driver, $target, $group, $lun);
my $attributes = $self->lunAttributes($driver, $target, $lun, $group);
return SCST_C_LUN_BAD_ATTRIBUTES if (!defined($$attributes{$attribute}));
return SCST_C_LUN_ATTRIBUTE_STATIC if ($$attributes{$attribute}->{'static'});