Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(319)

Unified Diff: host/lib/crossystem.c

Issue 6665005: Add check-value support and check /proc/cmdline for cros_nodebug (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/vboot_reference.git@master
Patch Set: Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | utility/crossystem_main.c » ('j') | utility/crossystem_main.c » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: host/lib/crossystem.c
diff --git a/host/lib/crossystem.c b/host/lib/crossystem.c
index 17f4f505c764c3677d785b4101fa729e2f9ad608..04dc9756446878651dc0226ffa226e5c716fce38 100644
--- a/host/lib/crossystem.c
+++ b/host/lib/crossystem.c
@@ -473,7 +473,7 @@ int VbGetCrosDebug(void) {
return 1; /* Developer firmware always allows debug. */
/* Normal new firmware, older ChromeOS firmware, or non-Chrome firmware.
- * For all these cases, check /proc/cmdline for cros_debug. */
+ * For all these cases, check /proc/cmdline for cros_[no]debug. */
f = fopen(KERNEL_CMDLINE_PATH, "rt");
if (f) {
if (NULL == fgets(buf, sizeof(buf), f))
@@ -483,6 +483,8 @@ int VbGetCrosDebug(void) {
for (t = strtok_r(buf, " ", &saveptr); t; t=strtok_r(NULL, " ", &saveptr)) {
if (0 == strcmp(t, "cros_debug"))
return 1;
+ else if (0 == strcmp(t, "cros_nodebug"))
+ return 0;
}
/* Normal new firmware or older Chrome OS firmware allows debug if the
« no previous file with comments | « no previous file | utility/crossystem_main.c » ('j') | utility/crossystem_main.c » ('J')

Powered by Google App Engine
This is Rietveld 408576698