summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/2lib/2ui_screens.c9
-rw-r--r--firmware/2lib/include/2api.h2
-rw-r--r--tests/vb2_ui_action_tests.c13
-rw-r--r--tests/vb2_ui_utility_tests.c8
4 files changed, 7 insertions, 25 deletions
diff --git a/firmware/2lib/2ui_screens.c b/firmware/2lib/2ui_screens.c
index e7915817..5c9518fe 100644
--- a/firmware/2lib/2ui_screens.c
+++ b/firmware/2lib/2ui_screens.c
@@ -150,14 +150,6 @@ static vb2_error_t log_page_next_action(struct vb2_ui_context *ui)
})
/******************************************************************************/
-/* VB2_SCREEN_BLANK */
-
-static const struct vb2_screen_info blank_screen = {
- .id = VB2_SCREEN_BLANK,
- .name = "Blank",
-};
-
-/******************************************************************************/
/* VB2_SCREEN_LANGUAGE_SELECT */
static vb2_error_t language_select_action(struct vb2_ui_context *ui)
@@ -1219,7 +1211,6 @@ static const struct vb2_screen_info diagnostics_memory_full_screen = {
* screen, based on the menu information passed from vboot.
*/
static const struct vb2_screen_info *screens[] = {
- &blank_screen,
&language_select_screen,
&recovery_broken_screen,
&advanced_options_screen,
diff --git a/firmware/2lib/include/2api.h b/firmware/2lib/include/2api.h
index 255e2b45..218a416c 100644
--- a/firmware/2lib/include/2api.h
+++ b/firmware/2lib/include/2api.h
@@ -1304,8 +1304,6 @@ vb2_error_t vb2ex_ec_battery_cutoff(void);
/* Screens. */
enum vb2_screen {
- /* Blank screen */
- VB2_SCREEN_BLANK = 0x0,
/* Wait screen for EC sync and AUXFW sync */
VB2_SCREEN_FIRMWARE_SYNC = 0x100,
/* Broken screen */
diff --git a/tests/vb2_ui_action_tests.c b/tests/vb2_ui_action_tests.c
index 8e27548e..42546844 100644
--- a/tests/vb2_ui_action_tests.c
+++ b/tests/vb2_ui_action_tests.c
@@ -19,8 +19,9 @@
/* Mock screen index for testing screen utility functions. */
#define MOCK_NO_SCREEN 0xef00
-#define MOCK_SCREEN_BASE 0xef10
-#define MOCK_SCREEN_MENU 0xef11
+#define MOCK_SCREEN_BLANK 0xef10
+#define MOCK_SCREEN_BASE 0xef11
+#define MOCK_SCREEN_MENU 0xef12
#define MOCK_SCREEN_TARGET0 0xef20
#define MOCK_SCREEN_TARGET1 0xef21
#define MOCK_SCREEN_TARGET2 0xef22
@@ -127,7 +128,7 @@ static vb2_error_t mock_action_msleep(struct vb2_ui_context *ui)
/* Mock screens */
struct vb2_screen_info mock_screen_temp;
const struct vb2_screen_info mock_screen_blank = {
- .id = VB2_SCREEN_BLANK,
+ .id = MOCK_SCREEN_BLANK,
.name = "mock_screen_blank",
};
const struct vb2_screen_info mock_screen_base = {
@@ -393,7 +394,7 @@ const struct vb2_screen_info *vb2_get_screen_info(enum vb2_screen screen)
mock_get_screen_info_called++;
switch ((int)screen) {
- case VB2_SCREEN_BLANK:
+ case MOCK_SCREEN_BLANK:
return &mock_screen_blank;
case MOCK_SCREEN_BASE:
return &mock_screen_base;
@@ -898,13 +899,13 @@ static void ui_loop_tests(void)
reset_common_data();
mock_calls_until_shutdown = -1;
mock_action_countdown_limit = 10;
- TEST_EQ(ui_loop(ctx, VB2_SCREEN_BLANK, mock_action_countdown),
+ TEST_EQ(ui_loop(ctx, MOCK_SCREEN_BLANK, mock_action_countdown),
VB2_SUCCESS, "global action");
TEST_EQ(mock_action_called, 10, " action called");
/* Global action can change screen */
reset_common_data();
- TEST_EQ(ui_loop(ctx, VB2_SCREEN_BLANK, mock_action_screen_change),
+ TEST_EQ(ui_loop(ctx, MOCK_SCREEN_BLANK, mock_action_screen_change),
VB2_REQUEST_SHUTDOWN, "global action can change screen");
DISPLAYED_PASS();
DISPLAYED_EQ("change to mock_screen_base", MOCK_SCREEN_BASE,
diff --git a/tests/vb2_ui_utility_tests.c b/tests/vb2_ui_utility_tests.c
index 85a514cc..1a7b19ea 100644
--- a/tests/vb2_ui_utility_tests.c
+++ b/tests/vb2_ui_utility_tests.c
@@ -43,10 +43,6 @@ static vb2_error_t mock_action_base(struct vb2_ui_context *ui)
}
/* Mock screens */
-struct vb2_screen_info mock_screen_blank = {
- .id = VB2_SCREEN_BLANK,
- .name = "mock_screen_blank",
-};
struct vb2_screen_info mock_screen_base = {
.id = MOCK_SCREEN_BASE,
.name = "mock_screen_base: menuless screen",
@@ -125,8 +121,6 @@ static void reset_common_data(void)
mock_action_called = 0;
/* Reset init and action functions */
- mock_screen_blank.init = NULL;
- mock_screen_blank.action = NULL;
mock_screen_base.init = NULL;
mock_screen_base.action = NULL;
mock_screen_menu.init = NULL;
@@ -157,8 +151,6 @@ uint32_t VbExIsShutdownRequested(void)
const struct vb2_screen_info *vb2_get_screen_info(enum vb2_screen screen)
{
switch ((int)screen) {
- case VB2_SCREEN_BLANK:
- return &mock_screen_blank;
case MOCK_SCREEN_BASE:
return &mock_screen_base;
case MOCK_SCREEN_MENU: