Fix kaem when receiving non-zero exit code.

This commit is contained in:
Andrius Štikonas 2022-08-20 02:22:34 +01:00
parent 20b0450c8f
commit 8913822c2c
4 changed files with 7 additions and 7 deletions

View File

@ -16,7 +16,7 @@ DEFINE CALL_R14_Immediate8 41FF56
DEFINE CALL_R14_Immediate32 41FF96
DEFINE CMPI8_AL 3C
DEFINE COPY_RAX_to_RCX 4889C1
DEFINE COPY_RBX_to_RCX 4889C3
DEFINE COPY_RBX_to_RCX 4889D9
DEFINE COPY_RBX_to_RDX 4889DA
DEFINE COPY_RBX_to_R8 4989D8
DEFINE COPY_RBX_to_R12 4989DC
@ -468,7 +468,7 @@ DEFINE XOR_R15_R15 4D31FF
:print_error
PUSH_RAX # save exit code
LOAD64_into_RDX_rel32 %subprocess_error # get error message
LEA_RDX_rel %subprocess_error # get error message
CALLI32 %File_Print # print it
POP_RAX # restore exit code

View File

@ -365,14 +365,14 @@
:print_error
50 ; PUSH_RAX # save exit code
488B15 %subprocess_error ; LOAD64_into_RDX_rel32 %subprocess_error # get error message
488D15 %subprocess_error ; LEA_RDX_rel %subprocess_error # get error message
E8 %File_Print ; CALLI32 %File_Print # print it
58 ; POP_RAX # restore exit code
# Close script file and exit
:terminate
# Free pool
4889C3 ; COPY_RBX_to_RCX # arg1 = command
4889D9 ; COPY_RBX_to_RCX # arg1 = command
50 ; PUSH_RAX # save exit code
50 ; PUSH_RAX # allocate shadow stack space for UEFI function
41FF56 48 ; CALL_R14_Immediate8 !72 # system->boot->free_pool(commmand)

View File

@ -496,14 +496,14 @@ F7 03 00 00 ; SizeOfRawData
# :print_error [_start+0x323]
50 ; PUSH_RAX # save exit code
488B15 8E000000 ; LOAD64_into_RDX_rel32 %subprocess_error # get error message
488D15 8E000000 ; LEA_RDX_rel %subprocess_error # get error message
E8 16000000 ; CALLI32 %File_Print # print it
58 ; POP_RAX # restore exit code
# Close script file and exit
# :terminate [_start+0x331]
# Free pool
4889C3 ; COPY_RBX_to_RCX # arg1 = command
4889D9 ; COPY_RBX_to_RCX # arg1 = command
50 ; PUSH_RAX # save exit code
50 ; PUSH_RAX # allocate shadow stack space for UEFI function
41FF56 48 ; CALL_R14_Immediate8 !72 # system->boot->free_pool(commmand)

@ -1 +1 @@
Subproject commit de4ed10d6da32af27e741d5421dcc273bf63c54e
Subproject commit b69ef1bc84b4310315a9e9064e800e1363ba4fc3