scstadmin: Fix -resync_dev

Fix the following failure:

    # scstadmin -resync_dev volume01
    Collecting current configuration: done.
            -> Making requested changes.
            -> WARNING: Device 'volume01' lacks the settable attribute 'resync_size', ignoring.
            -> Done.
    All done.

This patch fixes a regression that was introduced by r8171 (commit
aedcfc5997 ("scstadmin: Avoid that Perl complains about undefined values
for write-only attributes") # v3.4.

Reported-by: Marc Smith <msmith626@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8915 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2020-05-14 20:45:26 +00:00
parent d045ff5e26
commit 8de9eb487a

View File

@@ -5883,9 +5883,8 @@ sub cacheAttributes {
my $value = $$attributes{$attribute}->{'value'};
# Write-only attributes (e.g. abort_isp) do not have
# a value.
if (defined($value)) {
$cache{$attribute}->{$value} = FALSE;
}
$value = "" if (!defined($value));
$cache{$attribute}->{$value} = FALSE;
}
}