summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/fit_check_sign.c9
-rw-r--r--tools/fit_info.c12
2 files changed, 21 insertions, 0 deletions
diff --git a/tools/fit_check_sign.c b/tools/fit_check_sign.c
index af257cc..e1198bc 100644
--- a/tools/fit_check_sign.c
+++ b/tools/fit_check_sign.c
@@ -62,6 +62,15 @@ int main(int argc, char **argv)
break;
}
+ if (!fdtfile) {
+ fprintf(stderr, "%s: Missing fdt file\n", *argv);
+ usage(*argv);
+ }
+ if (!keyfile) {
+ fprintf(stderr, "%s: Missing key file\n", *argv);
+ usage(*argv);
+ }
+
ffd = mmap_fdt(cmdname, fdtfile, 0, &fit_blob, &fsbuf, false);
if (ffd < 0)
return EXIT_FAILURE;
diff --git a/tools/fit_info.c b/tools/fit_info.c
index afbed7b..481ac6d 100644
--- a/tools/fit_info.c
+++ b/tools/fit_info.c
@@ -68,6 +68,18 @@ int main(int argc, char **argv)
break;
}
+ if (!fdtfile) {
+ fprintf(stderr, "%s: Missing fdt file\n", *argv);
+ usage(*argv);
+ }
+ if (!nodename) {
+ fprintf(stderr, "%s: Missing node name\n", *argv);
+ usage(*argv);
+ }
+ if (!propertyname) {
+ fprintf(stderr, "%s: Missing property name\n", *argv);
+ usage(*argv);
+ }
ffd = mmap_fdt(cmdname, fdtfile, 0, &fit_blob, &fsbuf, false);
if (ffd < 0) {