diff options
author | Furquan Shaikh <furquan@google.com> | 2015-07-30 13:38:24 -0700 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2015-08-01 02:51:38 +0000 |
commit | 8804be8cbeccfca8085a45c76c0d510f030d9061 (patch) | |
tree | f44f8c919a125880d3ed2630da0a27a0be3ecaa7 /host | |
parent | 14f122601f45d95a0162be8ad1456d9824cb80f9 (diff) | |
download | vboot-8804be8cbeccfca8085a45c76c0d510f030d9061.tar.gz |
VbNvStorage: Add flags for misc settings
1. Change offset 8 to hold all misc settings (fastboot, boot_on_ac
detect) instead of only fastboot settings.
2. Add flag to hold state of boot_on_ac_detect (If set to 1, AP should
start booting as soon as AC is connected in off-state).
BUG=chrome-os-partner:41680
BRANCH=None
TEST=Compiles successfully. make runtests successful.
Change-Id: I64b3fc69bd52cbcaf5899c953ccafa2e81b5b8a5
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/289900
Trybot-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
Diffstat (limited to 'host')
-rw-r--r-- | host/lib/crossystem.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/host/lib/crossystem.c b/host/lib/crossystem.c index 8ac37cc7..268ecdf1 100644 --- a/host/lib/crossystem.c +++ b/host/lib/crossystem.c @@ -533,10 +533,10 @@ int VbGetSystemPropertyInt(const char* name) { value = GetVdatInt(VDAT_INT_TRIED_FIRMWARE_B); } else if (!strcasecmp(name,"recovery_reason")) { value = GetVdatInt(VDAT_INT_RECOVERY_REASON); - } - /* Fastboot-related parameters */ - else if (!strcasecmp(name, "fastboot_unlock_in_fw")) { + } else if (!strcasecmp(name, "fastboot_unlock_in_fw")) { value = VbGetNvStorage(VBNV_FASTBOOT_UNLOCK_IN_FW); + } else if (!strcasecmp(name, "boot_on_ac_detect")) { + value = VbGetNvStorage(VBNV_BOOT_ON_AC_DETECT); } return value; @@ -663,6 +663,8 @@ int VbSetSystemPropertyInt(const char* name, int value) { return VbSetNvStorage_WithBackup(VBNV_DEV_BOOT_FASTBOOT_FULL_CAP, value); } else if (!strcasecmp(name, "fastboot_unlock_in_fw")) { return VbSetNvStorage_WithBackup(VBNV_FASTBOOT_UNLOCK_IN_FW, value); + } else if (!strcasecmp(name, "boot_on_ac_detect")) { + return VbSetNvStorage_WithBackup(VBNV_BOOT_ON_AC_DETECT, value); } return -1; |