From aedcfc5997f1fcc04f091c9f400e89369db21dd2 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Mon, 8 Apr 2019 02:16:46 +0000 Subject: [PATCH] scstadmin: Avoid that Perl complains about undefined values for write-only attributes git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8171 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scstadmin/scstadmin.sysfs/scstadmin | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scstadmin/scstadmin.sysfs/scstadmin b/scstadmin/scstadmin.sysfs/scstadmin index 93f953162..c64f965ee 100755 --- a/scstadmin/scstadmin.sysfs/scstadmin +++ b/scstadmin/scstadmin.sysfs/scstadmin @@ -5881,7 +5881,11 @@ sub cacheAttributes { } } else { my $value = $$attributes{$attribute}->{'value'}; - $cache{$attribute}->{$value} = FALSE; + # Write-only attributes (e.g. abort_isp) do not have + # a value. + if (defined($value)) { + $cache{$attribute}->{$value} = FALSE; + } } }