mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-18 19:21:26 +00:00
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:
@@ -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})) {
|
||||
|
||||
Reference in New Issue
Block a user