From c4bd3b922ffdfc2e83e17227a43c612c6919e7ae Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Wed, 29 Dec 2010 21:59:44 -0500 Subject: [PATCH] Use bootprio_find_named_rom() for ramdisk and cbfs payload priorities. --- src/coreboot.c | 2 +- src/ramdisk.c | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) 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 -- 2.25.1