Re: [PATCH 1/2] Boot var automatic management for removable medias

2023-04-04 Thread Raymond Mao
Hi Ilias, I can reproduce this issue. r = 14 (EFI_NOT_FOUND) returns from efi_bootmgr_update_media_device_boot_option when there is no boot option scanned. This happens when no removable media are probed. In this case we shall still let the caller return with EFI_SUCCESS. I will send a v2 patch to

Re: [PATCH 1/2] Boot var automatic management for removable medias

2023-04-03 Thread Ilias Apalodimas
Hi Raymond, [...] > + } > + } > + } > + > +out: > + if (opt) { > + for (i = 0; i < count; i++) { > + if (opt[i].lo) > + free(opt[i].lo); > + } > + free(opt); > + } > +

[PATCH 1/2] Boot var automatic management for removable medias

2023-03-28 Thread Raymond Mao
Changes for complying to EFI spec ยง3.5.1.1 'Removable Media Boot Behavior'. Boot variables can be automatically generated during a removable media is probed. At the same time, unused boot variables will be detected and removed. Related APIs are renamed and moved from cmd to lib for re-use between