summaryrefslogtreecommitdiffstats
path: root/commands/hab.c
diff options
context:
space:
mode:
Diffstat (limited to 'commands/hab.c')
-rw-r--r--commands/hab.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/commands/hab.c b/commands/hab.c
index 97a1701fa5..8ae943a4c8 100644
--- a/commands/hab.c
+++ b/commands/hab.c
@@ -58,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");