diff options
author | Nico Huber <nico.h@gmx.de> | 2021-05-14 01:07:28 +0200 |
---|---|---|
committer | Nico Huber <nico.h@gmx.de> | 2021-06-26 15:59:34 +0000 |
commit | d855351ce708531b8bc060611a30d37294a941ac (patch) | |
tree | 821d56b897fc459e7897516a9c0f4c5892e632fc /cli_classic.c | |
parent | 7f480531721bca467541f9471ab39937fa9c2ad5 (diff) | |
download | flashrom-d855351ce708531b8bc060611a30d37294a941ac.tar.gz flashrom-d855351ce708531b8bc060611a30d37294a941ac.tar.bz2 flashrom-d855351ce708531b8bc060611a30d37294a941ac.zip |
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>
Diffstat (limited to 'cli_classic.c')
-rw-r--r-- | cli_classic.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/cli_classic.c b/cli_classic.c index fc91989e..3b6fbf82 100644 --- a/cli_classic.c +++ b/cli_classic.c @@ -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; |