mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-11-25 18:55:24 +00:00
Addtional -h args to dump_fmap will ignore overlap errors.
Snow was built with overlapping regions in its FMAP, so when we use dump_fmap -h to see what the layout is, it complains and dies. This change lets it keep going if you give it multiple -h args. Nothing else is different. BUG=none BRANCH=none TEST=manual This complains and quits: dump_fmap -h image-snow.bin This complains and keeps going: dump_fmap -hh image-snow.bin Change-Id: Ia4592b9ba6963b8c5064dd6f51625e9495db2845 Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/39551 Reviewed-by: Randall Spangler <rspangler@chromium.org>
This commit is contained in:
@@ -22,6 +22,7 @@ enum { FMT_NORMAL, FMT_PRETTY, FMT_FLASHROM, FMT_HUMAN };
|
||||
/* global variables */
|
||||
static int opt_extract = 0;
|
||||
static int opt_format = FMT_NORMAL;
|
||||
static int opt_overlap = 0;
|
||||
static char *progname;
|
||||
static void *base_of_rom;
|
||||
static int opt_gaps = 0;
|
||||
@@ -314,7 +315,10 @@ static int human_fmap(void *p)
|
||||
all_nodes[i].start, all_nodes[i].end);
|
||||
printf(" %s: 0x%x - 0x%x\n", all_nodes[j].name,
|
||||
all_nodes[j].start, all_nodes[j].end);
|
||||
if (opt_overlap < 2) {
|
||||
printf("Use more -h args to ignore this error\n");
|
||||
errorcnt++;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (encloses(j, i) && all_nodes[j].size < all_nodes[k].size)
|
||||
@@ -378,6 +382,7 @@ int main(int argc, char *argv[])
|
||||
/* fallthrough */
|
||||
case 'h':
|
||||
opt_format = FMT_HUMAN;
|
||||
opt_overlap++;
|
||||
break;
|
||||
case '?':
|
||||
fprintf(stderr, "%s: unrecognized switch: -%c\n",
|
||||
|
||||
Reference in New Issue
Block a user