summaryrefslogtreecommitdiff
path: root/usr.bin/dtc/dtc.cc
diff options
context:
space:
mode:
authorDavid Chisnall <theraven@FreeBSD.org>2013-08-19 12:37:13 +0000
committerDavid Chisnall <theraven@FreeBSD.org>2013-08-19 12:37:13 +0000
commit88169e03881a0df6fc170475dcb9317fa9267e09 (patch)
treeb8f9cd2ad6c4fae5354dc0d9ad5c112b31c3da31 /usr.bin/dtc/dtc.cc
parent678d7b9461814c1711441d1a480c126cd8166f3e (diff)
downloadsrc-test2-88169e03881a0df6fc170475dcb9317fa9267e09.tar.gz
src-test2-88169e03881a0df6fc170475dcb9317fa9267e09.zip
Notes
Diffstat (limited to 'usr.bin/dtc/dtc.cc')
-rw-r--r--usr.bin/dtc/dtc.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/usr.bin/dtc/dtc.cc b/usr.bin/dtc/dtc.cc
index cffb3eb3cc32..c04f01616805 100644
--- a/usr.bin/dtc/dtc.cc
+++ b/usr.bin/dtc/dtc.cc
@@ -100,7 +100,7 @@ main(int argc, char **argv)
clock_t c0 = clock();
class device_tree tree;
fdt::checking::check_manager checks;
- const char *options = "hqI:O:o:V:d:R:S:p:b:fisvH:W:E:D";
+ const char *options = "hqI:O:o:V:d:R:S:p:b:fisvH:W:E:DP:";
// Don't forget to update the man page if any more options are added.
while ((ch = getopt(argc, argv, options)) != -1)
@@ -267,6 +267,13 @@ main(int argc, char **argv)
case 'p':
tree.set_blob_padding(strtoll(optarg, 0, 10));
break;
+ case 'P':
+ if (!tree.parse_define(optarg))
+ {
+ fprintf(stderr, "Invalid predefine value %s\n",
+ optarg);
+ }
+ break;
default:
fprintf(stderr, "Unknown option %c\n", ch);
return EXIT_FAILURE;