Support new flashmap layout in dev_debug_vboot.

Make dev_debug_vboot look first for the new section names, then the old ones.

Change-Id: I723f022bbbb23257c7c57db9543d7c35f524f95d

BUG=chromium-os:12611
TEST=manual

Rerun the steps that reproduce the problem as reported in the initial bug
report. You should see much more information.

Review URL: http://codereview.chromium.org/6621003
This commit is contained in:
Bill Richardson
2011-03-03 18:08:18 -08:00
parent f82f4ae920
commit ccdaa47b4d
2 changed files with 34 additions and 7 deletions

View File

@@ -57,7 +57,8 @@ static int dump_fmap(const void* ptr) {
progname, buf, strerror(errno));
retval = 1;
} else {
if (1 != fwrite(base_of_rom + ah->area_offset, ah->area_size, 1, fp)) {
if (ah->area_size &&
1 != fwrite(base_of_rom + ah->area_offset, ah->area_size, 1, fp)) {
fprintf(stderr, "%s: can't write %s: %s\n",
progname, buf, strerror(errno));
retval = 1;