diff options
Diffstat (limited to 'scripts/dtc/dtc.c')
-rw-r--r-- | scripts/dtc/dtc.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/scripts/dtc/dtc.c b/scripts/dtc/dtc.c index 2ef5e2e3dd38..a375683c1534 100644 --- a/scripts/dtc/dtc.c +++ b/scripts/dtc/dtc.c | |||
@@ -82,6 +82,8 @@ static void __attribute__ ((noreturn)) usage(void) | |||
82 | fprintf(stderr, "\t\tSet the physical boot cpu\n"); | 82 | fprintf(stderr, "\t\tSet the physical boot cpu\n"); |
83 | fprintf(stderr, "\t-f\n"); | 83 | fprintf(stderr, "\t-f\n"); |
84 | fprintf(stderr, "\t\tForce - try to produce output even if the input tree has errors\n"); | 84 | fprintf(stderr, "\t\tForce - try to produce output even if the input tree has errors\n"); |
85 | fprintf(stderr, "\t-i\n"); | ||
86 | fprintf(stderr, "\t\tAdd a path to search for include files\n"); | ||
85 | fprintf(stderr, "\t-s\n"); | 87 | fprintf(stderr, "\t-s\n"); |
86 | fprintf(stderr, "\t\tSort nodes and properties before outputting (only useful for\n\t\tcomparing trees)\n"); | 88 | fprintf(stderr, "\t\tSort nodes and properties before outputting (only useful for\n\t\tcomparing trees)\n"); |
87 | fprintf(stderr, "\t-v\n"); | 89 | fprintf(stderr, "\t-v\n"); |
@@ -91,6 +93,9 @@ static void __attribute__ ((noreturn)) usage(void) | |||
91 | fprintf(stderr, "\t\t\tlegacy - \"linux,phandle\" properties only\n"); | 93 | fprintf(stderr, "\t\t\tlegacy - \"linux,phandle\" properties only\n"); |
92 | fprintf(stderr, "\t\t\tepapr - \"phandle\" properties only\n"); | 94 | fprintf(stderr, "\t\t\tepapr - \"phandle\" properties only\n"); |
93 | fprintf(stderr, "\t\t\tboth - Both \"linux,phandle\" and \"phandle\" properties\n"); | 95 | fprintf(stderr, "\t\t\tboth - Both \"linux,phandle\" and \"phandle\" properties\n"); |
96 | fprintf(stderr, "\t-W [no-]<checkname>\n"); | ||
97 | fprintf(stderr, "\t-E [no-]<checkname>\n"); | ||
98 | fprintf(stderr, "\t\t\tenable or disable warnings and errors\n"); | ||
94 | exit(3); | 99 | exit(3); |
95 | } | 100 | } |
96 | 101 | ||
@@ -113,7 +118,7 @@ int main(int argc, char *argv[]) | |||
113 | minsize = 0; | 118 | minsize = 0; |
114 | padsize = 0; | 119 | padsize = 0; |
115 | 120 | ||
116 | while ((opt = getopt(argc, argv, "hI:O:o:V:d:R:S:p:fcqb:vH:s")) | 121 | while ((opt = getopt(argc, argv, "hI:O:o:V:d:R:S:p:fqb:i:vH:sW:E:")) |
117 | != EOF) { | 122 | != EOF) { |
118 | switch (opt) { | 123 | switch (opt) { |
119 | case 'I': | 124 | case 'I': |
@@ -149,6 +154,9 @@ int main(int argc, char *argv[]) | |||
149 | case 'b': | 154 | case 'b': |
150 | cmdline_boot_cpuid = strtoll(optarg, NULL, 0); | 155 | cmdline_boot_cpuid = strtoll(optarg, NULL, 0); |
151 | break; | 156 | break; |
157 | case 'i': | ||
158 | srcfile_add_search_path(optarg); | ||
159 | break; | ||
152 | case 'v': | 160 | case 'v': |
153 | printf("Version: %s\n", DTC_VERSION); | 161 | printf("Version: %s\n", DTC_VERSION); |
154 | exit(0); | 162 | exit(0); |
@@ -168,6 +176,14 @@ int main(int argc, char *argv[]) | |||
168 | sort = 1; | 176 | sort = 1; |
169 | break; | 177 | break; |
170 | 178 | ||
179 | case 'W': | ||
180 | parse_checks_option(true, false, optarg); | ||
181 | break; | ||
182 | |||
183 | case 'E': | ||
184 | parse_checks_option(false, true, optarg); | ||
185 | break; | ||
186 | |||
171 | case 'h': | 187 | case 'h': |
172 | default: | 188 | default: |
173 | usage(); | 189 | usage(); |
@@ -188,9 +204,6 @@ int main(int argc, char *argv[]) | |||
188 | if (minsize) | 204 | if (minsize) |
189 | fprintf(stderr, "DTC: Use of \"-S\" is deprecated; it will be removed soon, use \"-p\" instead\n"); | 205 | fprintf(stderr, "DTC: Use of \"-S\" is deprecated; it will be removed soon, use \"-p\" instead\n"); |
190 | 206 | ||
191 | fprintf(stderr, "DTC: %s->%s on file \"%s\"\n", | ||
192 | inform, outform, arg); | ||
193 | |||
194 | if (depname) { | 207 | if (depname) { |
195 | depfile = fopen(depname, "w"); | 208 | depfile = fopen(depname, "w"); |
196 | if (!depfile) | 209 | if (!depfile) |