summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShawn Nematbakhsh <shawnn@chromium.org>2014-12-12 17:47:35 (GMT)
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-12-18 18:48:02 (GMT)
commitb8d41c6c23f04269040793acc6d1181a43266846 (patch)
tree880736f62fa062bb7c03493956cc71600a9faff0
parent9a2955af49f7a8c4d00b771f886bc9be76c3dc57 (diff)
downloaddepthcharge-firmware-paine-6301.58.B.tar.gz
depthcharge-firmware-paine-6301.58.B.tar.xz
vboot: Modify VbExIsShutdownRequested to return shutdown request maskfirmware-yuna-6301.59.Bfirmware-paine-6301.58.B
Change to VbExIsShutdownRequested required to support GBB_FLAG_DISABLE_LID_SHUTDOWN in vboot. BUG=chromium:434462 BRANCH=Auron TEST=Manual on Auron, with corresponding vboot_reference change. Set GBB flag 0x1000 and disable powerd launch on boot. Close lid and issue 'reboot' command over ssh. Verify system reboots successfully into OS. CQ-DEPEND=CL:234995 Change-Id: Ie8019e0297e44e6922e5337fcfd07cd7d61d8639 Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/234994 Reviewed-by: Randall Spangler <rspangler@chromium.org> (cherry picked from commit 9d35da53cfac3d5a6e5cfdb5192f17496f8c8e4d) Reviewed-on: https://chromium-review.googlesource.com/234983
-rw-r--r--src/vboot/callbacks/misc.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/vboot/callbacks/misc.c b/src/vboot/callbacks/misc.c
index 0feddad..693524e 100644
--- a/src/vboot/callbacks/misc.c
+++ b/src/vboot/callbacks/misc.c
@@ -30,6 +30,7 @@ uint32_t VbExIsShutdownRequested(void)
{
int lidsw = flag_fetch(FLAG_LIDSW);
int pwrsw = flag_fetch(FLAG_PWRSW);
+ uint32_t shutdown_request = 0;
if (lidsw < 0 || pwrsw < 0) {
// There isn't any way to return an error, so just hang.
@@ -39,14 +40,14 @@ uint32_t VbExIsShutdownRequested(void)
if (!lidsw) {
printf("Lid is closed.\n");
- return 1;
+ shutdown_request |= VB_SHUTDOWN_REQUEST_LID_CLOSED;
}
if (pwrsw) {
printf("Power key pressed.\n");
- return 1;
+ shutdown_request |= VB_SHUTDOWN_REQUEST_POWER_BUTTON;
}
- return 0;
+ return shutdown_request;
}
VbError_t VbExDecompress(void *inbuf, uint32_t in_size,