The effect is simply to reuse the loop in di_special_kernel. The
extra tests etc. to compute $k and $c in di_special_kernel are of no
import here, and are harmless. We have already called
di_special_kernel so if it was going to fail due to this extra
computation, it would do so earlier.
No overall functional change.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
my %xopts;
- foreach my $kp (keys %{ $ho->{Flags} }) {
- # Backwards compatibility
- $kp = "need-kernel-deb-wheezy-backports" if $kp eq "need-kernel-deb-armmp";
- $kp =~ s/need-kernel-deb-$ho->{Suite}-// or next;
-
+ di_special_kernel($ho, $d_i, sub {
+ my ($kp,$k,$c) = @_;
$xopts{dtbs} = "/$d_i/$kp-dtbs"
if -e "$ho->{Tftp}{Path}/$d_i/$kp-dtbs";
- }
+ });
$xopts{dtbs} = "/$d_i/dtbs"
if !$xopts{dtbs} && -e "$ho->{Tftp}{Path}/$d_i/dtbs";