From d855351ce708531b8bc060611a30d37294a941ac Mon Sep 17 00:00:00 2001 From: Nico Huber Date: Fri, 14 May 2021 01:07:28 +0200 Subject: layout: Kill the global layout Change-Id: Ic302e9c5faf1368e5ca244ce461e55e14f916ab8 Signed-off-by: Nico Huber Reviewed-on: https://review.coreboot.org/c/flashrom/+/54286 Tested-by: build bot (Jenkins) Reviewed-by: Angel Pons --- cli_classic.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'cli_classic.c') diff --git a/cli_classic.c b/cli_classic.c index fc91989e9..3b6fbf824 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; -- cgit v1.2.3