]> xenbits.xensource.com Git - people/iwj/osstest.git/commitdiff
di_special_kernel: Replace open-coding in ts-host-install
authorIan Jackson <ian.jackson@eu.citrix.com>
Thu, 14 Dec 2017 12:23:24 +0000 (12:23 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Thu, 14 Dec 2017 15:34:41 +0000 (15:34 +0000)
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>
ts-host-install

index 01d04d4864d57c37e64ab429c3834a95b7620b37..520983f5da9ca20a01831161513dacc0e18298b7 100755 (executable)
@@ -214,14 +214,11 @@ END
 
     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";