diff options
author | Michael Brown <mcb30@ipxe.org> | 2015-08-27 10:08:00 +0100 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2015-08-27 15:40:44 +0100 |
commit | 9501eaf68d79a7baa2d71567481ccb0f43e56253 (patch) | |
tree | 5cf2705ee089b65dfc93b9a4f5f5c3bf3a10cf65 /src/interface/efi/efi_utils.c | |
parent | 0e407377dde26c5915d6df17397566244bb9d412 (diff) | |
download | ipxe-9501eaf68d79a7baa2d71567481ccb0f43e56253.tar.gz |
[efi] Remove raw EFI_HANDLE values from debug messages
The raw EFI_HANDLE value is almost never useful to know, and simply
adds noise to the already verbose debug messages. Improve the
legibility of debug messages by using only the name generated by
efi_handle_name().
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/interface/efi/efi_utils.c')
-rw-r--r-- | src/interface/efi/efi_utils.c | 38 |
1 files changed, 17 insertions, 21 deletions
diff --git a/src/interface/efi/efi_utils.c b/src/interface/efi/efi_utils.c index 936ad48ec..1bebaa56d 100644 --- a/src/interface/efi/efi_utils.c +++ b/src/interface/efi/efi_utils.c @@ -76,8 +76,8 @@ int efi_locate_device ( EFI_HANDLE device, EFI_GUID *protocol, efi_image_handle, device, EFI_OPEN_PROTOCOL_GET_PROTOCOL ))!=0){ rc = -EEFI ( efirc ); - DBGC ( device, "EFIDEV %p %s cannot open device path: %s\n", - device, efi_handle_name ( device ), strerror ( rc ) ); + DBGC ( device, "EFIDEV %s cannot open device path: %s\n", + efi_handle_name ( device ), strerror ( rc ) ); goto err_open_device_path; } devpath = path.path; @@ -86,8 +86,8 @@ int efi_locate_device ( EFI_HANDLE device, EFI_GUID *protocol, if ( ( efirc = bs->LocateDevicePath ( protocol, &devpath, parent ) ) != 0 ) { rc = -EEFI ( efirc ); - DBGC ( device, "EFIDEV %p %s has no parent supporting %s: %s\n", - device, efi_handle_name ( device ), + DBGC ( device, "EFIDEV %s has no parent supporting %s: %s\n", + efi_handle_name ( device ), efi_guid_ntoa ( protocol ), strerror ( rc ) ); goto err_locate_protocol; } @@ -123,18 +123,17 @@ int efi_child_add ( EFI_HANDLE parent, EFI_HANDLE child ) { EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER ) ) != 0 ) { rc = -EEFI ( efirc ); - DBGC ( parent, "EFIDEV %p %s could not add child", - parent, efi_handle_name ( parent ) ); - DBGC ( parent, " %p %s: %s\n", child, + DBGC ( parent, "EFIDEV %s could not add child", + efi_handle_name ( parent ) ); + DBGC ( parent, " %s: %s\n", efi_handle_name ( child ), strerror ( rc ) ); DBGC_EFI_OPENERS ( parent, parent, &efi_device_path_protocol_guid ); return rc; } - DBGC2 ( parent, "EFIDEV %p %s added child", - parent, efi_handle_name ( parent ) ); - DBGC2 ( parent, " %p %s\n", child, efi_handle_name ( child ) ); + DBGC2 ( parent, "EFIDEV %s added child", efi_handle_name ( parent ) ); + DBGC2 ( parent, " %s\n", efi_handle_name ( child ) ); return 0; } @@ -149,10 +148,8 @@ void efi_child_del ( EFI_HANDLE parent, EFI_HANDLE child ) { bs->CloseProtocol ( parent, &efi_device_path_protocol_guid, efi_image_handle, child ); - DBGC2 ( parent, "EFIDEV %p %s removed child", - parent, efi_handle_name ( parent ) ); - DBGC2 ( parent, " %p %s\n", - child, efi_handle_name ( child ) ); + DBGC2 ( parent, "EFIDEV %s removed child", efi_handle_name ( parent ) ); + DBGC2 ( parent, " %s\n", efi_handle_name ( child ) ); } /** @@ -172,16 +169,15 @@ static int efi_pci_info ( EFI_HANDLE device, const char *prefix, /* Find parent PCI device */ if ( ( rc = efi_locate_device ( device, &efi_pci_io_protocol_guid, &pci_device ) ) != 0 ) { - DBGC ( device, "EFIDEV %p %s is not a PCI device: %s\n", - device, efi_handle_name ( device ), strerror ( rc ) ); + DBGC ( device, "EFIDEV %s is not a PCI device: %s\n", + efi_handle_name ( device ), strerror ( rc ) ); return rc; } /* Get PCI device information */ if ( ( rc = efipci_info ( pci_device, &pci ) ) != 0 ) { - DBGC ( device, "EFIDEV %p %s could not get PCI information: " - "%s\n", device, efi_handle_name ( device ), - strerror ( rc ) ); + DBGC ( device, "EFIDEV %s could not get PCI information: %s\n", + efi_handle_name ( device ), strerror ( rc ) ); return rc; } @@ -211,8 +207,8 @@ void efi_device_info ( EFI_HANDLE device, const char *prefix, /* If we cannot get any underlying device information, fall * back to providing information about the EFI handle. */ - DBGC ( device, "EFIDEV %p %s could not get underlying device " - "information\n", device, efi_handle_name ( device ) ); + DBGC ( device, "EFIDEV %s could not get underlying device " + "information\n", efi_handle_name ( device ) ); dev->desc.bus_type = BUS_TYPE_EFI; snprintf ( dev->name, sizeof ( dev->name ), "%s-%p", prefix, device ); } |