summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2023-03-07 14:18:00 +0000
committerMichael Brown <mcb30@ipxe.org>2023-03-07 14:18:00 +0000
commit54fcb7c29ce2fabe109286e3c4dfeb297e0f3916 (patch)
treeeda5df8981fc7c1534333cdfee78449ffcbddb04
parent9e1f7a3659071004f4b8c76f2593da6287f0d575 (diff)
downloadqemu-ipxe-54fcb7c29ce2fabe109286e3c4dfeb297e0f3916.tar.gz
[efi] Use image name instead of pointer value in debug messages
Signed-off-by: Michael Brown <mcb30@ipxe.org>
-rw-r--r--src/image/efi_image.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/src/image/efi_image.c b/src/image/efi_image.c
index 66a19524..467fb05a 100644
--- a/src/image/efi_image.c
+++ b/src/image/efi_image.c
@@ -147,38 +147,38 @@ static int efi_image_exec ( struct image *image ) {
/* Find an appropriate device handle to use */
snpdev = last_opened_snpdev();
if ( ! snpdev ) {
- DBGC ( image, "EFIIMAGE %p could not identify SNP device\n",
- image );
+ DBGC ( image, "EFIIMAGE %s could not identify SNP device\n",
+ image->name );
rc = -ENODEV;
goto err_no_snpdev;
}
/* Install file I/O protocols */
if ( ( rc = efi_file_install ( snpdev->handle ) ) != 0 ) {
- DBGC ( image, "EFIIMAGE %p could not install file protocol: "
- "%s\n", image, strerror ( rc ) );
+ DBGC ( image, "EFIIMAGE %s could not install file protocol: "
+ "%s\n", image->name, strerror ( rc ) );
goto err_file_install;
}
/* Install PXE base code protocol */
if ( ( rc = efi_pxe_install ( snpdev->handle, snpdev->netdev ) ) != 0 ){
- DBGC ( image, "EFIIMAGE %p could not install PXE protocol: "
- "%s\n", image, strerror ( rc ) );
+ DBGC ( image, "EFIIMAGE %s could not install PXE protocol: "
+ "%s\n", image->name, strerror ( rc ) );
goto err_pxe_install;
}
/* Install iPXE download protocol */
if ( ( rc = efi_download_install ( snpdev->handle ) ) != 0 ) {
- DBGC ( image, "EFIIMAGE %p could not install iPXE download "
- "protocol: %s\n", image, strerror ( rc ) );
+ DBGC ( image, "EFIIMAGE %s could not install iPXE download "
+ "protocol: %s\n", image->name, strerror ( rc ) );
goto err_download_install;
}
/* Create device path for image */
path = efi_image_path ( image, snpdev->path );
if ( ! path ) {
- DBGC ( image, "EFIIMAGE %p could not create device path\n",
- image );
+ DBGC ( image, "EFIIMAGE %s could not create device path\n",
+ image->name );
rc = -ENOMEM;
goto err_image_path;
}
@@ -186,8 +186,8 @@ static int efi_image_exec ( struct image *image ) {
/* Create command line for image */
cmdline = efi_image_cmdline ( image );
if ( ! cmdline ) {
- DBGC ( image, "EFIIMAGE %p could not create command line\n",
- image );
+ DBGC ( image, "EFIIMAGE %s could not create command line\n",
+ image->name );
rc = -ENOMEM;
goto err_cmdline;
}
@@ -199,8 +199,8 @@ static int efi_image_exec ( struct image *image ) {
image->len, &handle ) ) != 0 ) {
/* Not an EFI image */
rc = -EEFI_LOAD ( efirc );
- DBGC ( image, "EFIIMAGE %p could not load: %s\n",
- image, strerror ( rc ) );
+ DBGC ( image, "EFIIMAGE %s could not load: %s\n",
+ image->name, strerror ( rc ) );
if ( efirc == EFI_SECURITY_VIOLATION ) {
goto err_load_image_security_violation;
} else {
@@ -220,8 +220,8 @@ static int efi_image_exec ( struct image *image ) {
/* Some EFI 1.10 implementations seem not to fill in DeviceHandle */
if ( loaded.image->DeviceHandle == NULL ) {
- DBGC ( image, "EFIIMAGE %p filling in missing DeviceHandle\n",
- image );
+ DBGC ( image, "EFIIMAGE %s filling in missing DeviceHandle\n",
+ image->name );
loaded.image->DeviceHandle = snpdev->handle;
}
@@ -251,14 +251,14 @@ static int efi_image_exec ( struct image *image ) {
/* Start the image */
if ( ( efirc = bs->StartImage ( handle, NULL, NULL ) ) != 0 ) {
rc = -EEFI_START ( efirc );
- DBGC ( image, "EFIIMAGE %p could not start (or returned with "
- "error): %s\n", image, strerror ( rc ) );
+ DBGC ( image, "EFIIMAGE %s could not start (or returned with "
+ "error): %s\n", image->name, strerror ( rc ) );
goto err_start_image;
}
/* If image was a driver, connect it up to anything available */
if ( type == EfiBootServicesCode ) {
- DBGC ( image, "EFIIMAGE %p connecting drivers\n", image );
+ DBGC ( image, "EFIIMAGE %s connecting drivers\n", image->name );
efi_driver_reconnect_all();
}
@@ -324,8 +324,8 @@ static int efi_image_probe ( struct image *image ) {
image->len, &handle ) ) != 0 ) {
/* Not an EFI image */
rc = -EEFI_LOAD ( efirc );
- DBGC ( image, "EFIIMAGE %p could not load: %s\n",
- image, strerror ( rc ) );
+ DBGC ( image, "EFIIMAGE %s could not load: %s\n",
+ image->name, strerror ( rc ) );
if ( efirc == EFI_SECURITY_VIOLATION ) {
goto err_load_image_security_violation;
} else {