From d5399197e9e0d8bad13de5c41df3b93804c0558a Mon Sep 17 00:00:00 2001 From: David Gibson Date: Sun, 8 Jul 2012 23:25:22 +1000 Subject: Allow toggling of semantic checks This patch adds -W and -E options to dtc which allow toggling on and off of the various built in semantic checks on the tree. Signed-off-by: David Gibson --- dtc.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'dtc.c') diff --git a/dtc.c b/dtc.c index bee5085..a375683 100644 --- a/dtc.c +++ b/dtc.c @@ -93,6 +93,9 @@ static void __attribute__ ((noreturn)) usage(void) fprintf(stderr, "\t\t\tlegacy - \"linux,phandle\" properties only\n"); fprintf(stderr, "\t\t\tepapr - \"phandle\" properties only\n"); fprintf(stderr, "\t\t\tboth - Both \"linux,phandle\" and \"phandle\" properties\n"); + fprintf(stderr, "\t-W [no-]\n"); + fprintf(stderr, "\t-E [no-]\n"); + fprintf(stderr, "\t\t\tenable or disable warnings and errors\n"); exit(3); } @@ -115,7 +118,7 @@ int main(int argc, char *argv[]) minsize = 0; padsize = 0; - while ((opt = getopt(argc, argv, "hI:O:o:V:d:R:S:p:fqb:i:vH:s")) + while ((opt = getopt(argc, argv, "hI:O:o:V:d:R:S:p:fqb:i:vH:sW:E:")) != EOF) { switch (opt) { case 'I': @@ -173,6 +176,14 @@ int main(int argc, char *argv[]) sort = 1; break; + case 'W': + parse_checks_option(true, false, optarg); + break; + + case 'E': + parse_checks_option(false, true, optarg); + break; + case 'h': default: usage(); -- cgit v1.2.3