1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-06-30 21:52:36 +02:00

layout: Kill the global layout

Change-Id: Ic302e9c5faf1368e5ca244ce461e55e14f916ab8
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/54286
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
Nico Huber
2021-05-14 01:07:28 +02:00
parent 7f48053172
commit d855351ce7
4 changed files with 11 additions and 27 deletions

View File

@ -519,12 +519,12 @@ int main(int argc, char *argv[])
}
msg_gdbg("\n");
if (layoutfile && read_romlayout(layoutfile)) {
if (layoutfile && layout_from_file(&layout, layoutfile)) {
ret = 1;
goto out;
}
if (!ifd && !fmap && process_include_args(get_global_layout(), include_args)) {
if (!ifd && !fmap && process_include_args(layout, include_args)) {
ret = 1;
goto out;
}
@ -716,9 +716,7 @@ int main(int argc, char *argv[])
goto out_shutdown;
}
if (layoutfile) {
layout = get_global_layout();
} else if (ifd && (flashrom_layout_read_from_ifd(&layout, fill_flash, NULL, 0) ||
if (ifd && (flashrom_layout_read_from_ifd(&layout, fill_flash, NULL, 0) ||
process_include_args(layout, include_args))) {
ret = 1;
goto out_shutdown;