Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F148101904
D50098.1785378873.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D50098.1785378873.diff
View Options
diff --git a/stand/efi/loader/main.c b/stand/efi/loader/main.c
--- a/stand/efi/loader/main.c
+++ b/stand/efi/loader/main.c
@@ -1903,7 +1903,8 @@
status = BS->LoadImage(FALSE, IH, NULL, buf, st.st_size, &loaderhandle);
(void)BS->FreePool(buf);
if (status != EFI_SUCCESS) {
- command_errmsg = "LoadImage failed";
+ printf("LoadImage failed: status code: %lu\n",
+ EFI_ERROR_CODE(status));
return (CMD_ERROR);
}
status = OpenProtocolByHandle(loaderhandle, &LoadedImageGUID,
@@ -1918,6 +1919,11 @@
len *= sizeof (*argp);
loaded_image->LoadOptions = argp = malloc (len);
+ if (loaded_image->LoadOptions == NULL) {
+ command_errmsg = "Adding LoadOptions: out of memory";
+ (void) BS->UnloadImage(loaded_image);
+ return (CMD_ERROR);
+ }
loaded_image->LoadOptionsSize = len;
for (i = 2; i < argc; i++) {
char *ptr = argv[i];
@@ -1971,7 +1977,8 @@
dev_cleanup();
status = BS->StartImage(loaderhandle, NULL, NULL);
if (status != EFI_SUCCESS) {
- command_errmsg = "StartImage failed";
+ printf("StartImage failed: status code: %lu\n",
+ EFI_ERROR_CODE(status));
free(loaded_image->LoadOptions);
loaded_image->LoadOptions = NULL;
status = BS->UnloadImage(loaded_image);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jul 30, 2:34 AM (8 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29304774
Default Alt Text
D50098.1785378873.diff (1 KB)
Attached To
Mode
D50098: loader.efi: add error printouts for chain command
Attached
Detach File
Event Timeline
Log In to Comment