Skip to content
This repository was archived by the owner on Aug 13, 2025. It is now read-only.

Commit 7487038

Browse files
committed
FastbootMenu: use different colors
Use yellow for Fastboot mode and conditionalize color for DEVICE STATE: - green when locked - red when unlocked Change-Id: I970af3e2dfd1e84a04f4812a61f44ea82cc456e6 Signed-off-by: Alexander Martinz <[email protected]>
1 parent 80b2e2e commit 7487038

File tree

1 file changed

+18
-8
lines changed

1 file changed

+18
-8
lines changed

QcomModulePkg/Library/BootLib/FastbootMenu.c

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,9 @@ STATIC MENU_MSG_INFO mFastbootCommonMsgInfo[] = {
9696
COMMON,
9797
0,
9898
NOACTION},
99-
{{"FastBoot Mode"},
99+
{{"Fastboot mode\n\n"},
100100
COMMON_FACTOR,
101-
BGR_RED,
101+
BGR_YELLOW,
102102
BGR_BLACK,
103103
COMMON,
104104
0,
@@ -159,13 +159,20 @@ STATIC MENU_MSG_INFO mFastbootCommonMsgInfo[] = {
159159
COMMON,
160160
0,
161161
NOACTION},
162-
{{"DEVICE STATE - "},
162+
{{"\nDEVICE STATE - unlocked"},
163163
COMMON_FACTOR,
164164
BGR_RED,
165165
BGR_BLACK,
166166
COMMON,
167167
0,
168168
NOACTION},
169+
{{"\nDEVICE STATE - locked"},
170+
COMMON_FACTOR,
171+
BGR_GREEN,
172+
BGR_BLACK,
173+
COMMON,
174+
0,
175+
NOACTION},
169176
};
170177

171178
/**
@@ -323,11 +330,14 @@ FastbootMenuShowScreen (OPTION_MENU_INFO *OptionMenuInfo)
323330
IsSecureBootEnabled () ? AsciiStrLen ("yes") : AsciiStrLen ("no"));
324331
break;
325332
case 10:
326-
/* Get device status */
327-
AsciiStrnCatS (
328-
mFastbootCommonMsgInfo[i].Msg, sizeof (mFastbootCommonMsgInfo[i].Msg),
329-
IsUnlocked () ? "unlocked" : "locked",
330-
IsUnlocked () ? AsciiStrLen ("unlocked") : AsciiStrLen ("locked"));
333+
/* Get device status, only show when unlocked */
334+
if (!IsUnlocked ())
335+
continue;
336+
break;
337+
case 11:
338+
/* Get device status, only show when locked */
339+
if (IsUnlocked ())
340+
continue;
331341
break;
332342
}
333343

0 commit comments

Comments
 (0)