Displaying 1 result from an estimated 1 matches for "mbr_path".
Did you mean:
mbr_paths
2014 May 09
3
[PATCH 1/2] tests/syslinux: factorize search for mbr.bin
...ot;;
# Find prerequisites.
-my $mbr = "/usr/share/syslinux/mbr.bin";
-unless (-f $mbr) {
- $mbr = "/usr/lib/syslinux/mbr.bin";
- unless (-f $mbr) {
- print "$0: mbr.bin (from SYSLINUX) not found, skipping test\n";
- exit 77;
- }
+my $mbr;
+my @mbr_paths = (
+ "/usr/share/syslinux/mbr.bin",
+ "/usr/lib/syslinux/mbr.bin"
+);
+foreach my $m (@mbr_paths) {
+ if (-f $m) {
+ $mbr = $m;
+ last;
+ }
+}
+if (not length ($mbr)) {
+ print "$0: mbr.bin (from SYSLINUX) not found, skipping test\n";
+ exit 77;
}
p...