scstadmin, SCST.pm: Fix checkTargetDynamicAttributes() return code

If no attributes have been passed to this function via the second argument,
only report success if the driver (first argument) exists.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5067 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2013-10-10 15:36:40 +00:00
parent 5ea0cf813f
commit 0298c2ecc3

View File

@@ -1310,8 +1310,6 @@ sub checkTargetDynamicAttributes {
my $driver = shift;
my $check = shift;
return FALSE if (!defined($check));
my $rc = $self->driverExists($driver);
return SCST_C_DRV_NO_DRIVER if (!$rc);
return $rc if (!$rc > 1);
@@ -1320,6 +1318,8 @@ sub checkTargetDynamicAttributes {
return SCST_C_FATAL_ERROR if (!defined($available));
return FALSE if (!defined($check));
if (ref($check) eq 'HASH') {
foreach my $attribute (keys %{$check}) {
if (!defined($$available{$attribute})) {