[OpenBIOS] Fix boot-script parsing for openSUSE ppc media

Stefan Assmann sassmann at suse.de
Thu Jan 29 11:31:09 CET 2009


Subject: Fix boot-script parsing for openSUSE ppc media

Add an enhancement to deal with configurations in /ppc/bootinfo.txt like
<boot-script>boot &device;:1,\suseboot\yaboot.ibm</boot-script>.
This would evaluate to boot cd:0,1\suseboot\yaboot.ibm which results
in a file not found error (seen on many openSUSE ppc media).

With this patch the above will evaluate to boot cd:0,\suseboot\yaboot.ibm
and yaboot will load.

Signed-off-by: Stefan Assmann <sassmann at suse.de>

Index: arch/ppc/qemu/main.c
===================================================================
--- arch/ppc/qemu/main.c	(revision 418)
+++ arch/ppc/qemu/main.c	(working copy)
@@ -208,6 +208,8 @@
     fword("2drop");
     right = pop_fstr_copy();
     left = pop_fstr_copy();
+    while (right[0] != '\\' && right[0] != '\0')
+	    right++;
     snprintf(bootscript, sizeof(bootscript), "%s%s,%s", left, path, right);
     ELF_DPRINTF("fixed bootscript %s\n", bootscript);

  Stefan

-- 
Stefan Assmann          | SUSE LINUX Products GmbH
Software Engineer       | Maxfeldstr. 5, D-90409 Nuernberg
Mail: sassmann at suse.de  | GF: Markus Rex, HRB 16746 (AG Nuernberg)



More information about the OpenBIOS mailing list