diff options
author | Matt Fleming <matt.fleming@linux.intel.com> | 2011-06-17 11:49:23 +0100 |
---|---|---|
committer | Matt Fleming <matt.fleming@linux.intel.com> | 2011-07-22 13:00:01 +0100 |
commit | 933999e55549b4c005f62d35e702a324d6d6497d (patch) | |
tree | 95349a09c97659f824f8c6bf29f5704202c169a3 | |
parent | 692986e9a44ffc427b100bac83a0a08151c9954b (diff) | |
download | efilinux-933999e55549b4c005f62d35e702a324d6d6497d.tar.gz |
efilinux: Pass correct size to exit()
The @size argument to exit() should be the size, in bytes, of
@reason. Previously we were passing whatever value was left in 'size'
in efi_main(). We should instead be passing ERROR_STRING_LENGTH
because that is the size of the allocation holding @reason.
Also, cleanup a typo in the documentation for exit() where the
explanation of the @size argument referred to a nonexistent @data
argument.
Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
-rw-r--r-- | efilinux.h | 2 | ||||
-rw-r--r-- | entry.c | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -161,7 +161,7 @@ exit_boot_services(EFI_HANDLE image, UINTN key) * exit - Terminate a loaded EFI image * @image: firmware-allocated handle that identifies the image * @status: the image's exit code - * @size: size in bytes of @data. Ignored if @status is EFI_SUCCESS + * @size: size in bytes of @reason. Ignored if @status is EFI_SUCCESS * @reason: a NUL-terminated status string, optionally followed by binary data * * This function terminates @image and returns control to the boot @@ -184,5 +184,5 @@ failed: StatusToString(error_buf, err); Print(L": %s\n", error_buf); - return exit(image, err, size, error_buf); + return exit(image, err, ERROR_STRING_LENGTH, error_buf); } |