From: Kevin O'Connor Date: Thu, 30 Dec 2010 02:59:44 +0000 (-0500) Subject: Use bootprio_find_named_rom() for ramdisk and cbfs payload priorities. X-Git-Tag: rel-0.6.2~21 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=c4bd3b922ffdfc2e83e17227a43c612c6919e7ae;p=seabios.git Use bootprio_find_named_rom() for ramdisk and cbfs payload priorities. --- diff --git a/src/coreboot.c b/src/coreboot.c index b4dfd8a..c9ee082 100644 --- a/src/coreboot.c +++ b/src/coreboot.c @@ -605,7 +605,7 @@ register_cbfs_payload(void) break; const char *filename = cbfs_filename(file); char *desc = znprintf(MAXDESCSIZE, "Payload [%s]", &filename[4]); - boot_add_cbfs(file, desc, -1); + boot_add_cbfs(file, desc, bootprio_find_named_rom(filename, 0)); } } diff --git a/src/ramdisk.c b/src/ramdisk.c index 5391376..bae30e2 100644 --- a/src/ramdisk.c +++ b/src/ramdisk.c @@ -21,8 +21,9 @@ ramdisk_setup(void) struct cbfs_file *file = cbfs_findprefix("floppyimg/", NULL); if (!file) return; + const char *filename = cbfs_filename(file); u32 size = cbfs_datasize(file); - dprintf(3, "Found floppy file %s of size %d\n", cbfs_filename(file), size); + dprintf(3, "Found floppy file %s of size %d\n", filename, size); int ftype = find_floppy_type(size); if (ftype < 0) { dprintf(3, "No floppy type found for ramdisk size\n"); @@ -45,9 +46,9 @@ ramdisk_setup(void) if (!drive_g) return; drive_g->type = DTYPE_RAMDISK; - dprintf(1, "Mapping CBFS floppy %s to addr %p\n", cbfs_filename(file), pos); - char *desc = znprintf(MAXDESCSIZE, "Ramdisk [%s]", cbfs_filename(file)); - boot_add_floppy(drive_g, desc, -1); + dprintf(1, "Mapping CBFS floppy %s to addr %p\n", filename, pos); + char *desc = znprintf(MAXDESCSIZE, "Ramdisk [%s]", &filename[10]); + boot_add_floppy(drive_g, desc, bootprio_find_named_rom(filename, 0)); } static int