Skip to content

Commit

Permalink
scstadmin: Avoid that specifying an attribute multiple times results …
Browse files Browse the repository at this point in the history
…in an incomprehensible error message
  • Loading branch information
bvassche committed Oct 21, 2016
1 parent b1a7b65 commit 5254f49
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scstadmin/scstadmin.sysfs/scstadmin
Original file line number Diff line number Diff line change
Expand Up @@ -5762,6 +5762,8 @@ sub configToAttr {
if (!scalar keys %{$$config{$attr}}) {
$attributes{$attr} = '';
} elsif ((keys %{$$config{$attr}}) > 1) {
immediateExit("Invalid configuration encountered. ".
"Attribute '$attr' has multiple values.");
foreach my $value (keys %{$$config{$attr}}) {
push @{$attributes{$attr}}, $value;
}
Expand Down

0 comments on commit 5254f49

Please sign in to comment.