common/flash.c: Rename flashwp parameter from [no]rw to [no]all
Saying that 'flashwp rw' was protecting RW region was not really
accurate: it was actually protecting the whole flash (which,
well, is actually equivalent as the RW can't be protected without
the RO).
Let's fix that in anticipation for adding a new flag that will
_really_ set the RW protection (and only that).
BRANCH=none
BUG=chrome-os-partner:61671
TEST=make buildall -j
Change-Id: Ic1c585622330b4976e71150f3a71b74a031a7694
Reviewed-on: https://chromium-review.googlesource.com/442264
Commit-Ready: Nicolas Boichat <drinkcat@chromium.org>
Tested-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Wai-Hong Tam <waihong@google.com>
diff --git a/common/flash.c b/common/flash.c
index 3555125..9b201ee 100644
--- a/common/flash.c
+++ b/common/flash.c
@@ -834,10 +834,10 @@
if (!strcasecmp(argv[1], "now"))
return flash_set_protect(EC_FLASH_PROTECT_ALL_NOW, -1);
- if (!strcasecmp(argv[1], "rw"))
+ if (!strcasecmp(argv[1], "all"))
return flash_set_protect(EC_FLASH_PROTECT_ALL_AT_BOOT, -1);
- if (!strcasecmp(argv[1], "norw"))
+ if (!strcasecmp(argv[1], "noall"))
return flash_set_protect(EC_FLASH_PROTECT_ALL_AT_BOOT, 0);
/* Do this last, since anything starting with 'n' means "no" */
@@ -848,7 +848,7 @@
return EC_ERROR_PARAM1;
}
DECLARE_CONSOLE_COMMAND(flashwp, command_flash_wp,
- "<BOOLEAN> | now | rw | norw",
+ "<BOOLEAN> | now | all | noall",
"Modify flash write protect");
/*****************************************************************************/