MCPcopy Create free account
hub / github.com/coreboot/coreboot / print_menu

Function print_menu

payloads/coreinfo/coreinfo.c:120–142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118#endif
119
120static void print_menu(void)
121{
122 int j;
123 char menu[80];
124 char *ptr = menu;
125
126 wmove(menuwin, 1, 0);
127 for (j = 0; j < SCREEN_X; j++)
128 waddch(menuwin, ' ');
129
130 for (size_t i = 0; i < ARRAY_SIZE(categories); i++) {
131 if (categories[i].count == 0)
132 continue;
133
134 ptr += sprintf(ptr, "F%zu: %s ", i + 1, categories[i].name);
135 }
136
137 mvwprintw(menuwin, 1, 0, menu);
138
139#if CONFIG(SHOW_DATE_TIME)
140 print_time_and_date();
141#endif
142}
143
144static void center(int row, const char *str)
145{

Callers 1

loopFunction · 0.85

Calls 5

sprintfFunction · 0.85
print_time_and_dateFunction · 0.85
wmoveFunction · 0.50
waddchFunction · 0.50
mvwprintwFunction · 0.50

Tested by

no test coverage detected