summaryrefslogtreecommitdiffstats
path: root/commands/hab.c
diff options
context:
space:
mode:
Diffstat (limited to 'commands/hab.c')
-rw-r--r--commands/hab.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/commands/hab.c b/commands/hab.c
index 0d7ee8e76c..8ae943a4c8 100644
--- a/commands/hab.c
+++ b/commands/hab.c
@@ -1,13 +1,4 @@
-/*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; version 2.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- */
+// SPDX-License-Identifier: GPL-2.0-only
#include <common.h>
#include <command.h>
@@ -67,7 +58,13 @@ static int do_hab(int argc, char *argv[])
printf("%02x", srk[i]);
printf("\n");
- if (imx_hab_device_locked_down())
+ ret = imx_hab_device_locked_down();
+ if (ret < 0) {
+ printf("failed to determine lockdown mode: '%pe'\n", ERR_PTR(ret));
+ return ret;
+ }
+
+ if (ret)
printf("secure mode\n");
else
printf("devel mode\n");