diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2012-07-08 23:25:22 +1000 |
---|---|---|
committer | Jon Loeliger <jdl@jdl.com> | 2012-07-08 13:45:21 -0500 |
commit | d5399197e9e0d8bad13de5c41df3b93804c0558a (patch) | |
tree | 50dd91bf26614be36424bfd563d93953d185de5e /dtc.c | |
parent | 511dedd40f0372cd7c85e3d4c66553f5829142b7 (diff) | |
download | dtc-d5399197e9e0d8bad13de5c41df3b93804c0558a.zip dtc-d5399197e9e0d8bad13de5c41df3b93804c0558a.tar.gz dtc-d5399197e9e0d8bad13de5c41df3b93804c0558a.tar.bz2 |
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 <david@gibson.dropbear.id.au>
Diffstat (limited to 'dtc.c')
-rw-r--r-- | dtc.c | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -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-]<checkname>\n"); + fprintf(stderr, "\t-E [no-]<checkname>\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(); |