mirror of https://github.com/ipxe/ipxe.git
[efi] Use image name instead of pointer value in debug messages
Signed-off-by: Michael Brown <mcb30@ipxe.org>mtureset
parent
9e1f7a3659
commit
54fcb7c29c
|
@ -147,38 +147,38 @@ static int efi_image_exec ( struct image *image ) {
|
||||||
/* Find an appropriate device handle to use */
|
/* Find an appropriate device handle to use */
|
||||||
snpdev = last_opened_snpdev();
|
snpdev = last_opened_snpdev();
|
||||||
if ( ! snpdev ) {
|
if ( ! snpdev ) {
|
||||||
DBGC ( image, "EFIIMAGE %p could not identify SNP device\n",
|
DBGC ( image, "EFIIMAGE %s could not identify SNP device\n",
|
||||||
image );
|
image->name );
|
||||||
rc = -ENODEV;
|
rc = -ENODEV;
|
||||||
goto err_no_snpdev;
|
goto err_no_snpdev;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Install file I/O protocols */
|
/* Install file I/O protocols */
|
||||||
if ( ( rc = efi_file_install ( snpdev->handle ) ) != 0 ) {
|
if ( ( rc = efi_file_install ( snpdev->handle ) ) != 0 ) {
|
||||||
DBGC ( image, "EFIIMAGE %p could not install file protocol: "
|
DBGC ( image, "EFIIMAGE %s could not install file protocol: "
|
||||||
"%s\n", image, strerror ( rc ) );
|
"%s\n", image->name, strerror ( rc ) );
|
||||||
goto err_file_install;
|
goto err_file_install;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Install PXE base code protocol */
|
/* Install PXE base code protocol */
|
||||||
if ( ( rc = efi_pxe_install ( snpdev->handle, snpdev->netdev ) ) != 0 ){
|
if ( ( rc = efi_pxe_install ( snpdev->handle, snpdev->netdev ) ) != 0 ){
|
||||||
DBGC ( image, "EFIIMAGE %p could not install PXE protocol: "
|
DBGC ( image, "EFIIMAGE %s could not install PXE protocol: "
|
||||||
"%s\n", image, strerror ( rc ) );
|
"%s\n", image->name, strerror ( rc ) );
|
||||||
goto err_pxe_install;
|
goto err_pxe_install;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Install iPXE download protocol */
|
/* Install iPXE download protocol */
|
||||||
if ( ( rc = efi_download_install ( snpdev->handle ) ) != 0 ) {
|
if ( ( rc = efi_download_install ( snpdev->handle ) ) != 0 ) {
|
||||||
DBGC ( image, "EFIIMAGE %p could not install iPXE download "
|
DBGC ( image, "EFIIMAGE %s could not install iPXE download "
|
||||||
"protocol: %s\n", image, strerror ( rc ) );
|
"protocol: %s\n", image->name, strerror ( rc ) );
|
||||||
goto err_download_install;
|
goto err_download_install;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Create device path for image */
|
/* Create device path for image */
|
||||||
path = efi_image_path ( image, snpdev->path );
|
path = efi_image_path ( image, snpdev->path );
|
||||||
if ( ! path ) {
|
if ( ! path ) {
|
||||||
DBGC ( image, "EFIIMAGE %p could not create device path\n",
|
DBGC ( image, "EFIIMAGE %s could not create device path\n",
|
||||||
image );
|
image->name );
|
||||||
rc = -ENOMEM;
|
rc = -ENOMEM;
|
||||||
goto err_image_path;
|
goto err_image_path;
|
||||||
}
|
}
|
||||||
|
@ -186,8 +186,8 @@ static int efi_image_exec ( struct image *image ) {
|
||||||
/* Create command line for image */
|
/* Create command line for image */
|
||||||
cmdline = efi_image_cmdline ( image );
|
cmdline = efi_image_cmdline ( image );
|
||||||
if ( ! cmdline ) {
|
if ( ! cmdline ) {
|
||||||
DBGC ( image, "EFIIMAGE %p could not create command line\n",
|
DBGC ( image, "EFIIMAGE %s could not create command line\n",
|
||||||
image );
|
image->name );
|
||||||
rc = -ENOMEM;
|
rc = -ENOMEM;
|
||||||
goto err_cmdline;
|
goto err_cmdline;
|
||||||
}
|
}
|
||||||
|
@ -199,8 +199,8 @@ static int efi_image_exec ( struct image *image ) {
|
||||||
image->len, &handle ) ) != 0 ) {
|
image->len, &handle ) ) != 0 ) {
|
||||||
/* Not an EFI image */
|
/* Not an EFI image */
|
||||||
rc = -EEFI_LOAD ( efirc );
|
rc = -EEFI_LOAD ( efirc );
|
||||||
DBGC ( image, "EFIIMAGE %p could not load: %s\n",
|
DBGC ( image, "EFIIMAGE %s could not load: %s\n",
|
||||||
image, strerror ( rc ) );
|
image->name, strerror ( rc ) );
|
||||||
if ( efirc == EFI_SECURITY_VIOLATION ) {
|
if ( efirc == EFI_SECURITY_VIOLATION ) {
|
||||||
goto err_load_image_security_violation;
|
goto err_load_image_security_violation;
|
||||||
} else {
|
} else {
|
||||||
|
@ -220,8 +220,8 @@ static int efi_image_exec ( struct image *image ) {
|
||||||
|
|
||||||
/* Some EFI 1.10 implementations seem not to fill in DeviceHandle */
|
/* Some EFI 1.10 implementations seem not to fill in DeviceHandle */
|
||||||
if ( loaded.image->DeviceHandle == NULL ) {
|
if ( loaded.image->DeviceHandle == NULL ) {
|
||||||
DBGC ( image, "EFIIMAGE %p filling in missing DeviceHandle\n",
|
DBGC ( image, "EFIIMAGE %s filling in missing DeviceHandle\n",
|
||||||
image );
|
image->name );
|
||||||
loaded.image->DeviceHandle = snpdev->handle;
|
loaded.image->DeviceHandle = snpdev->handle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -251,14 +251,14 @@ static int efi_image_exec ( struct image *image ) {
|
||||||
/* Start the image */
|
/* Start the image */
|
||||||
if ( ( efirc = bs->StartImage ( handle, NULL, NULL ) ) != 0 ) {
|
if ( ( efirc = bs->StartImage ( handle, NULL, NULL ) ) != 0 ) {
|
||||||
rc = -EEFI_START ( efirc );
|
rc = -EEFI_START ( efirc );
|
||||||
DBGC ( image, "EFIIMAGE %p could not start (or returned with "
|
DBGC ( image, "EFIIMAGE %s could not start (or returned with "
|
||||||
"error): %s\n", image, strerror ( rc ) );
|
"error): %s\n", image->name, strerror ( rc ) );
|
||||||
goto err_start_image;
|
goto err_start_image;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If image was a driver, connect it up to anything available */
|
/* If image was a driver, connect it up to anything available */
|
||||||
if ( type == EfiBootServicesCode ) {
|
if ( type == EfiBootServicesCode ) {
|
||||||
DBGC ( image, "EFIIMAGE %p connecting drivers\n", image );
|
DBGC ( image, "EFIIMAGE %s connecting drivers\n", image->name );
|
||||||
efi_driver_reconnect_all();
|
efi_driver_reconnect_all();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -324,8 +324,8 @@ static int efi_image_probe ( struct image *image ) {
|
||||||
image->len, &handle ) ) != 0 ) {
|
image->len, &handle ) ) != 0 ) {
|
||||||
/* Not an EFI image */
|
/* Not an EFI image */
|
||||||
rc = -EEFI_LOAD ( efirc );
|
rc = -EEFI_LOAD ( efirc );
|
||||||
DBGC ( image, "EFIIMAGE %p could not load: %s\n",
|
DBGC ( image, "EFIIMAGE %s could not load: %s\n",
|
||||||
image, strerror ( rc ) );
|
image->name, strerror ( rc ) );
|
||||||
if ( efirc == EFI_SECURITY_VIOLATION ) {
|
if ( efirc == EFI_SECURITY_VIOLATION ) {
|
||||||
goto err_load_image_security_violation;
|
goto err_load_image_security_violation;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue