2015-05-14 19:20:51 +03:00
|
|
|
|
|
|
|
#include <efi.h>
|
|
|
|
#include <efilib.h>
|
2019-05-15 06:32:21 +03:00
|
|
|
#include <efisetjmp.h>
|
2015-05-14 19:20:51 +03:00
|
|
|
|
|
|
|
EFI_STATUS
|
|
|
|
efi_main(
|
|
|
|
EFI_HANDLE image_handle,
|
|
|
|
EFI_SYSTEM_TABLE *systab
|
|
|
|
)
|
|
|
|
{
|
|
|
|
jmp_buf env;
|
|
|
|
int rc;
|
|
|
|
|
|
|
|
InitializeLib(image_handle, systab);
|
2019-03-15 16:32:06 +03:00
|
|
|
rc = setjmp(env);
|
2024-05-30 18:39:00 +03:00
|
|
|
Print(u"setjmp() = %d\n", rc);
|
2015-05-14 19:20:51 +03:00
|
|
|
|
|
|
|
if (rc == 3) {
|
2024-05-30 18:39:00 +03:00
|
|
|
Print(u"3 worked\n");
|
2019-03-15 16:32:06 +03:00
|
|
|
longjmp(env, 0);
|
2015-05-14 19:20:51 +03:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (rc == 1) {
|
2024-05-30 18:39:00 +03:00
|
|
|
Print(u"0 got to be one yay\n");
|
2015-05-14 19:20:51 +03:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2019-03-15 16:32:06 +03:00
|
|
|
longjmp(env, 3);
|
2015-05-14 19:20:51 +03:00
|
|
|
return 0;
|
|
|
|
}
|