Lines Matching defs:entry
333 /* select entry by number key */
400 Print(L"config entry count: %d\n", config->entry_count);
401 Print(L"entry selected idx: %d\n", config->idx_default);
403 Print(L"entry EFI var idx: %d\n", config->idx_default_efivar);
423 ConfigEntry *entry;
428 entry = config->entries[i];
429 Print(L"config entry: %d/%d\n", i+1, config->entry_count);
430 if (entry->file)
431 Print(L"file '%s'\n", entry->file);
432 Print(L"title show '%s'\n", entry->title_show);
433 if (entry->title)
434 Print(L"title '%s'\n", entry->title);
435 if (entry->version)
436 Print(L"version '%s'\n", entry->version);
437 if (entry->machine_id)
438 Print(L"machine-id '%s'\n", entry->machine_id);
439 if (entry->device) {
443 device_path = DevicePathFromHandle(entry->device);
450 if (entry->loader)
451 Print(L"loader '%s'\n", entry->loader);
452 if (entry->options)
453 Print(L"options '%s'\n", entry->options);
454 Print(L"auto-select %s\n", yes_no(!entry->no_autoselect));
455 if (entry->call)
525 /* length of the longest entry */
723 /* store the selected entry in a persistent EFI variable */
726 status = StrDuplicate(L"Default boot entry selected.");
728 /* clear the default entry EFI variable */
731 status = StrDuplicate(L"Default boot entry cleared.");
799 /* jump with a hotkey directly to a matching entry */
833 static VOID config_add_entry(Config *config, ConfigEntry *entry) {
844 config->entries[config->entry_count++] = entry;
847 static VOID config_entry_free(ConfigEntry *entry) {
848 FreePool(entry->title_show);
849 FreePool(entry->title);
850 FreePool(entry->machine_id);
851 FreePool(entry->loader);
852 FreePool(entry->options);
1009 ConfigEntry *entry;
1016 entry = AllocateZeroPool(sizeof(ConfigEntry));
1021 FreePool(entry->title);
1022 entry->title = stra_to_str(value);
1027 FreePool(entry->version);
1028 entry->version = stra_to_str(value);
1033 FreePool(entry->machine_id);
1034 entry->machine_id = stra_to_str(value);
1039 FreePool(entry->loader);
1040 entry->type = LOADER_LINUX;
1041 entry->loader = stra_to_path(value);
1042 entry->key = 'l';
1047 entry->type = LOADER_EFI;
1048 FreePool(entry->loader);
1049 entry->loader = stra_to_path(value);
1051 /* do not add an entry for ourselves */
1052 if (StriCmp(entry->loader, loaded_image_path) == 0) {
1053 entry->type = LOADER_UNDEFINED;
1060 /* do not add an entry for an EFI image of architecture not matching with that of the image */
1062 entry->type = LOADER_UNDEFINED;
1088 if (entry->options) {
1091 s = PoolPrint(L"%s %s", entry->options, new);
1092 FreePool(entry->options);
1093 entry->options = s;
1095 entry->options = new;
1103 if (entry->type == LOADER_UNDEFINED) {
1104 config_entry_free(entry);
1106 FreePool(entry);
1111 if (entry->type == LOADER_LINUX && initrd) {
1112 if (entry->options) {
1115 s = PoolPrint(L"%s %s", initrd, entry->options);
1116 FreePool(entry->options);
1117 entry->options = s;
1119 entry->options = initrd;
1125 entry->device = device;
1126 entry->file = StrDuplicate(file);
1127 len = StrLen(entry->file);
1130 entry->file[len - 5] = '\0';
1131 StrLwr(entry->file);
1133 config_add_entry(config, entry);
1205 ConfigEntry *entry;
1209 entry = config->entries[k];
1211 config->entries[k+1] = entry;
1225 * The EFI variable to specify a boot entry for the next, and only the
1248 * The EFI variable to select the default boot entry overrides the
1250 * the 'd' key in the loader selection menu, the entry is marked with
1276 * entry (largest number) matching the given pattern.
1290 /* select the last suitable entry */
1299 /* no entry found */
1415 ConfigEntry *entry;
1417 entry = AllocateZeroPool(sizeof(ConfigEntry));
1418 entry->title = StrDuplicate(title);
1419 entry->call = call;
1420 entry->no_autoselect = TRUE;
1421 config_add_entry(config, entry);
1427 ConfigEntry *entry;
1429 entry = AllocateZeroPool(sizeof(ConfigEntry));
1430 entry->type = type;
1431 entry->title = StrDuplicate(title);
1432 entry->device = device;
1433 entry->loader = StrDuplicate(loader);
1434 entry->file = StrDuplicate(file);
1435 StrLwr(entry->file);
1436 entry->key = key;
1437 config_add_entry(config, entry);
1439 return entry;
1445 ConfigEntry *entry;
1448 /* do not add an entry for ourselves */
1458 entry = config_entry_add_loader(config, device, LOADER_UNDEFINED, file, key, title, loader);
1459 if (!entry)
1463 entry->no_autoselect = TRUE;
1498 ConfigEntry *entry;
1584 entry = config_entry_add_loader(config, loaded_image->DeviceHandle, LOADER_LINUX, conf, 'l', os_name, path);
1591 entry->options = cmdline;
1609 static EFI_STATUS image_start(EFI_HANDLE parent_image, const Config *config, const ConfigEntry *entry) {
1615 path = FileDevicePath(entry->device, entry->loader);
1624 Print(L"Error loading %s: %r", entry->loader, err);
1631 else if (entry->options)
1632 options = entry->options;
1777 /* select entry by configured pattern or EFI LoaderDefaultEntry= variable*/
1780 /* if no configured entry to select from was found, enable the menu */
1787 /* select entry or show menu when key is pressed or timeout is set */
1806 ConfigEntry *entry;
1808 entry = config.entries[config.idx_default];
1812 if (!menu_run(&config, &entry, loaded_image_path))
1815 /* run special entry like "reboot" */
1816 if (entry->call) {
1817 entry->call();
1822 /* export the selected boot entry to the system */
1823 efivar_set(L"LoaderEntrySelected", entry->file, FALSE);
1826 err = image_start(image, &config, entry);
1829 Print(L"\nFailed to execute %s (%s): %r\n", entry->title, entry->loader, err);