mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-16 18:21:27 +00:00
scstadmin: Avoid dereferencing variables that have the value undef
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7950 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -777,6 +777,7 @@ sub aluaAttributes {
|
||||
chomp $value;
|
||||
|
||||
my $second_line = <$io>;
|
||||
$second_line = "" if (!defined($second_line));
|
||||
if (new_sysfs_interface() && !$is_static
|
||||
|| ($second_line =~ /\[key\]/)) {
|
||||
my $key = 0;
|
||||
@@ -2633,6 +2634,7 @@ sub deviceAttributes {
|
||||
} elsif ($linked =~ /^(\.\.\/)*$t\/([^\/]+)\/([^\/]+)\/$l\/(\d+)$/) {
|
||||
$driver = $2;
|
||||
$target = $3;
|
||||
$group = "";
|
||||
$lun = $4;
|
||||
} else {
|
||||
print("internal error: could not parse $linked\n");
|
||||
|
||||
Reference in New Issue
Block a user