diff options
author | Jaymes Wilks <mjwilks@us.ibm.com> | 2017-07-20 17:30:09 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2017-07-21 12:11:22 -0400 |
commit | f53897a31ba9855ce9c87605e3fadf5ce329816f (patch) | |
tree | e0b0e857776237c042e32cf2b990b9bf73601298 /src/usr | |
parent | 2db396365b7d86474564e5896a5524806a7fe6a2 (diff) | |
download | talos-hostboot-f53897a31ba9855ce9c87605e3fadf5ce329816f.tar.gz talos-hostboot-f53897a31ba9855ce9c87605e3fadf5ce329816f.zip |
Fix perl issue with secureboot range checking on ubuntu systems
The array indexing syntax used in the secureboot range checking code
is not very portable. I updated the syntax to use a more widely
accepted style.
Change-Id: Id4c39ceceac1fb7fcae27ed90234c37532efd7be
RTC:163084
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/43403
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com>
Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
Reviewed-by: Michael Baiocchi <mbaiocch@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr')
-rwxr-xr-x | src/usr/targeting/common/xmltohb/xmltohb.pl | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/usr/targeting/common/xmltohb/xmltohb.pl b/src/usr/targeting/common/xmltohb/xmltohb.pl index 90c4817e4..ef60f0b69 100755 --- a/src/usr/targeting/common/xmltohb/xmltohb.pl +++ b/src/usr/targeting/common/xmltohb/xmltohb.pl @@ -857,45 +857,45 @@ sub validateRangeMinsAndMaxes { my $i=0; # if the first range is an unbounded max then it stands alone my $prevMax = "-inf"; # default prevMax is negative infinity - if (!exists @rangeArray->[$i]->{min}) + if (!exists $rangeArray[$i]->{min}) { - if (!exists @rangeArray->[$i]->{max}) + if (!exists $rangeArray[$i]->{max}) { die "$attr_id has range tag with no min or max!"; } - $prevMax = @rangeArray->[$i]->{max}; + $prevMax = $rangeArray[$i]->{max}; $i++; } # go through the list and check for undesired overlap of ranges - while (exists @rangeArray->[$i]->{min} && exists @rangeArray->[$i]->{max}) + while (exists $rangeArray[$i]->{min} && exists $rangeArray[$i]->{max}) { - if (@rangeArray->[$i]->{max} < @rangeArray->[$i]->{min}) + if ($rangeArray[$i]->{max} < $rangeArray[$i]->{min}) { - print Dumper(@rangeArray[$i]); + print Dumper($rangeArray[$i]); die "Min/max pair in <range> tag inverted!"; } - if ($prevMax > @rangeArray->[$i]->{min}) + if ($prevMax > $rangeArray[$i]->{min}) { print "Previous max: $prevMax\n"; - print Dumper(@rangeArray[$i]); + print Dumper($rangeArray[$i]); die "Range overlap! Previous <max> tag $prevMax " - . "exceeds <min> tag value! @rangeArray->[$i]->{min}"; + . "exceeds <min> tag value! $rangeArray[$i]->{min}"; } - $prevMax = @rangeArray->[$i]->{max}; + $prevMax = $rangeArray[$i]->{max}; $i++; } # check for stray min tag at the end - if (exists @rangeArray->[$i]->{min}) + if (exists $rangeArray[$i]->{min}) { # make sure trailing min is greater than previous max - if ($prevMax > @rangeArray->[$i]->{min}) + if ($prevMax > $rangeArray[$i]->{min}) { print "Previous max: $prevMax\n"; - print Dumper(@rangeArray[$i]); + print Dumper($rangeArray[$i]); die "Range overlap! Previous <max> tag $prevMax " - . "exceeds <min> tag value! @rangeArray->[$i]->{min}"; + . "exceeds <min> tag value! $rangeArray[$i]->{min}"; } } |