summaryrefslogtreecommitdiff
path: root/common/ec_comm.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/ec_comm.c')
-rw-r--r--common/ec_comm.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/common/ec_comm.c b/common/ec_comm.c
index eaf26b4509..18ea225ef9 100644
--- a/common/ec_comm.c
+++ b/common/ec_comm.c
@@ -323,20 +323,18 @@ static int command_ec_comm(int argc, char **argv)
}
if (argc > 1) {
-#ifdef CR50_RELAXED
- if (!strcasecmp(argv[1], "corrupt"))
- ec_efs_corrupt_hash();
- else if (!strcasecmp(argv[1], "reload"))
- ec_efs_refresh();
- else
+ if (!strcasecmp(argv[1], "corrupt")) {
+ int result = ec_efs_corrupt_hash();
+
+ if (result != EC_SUCCESS)
+ return result;
+ } else {
return EC_ERROR_PARAM1;
+ }
/*
* let's keep processing so that we can see how the context
* values are changed.
*/
-#else
- return EC_ERROR_PARAM_COUNT;
-#endif
}
/*
@@ -361,12 +359,6 @@ static int command_ec_comm(int argc, char **argv)
return EC_SUCCESS;
}
DECLARE_SAFE_CONSOLE_COMMAND(ec_comm, command_ec_comm,
-#ifdef CR50_RELAXED
- "[corrupt|reload]",
- "Dump EC-CR50-comm status, or corrupt ECRW hash,"
- "or reload it"
-#else
- NULL,
+ "[corrupt]",
"Dump EC-CR50-comm status"
-#endif
);