]> xenbits.xensource.com Git - people/aperard/osstest.git/commitdiff
setupboot_grub2: Insist on space after directives
authorIan Jackson <ian.jackson@eu.citrix.com>
Wed, 27 May 2020 14:34:26 +0000 (15:34 +0100)
committerIan Jackson <ian.jackson@eu.citrix.com>
Mon, 8 Jun 2020 15:33:28 +0000 (16:33 +0100)
These parsing regexps were all wrong!

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Osstest/Debian.pm

index 2d30b3e9d680be3c05712cc36d45edfb009eb19a..a20569e59c53c93837d94e98c19c5757af2c6642 100644 (file)
@@ -529,17 +529,17 @@ sub setupboot_grub2 ($$$$) {
             if (m/^\s*submenu\s+[\'\"](.*)[\'\"].*\{\s*$/) {
                 push @offsets,(0);
             }
-            if (m/^\s*chainloader\s*\/EFI\/osstest\/xen.efi/) {
+            if (m/^\s*chainloader\s+\/EFI\/osstest\/xen.efi/) {
                 die unless $entry;
                 $entry->{Hv}= $1;
                 $entry->{Chainload} = 1;
             }
-            if (m/^\s*multiboot2?\s*(?:\/boot)?\/(xen\-[0-9][-+.0-9a-z]*\S+)/) {
+            if (m/^\s*multiboot2?\s+(?:\/boot)?\/(xen\-[0-9][-+.0-9a-z]*\S+)/) {
                 die unless $entry;
                 $entry->{Hv}= $1;
                 $entry->{Chainload} = 0;
             }
-            if (m/^\s*multiboot2?\s*(?:\/boot)?\/(vmlinu[xz]-(\S+))\s+(.*)/) {
+            if (m/^\s*multiboot2?\s+(?:\/boot)?\/(vmlinu[xz]-(\S+))\s+(.*)/) {
                 die unless $entry;
                 $entry->{KernOnly}= $1;
                 $entry->{KernVer}= $2;
@@ -551,7 +551,7 @@ sub setupboot_grub2 ($$$$) {
                 $entry->{KernVer}= $2;
                 $entry->{KernOpts}= $3;
             }
-            if (m/^\s*module2?\s*(?:\/boot)?\/(initrd\S+)/) {
+            if (m/^\s*module2?\s+(?:\/boot)?\/(initrd\S+)/) {
                 $entry->{Initrd}= $1;
             }
            if (m/^\s*module2?\s*\/(xenpolicy\S+)/) {