efi_selftest: correctly cleanup after selftest
After executing bootefi selftest * restore GD * unlink the load image handle * return 0 or 1 and not a truncated efi_status_t. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
parent
d78e40d651
commit
c2b53902ca
@ -349,8 +349,10 @@ static int do_bootefi(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
|||||||
set_load_options(&loaded_image_info, "efi_selftest");
|
set_load_options(&loaded_image_info, "efi_selftest");
|
||||||
/* Execute the test */
|
/* Execute the test */
|
||||||
r = efi_selftest(&loaded_image_info, &systab);
|
r = efi_selftest(&loaded_image_info, &systab);
|
||||||
|
efi_restore_gd();
|
||||||
free(loaded_image_info.load_options);
|
free(loaded_image_info.load_options);
|
||||||
return r;
|
list_del(&loaded_image_info_obj.link);
|
||||||
|
return r != EFI_SUCCESS;
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
if (!strcmp(argv[1], "bootmgr")) {
|
if (!strcmp(argv[1], "bootmgr")) {
|
||||||
|
Loading…
Reference in New Issue
Block a user