diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2009-08-16 20:17:35 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2009-08-16 20:17:35 -0400 |
commit | 1f83625f4861b1118e3392adb1da96a0d24a94cb (patch) | |
tree | 9c51bd955a8f9da1c8b0912b80a22dc9025e588c /src/boot.c | |
parent | af5aabb09f2ee803ab25bdcd2c44522cdb49f5fe (diff) | |
download | seabios-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.c | 20 |
1 files changed, 14 insertions, 6 deletions
@@ -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 |