summaryrefslogtreecommitdiff
path: root/common/system.c
diff options
context:
space:
mode:
authorBill Richardson <wfrichar@chromium.org>2016-08-25 15:10:55 -0700
committerBill Richardson <wfrichar@chromium.org>2016-08-31 17:20:26 +0000
commit8c4421759d127f23d9745c6b495e5d69e171b9a6 (patch)
treefeec0fdee8a19e56ac86c894c3fd69cf85b3bcfe /common/system.c
parentada6b3d5d5c058d38b7a73da48d3173c6c453da0 (diff)
downloadchrome-ec-8c4421759d127f23d9745c6b495e5d69e171b9a6.tar.gz
Cr50: Mark several console commands as safe
Even when CONFIG_RESTRICTED_CONSOLE_COMMANDS is enabled, there are many commands that can't do anything dangerous. This marks some of those commands as safe to use, even when restrictions are enforced. I'm only marking commands that are used by the Cr50, since that's the only board that has restrictions. BUG=chrome-os-partner:55322 BRANCH=none TEST=make buildall, test on Cr50 hardware Change-Id: I6289d332830175b6adcb6b20cb4c21d01d27a25e Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/376188 Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'common/system.c')
-rw-r--r--common/system.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/common/system.c b/common/system.c
index 8e26503193..b216603157 100644
--- a/common/system.c
+++ b/common/system.c
@@ -852,9 +852,9 @@ static int command_sysinfo(int argc, char **argv)
return EC_SUCCESS;
}
-DECLARE_CONSOLE_COMMAND(sysinfo, command_sysinfo,
- NULL,
- "Print system info");
+DECLARE_SAFE_CONSOLE_COMMAND(sysinfo, command_sysinfo,
+ NULL,
+ "Print system info");
#ifdef CONFIG_CMD_SCRATCHPAD
static int command_scratchpad(int argc, char **argv)
@@ -998,9 +998,9 @@ static int command_version(int argc, char **argv)
return EC_SUCCESS;
}
-DECLARE_CONSOLE_COMMAND(version, command_version,
- NULL,
- "Print versions");
+DECLARE_SAFE_CONSOLE_COMMAND(version, command_version,
+ NULL,
+ "Print versions");
static int command_sysjump(int argc, char **argv)
{
@@ -1081,9 +1081,9 @@ static int command_system_lock(int argc, char **argv)
force_locked = 1;
return EC_SUCCESS;
}
-DECLARE_CONSOLE_COMMAND(syslock, command_system_lock,
- NULL,
- "Lock the system, even if WP is disabled");
+DECLARE_SAFE_CONSOLE_COMMAND(syslock, command_system_lock,
+ NULL,
+ "Lock the system, even if WP is disabled");
#ifdef CONFIG_LOW_POWER_IDLE
/**