Lines Matching refs:entry
61 struct bootmenu_entry *entry = data; in bootmenu_print_entry() local
62 int reverse = (entry->menu->active == entry->num); in bootmenu_print_entry()
68 printf(ANSI_CURSOR_POSITION, entry->num + 4, 1); in bootmenu_print_entry()
75 puts(entry->title); in bootmenu_print_entry()
257 struct bootmenu_entry *entry; in bootmenu_create() local
274 entry = malloc(sizeof(struct bootmenu_entry)); in bootmenu_create()
275 if (!entry) in bootmenu_create()
279 entry->title = malloc(len + 1); in bootmenu_create()
280 if (!entry->title) { in bootmenu_create()
281 free(entry); in bootmenu_create()
284 memcpy(entry->title, option, len); in bootmenu_create()
285 entry->title[len] = 0; in bootmenu_create()
288 entry->command = malloc(len + 1); in bootmenu_create()
289 if (!entry->command) { in bootmenu_create()
290 free(entry->title); in bootmenu_create()
291 free(entry); in bootmenu_create()
294 memcpy(entry->command, sep + 1, len); in bootmenu_create()
295 entry->command[len] = 0; in bootmenu_create()
297 sprintf(entry->key, "%d", i); in bootmenu_create()
299 entry->num = i; in bootmenu_create()
300 entry->menu = menu; in bootmenu_create()
301 entry->next = NULL; in bootmenu_create()
304 menu->first = entry; in bootmenu_create()
306 iter->next = entry; in bootmenu_create()
308 iter = entry; in bootmenu_create()
317 entry = malloc(sizeof(struct bootmenu_entry)); in bootmenu_create()
318 if (!entry) in bootmenu_create()
321 entry->title = strdup("U-Boot console"); in bootmenu_create()
322 if (!entry->title) { in bootmenu_create()
323 free(entry); in bootmenu_create()
327 entry->command = strdup(""); in bootmenu_create()
328 if (!entry->command) { in bootmenu_create()
329 free(entry->title); in bootmenu_create()
330 free(entry); in bootmenu_create()
334 sprintf(entry->key, "%d", i); in bootmenu_create()
336 entry->num = i; in bootmenu_create()
337 entry->menu = menu; in bootmenu_create()
338 entry->next = NULL; in bootmenu_create()
341 menu->first = entry; in bootmenu_create()
343 iter->next = entry; in bootmenu_create()
345 iter = entry; in bootmenu_create()
439 struct bootmenu_entry *entry; in menu_display_statusline() local
442 if (menu_default_choice(m, (void *)&entry) < 0) in menu_display_statusline()
445 menu = entry->menu; in menu_display_statusline()