aboutsummaryrefslogtreecommitdiffstats
path: root/src/boot.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2009-08-16 20:17:35 -0400
committerKevin O'Connor <kevin@koconnor.net>2009-08-16 20:17:35 -0400
commit1f83625f4861b1118e3392adb1da96a0d24a94cb (patch)
tree9c51bd955a8f9da1c8b0912b80a22dc9025e588c /src/boot.c
parentaf5aabb09f2ee803ab25bdcd2c44522cdb49f5fe (diff)
downloadseabios-1f83625f4861b1118e3392adb1da96a0d24a94cb.tar.gz
Rework coreboot cbfs interface for added flexibility.
Allow callers to track the cbfs_file pointer. Also, remove obsolete code for brute-force flash scanning.
Diffstat (limited to 'src/boot.c')
-rw-r--r--src/boot.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/boot.c b/src/boot.c
index 43ccae5f..9a08d26b 100644
--- a/src/boot.c
+++ b/src/boot.c
@@ -183,10 +183,12 @@ static int
menu_show_cbfs(struct ipl_entry_s *ie, int menupos)
{
int count = 0;
+ struct cbfs_file *file;
for (;;) {
- const char *filename = cbfs_findNprefix("img/", count);
- if (!filename)
+ file = cbfs_findprefix("img/", file);
+ if (!file)
break;
+ const char *filename = cbfs_filename(file);
printf("%d. Payload [%s]\n", menupos + count, &filename[4]);
count++;
if (count > 8)
@@ -393,10 +395,16 @@ boot_cbfs(struct ipl_entry_s *ie)
{
if (! CONFIG_COREBOOT_FLASH)
return;
- const char *filename = cbfs_findNprefix("img/", ie->subchoice);
- if (! filename)
- return;
- cbfs_run_payload(filename);
+ int count = ie->subchoice;
+ struct cbfs_file *file;
+ for (;;) {
+ file = cbfs_findprefix("img/", file);
+ if (!file)
+ return;
+ if (count--)
+ continue;
+ cbfs_run_payload(file);
+ }
}
static void