Define all screens in enum ScreenIndex and use them

This enum seems partially complete, and not used in vboot_reference.
Complete it and use it.

BUG=chrome-os-partner:13492
BRANCH=snow
TEST=manual
Build and boot through to recovery on snow. Run through the various
screens and check that they still appear correctly.

Change-Id: Ifca54d072457d9a0396a38026f44f8334efb9cf5
Reviewed-on: https://gerrit.chromium.org/gerrit/32628
Reviewed-by: Mike Truty <truty@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Commit-Ready: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2012-09-07 16:53:00 -07:00
committed by Gerrit
parent 172360ec5d
commit 69f0d0bac9
2 changed files with 16 additions and 12 deletions

View File

@@ -84,10 +84,14 @@ typedef struct ScreenLayout {
/* Constants for screen index */
typedef enum ScreenIndex {
SCREEN_DEVELOPER_MODE = 0,
SCREEN_RECOVERY_MODE,
SCREEN_RECOVERY_NO_OS,
SCREEN_RECOVERY_MISSING_OS,
SCREEN_DEVELOPER_WARNING = 0,
SCREEN_RECOVERY_REMOVE,
SCREEN_RECOVERY_NO_GOOD,
SCREEN_RECOVERY_INSERT,
SCREEN_RECOVERY_TO_DEV,
SCREEN_DEVELOPER_TO_NORM,
SCREEN_WAIT,
SCREEN_TO_NORM_CONFIRMED,
MAX_VALID_SCREEN_INDEX,
SCREEN_BLANK = ~0UL,
} ScreenIndex;

View File

@@ -210,28 +210,28 @@ VbError_t VbDisplayScreenFromGBB(VbCommonParams* cparams, uint32_t screen,
* here is awful. */
switch (screen) {
case VB_SCREEN_DEVELOPER_WARNING:
screen_index = 0;
screen_index = SCREEN_DEVELOPER_WARNING;
break;
case VB_SCREEN_RECOVERY_REMOVE:
screen_index = 1;
screen_index = SCREEN_RECOVERY_REMOVE;
break;
case VB_SCREEN_RECOVERY_NO_GOOD:
screen_index = 2;
screen_index = SCREEN_RECOVERY_NO_GOOD;
break;
case VB_SCREEN_RECOVERY_INSERT:
screen_index = 3;
screen_index = SCREEN_RECOVERY_INSERT;
break;
case VB_SCREEN_RECOVERY_TO_DEV:
screen_index = 4;
screen_index = SCREEN_RECOVERY_TO_DEV;
break;
case VB_SCREEN_DEVELOPER_TO_NORM:
screen_index = 5;
screen_index = SCREEN_DEVELOPER_TO_NORM;
break;
case VB_SCREEN_WAIT:
screen_index = 6;
screen_index = SCREEN_WAIT;
break;
case VB_SCREEN_TO_NORM_CONFIRMED:
screen_index = 7;
screen_index = SCREEN_TO_NORM_CONFIRMED;
break;
case VB_SCREEN_BLANK:
case VB_SCREEN_DEVELOPER_EGG: