summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhailfinger <hailfinger@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2012-06-16 00:11:16 +0000
committerhailfinger <hailfinger@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2012-06-16 00:11:16 +0000
commita1623220681e82c506fc6c3fa013aef1eef7f62e (patch)
treef9a0004150190d234c13927e173878f302251412
parent342a980fe30b3034313f09644ca4ed7545e09da0 (diff)
downloadflashrom-a1623220681e82c506fc6c3fa013aef1eef7f62e.tar.gz
Remove exit() call from show_id
The only caller is able to check the return code and handle it correctly. Signed-off-by: Niklas Söderlund <niso@kth.se> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1545 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
-rw-r--r--flashrom.c5
-rw-r--r--layout.c2
2 files changed, 5 insertions, 2 deletions
diff --git a/flashrom.c b/flashrom.c
index 518e3d4..0fdcd5f 100644
--- a/flashrom.c
+++ b/flashrom.c
@@ -1787,7 +1787,10 @@ int doit(struct flashctx *flash, int force, const char *filename, int read_it,
#if CONFIG_INTERNAL == 1
if (programmer == PROGRAMMER_INTERNAL)
- show_id(newcontents, size, force);
+ if (show_id(newcontents, size, force)) {
+ ret = 1;
+ goto out;
+ }
#endif
}
diff --git a/layout.c b/layout.c
index 379ee8c..0512638 100644
--- a/layout.c
+++ b/layout.c
@@ -137,7 +137,7 @@ int show_id(uint8_t *bios, int size, int force)
"\n\n",
mainboard_vendor, mainboard_part, lb_vendor,
lb_part);
- exit(1);
+ return 1;
}
}