Attention is currently required from: Edward O'Callaghan, Daniel Campello, Anastasia Klimchuk, Peter Marheine.

Nico Huber would like Edward O'Callaghan, Daniel Campello, Anastasia Klimchuk and Peter Marheine to review this change.

View Change

libflashrom: Avoid using the global layout

We used to borrow the global layout from the CLI here. Create
a dynamically allocated one instead that doesn't need special
treatment.

Change-Id: Ic48c9e73a3d00782f638f6ff41b620910b24ab6f
Signed-off-by: Nico Huber <nico.h@gmx.de>
---
M libflashrom.c
1 file changed, 2 insertions(+), 2 deletions(-)

git pull ssh://review.coreboot.org:29418/flashrom refs/changes/84/54284/1
diff --git a/libflashrom.c b/libflashrom.c
index 2577022..a8ae0df 100644
--- a/libflashrom.c
+++ b/libflashrom.c
@@ -522,9 +522,9 @@
int i;
char name[FMAP_STRLEN + 1];
const struct fmap_area *area;
- struct flashrom_layout *l = get_global_layout();
+ struct flashrom_layout *l;

- if (!fmap || !l)
+ if (!fmap || flashrom_layout_empty(&l))
return 1;

for (i = 0, area = fmap->areas; i < fmap->nareas; i++, area++) {

To view, visit change 54284. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ic48c9e73a3d00782f638f6ff41b620910b24ab6f
Gerrit-Change-Number: 54284
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h@gmx.de>
Gerrit-Reviewer: Anastasia Klimchuk <aklm@chromium.org>
Gerrit-Reviewer: Daniel Campello <campello@chromium.org>
Gerrit-Reviewer: Edward O'Callaghan <quasisec@chromium.org>
Gerrit-Reviewer: Peter Marheine <pmarheine@chromium.org>
Gerrit-Attention: Edward O'Callaghan <quasisec@chromium.org>
Gerrit-Attention: Daniel Campello <campello@chromium.org>
Gerrit-Attention: Anastasia Klimchuk <aklm@chromium.org>
Gerrit-Attention: Peter Marheine <pmarheine@chromium.org>
Gerrit-MessageType: newchange