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/drivers/net | |
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/drivers/net')
-rw-r--r-- | src/drivers/net/efi/nii.c | 4 | ||||
-rw-r--r-- | src/drivers/net/efi/snp.c | 24 | ||||
-rw-r--r-- | src/drivers/net/efi/snpnet.c | 24 | ||||
-rw-r--r-- | src/drivers/net/efi/snponly.c | 32 |
4 files changed, 41 insertions, 43 deletions
diff --git a/src/drivers/net/efi/nii.c b/src/drivers/net/efi/nii.c index b91848f5c..d68b36cc3 100644 --- a/src/drivers/net/efi/nii.c +++ b/src/drivers/net/efi/nii.c @@ -1125,8 +1125,8 @@ int nii_start ( struct efi_device *efidev ) { /* Register network device */ if ( ( rc = register_netdev ( netdev ) ) != 0 ) goto err_register_netdev; - DBGC ( nii, "NII %s registered as %s for %p %s\n", nii->dev.name, - netdev->name, device, efi_handle_name ( device ) ); + DBGC ( nii, "NII %s registered as %s for %s\n", nii->dev.name, + netdev->name, efi_handle_name ( device ) ); /* Set initial link state (if media detection is not supported) */ if ( ! nii->media ) diff --git a/src/drivers/net/efi/snp.c b/src/drivers/net/efi/snp.c index acfcfba9f..fbd606902 100644 --- a/src/drivers/net/efi/snp.c +++ b/src/drivers/net/efi/snp.c @@ -48,8 +48,8 @@ static int snp_supported ( EFI_HANDLE device ) { /* Check that this is not a device we are providing ourselves */ if ( find_snpdev ( device ) != NULL ) { - DBGCP ( device, "SNP %p %s is provided by this binary\n", - device, efi_handle_name ( device ) ); + DBGCP ( device, "SNP %s is provided by this binary\n", + efi_handle_name ( device ) ); return -ENOTTY; } @@ -58,12 +58,12 @@ static int snp_supported ( EFI_HANDLE device ) { &efi_simple_network_protocol_guid, NULL, efi_image_handle, device, EFI_OPEN_PROTOCOL_TEST_PROTOCOL))!=0){ - DBGCP ( device, "SNP %p %s is not an SNP device\n", - device, efi_handle_name ( device ) ); + DBGCP ( device, "SNP %s is not an SNP device\n", + efi_handle_name ( device ) ); return -EEFI ( efirc ); } - DBGC ( device, "SNP %p %s is an SNP device\n", - device, efi_handle_name ( device ) ); + DBGC ( device, "SNP %s is an SNP device\n", + efi_handle_name ( device ) ); return 0; } @@ -80,8 +80,8 @@ static int nii_supported ( EFI_HANDLE device ) { /* Check that this is not a device we are providing ourselves */ if ( find_snpdev ( device ) != NULL ) { - DBGCP ( device, "NII %p %s is provided by this binary\n", - device, efi_handle_name ( device ) ); + DBGCP ( device, "NII %s is provided by this binary\n", + efi_handle_name ( device ) ); return -ENOTTY; } @@ -90,12 +90,12 @@ static int nii_supported ( EFI_HANDLE device ) { &efi_nii31_protocol_guid, NULL, efi_image_handle, device, EFI_OPEN_PROTOCOL_TEST_PROTOCOL))!=0){ - DBGCP ( device, "NII %p %s is not an NII device\n", - device, efi_handle_name ( device ) ); + DBGCP ( device, "NII %s is not an NII device\n", + efi_handle_name ( device ) ); return -EEFI ( efirc ); } - DBGC ( device, "NII %p %s is an NII device\n", - device, efi_handle_name ( device ) ); + DBGC ( device, "NII %s is an NII device\n", + efi_handle_name ( device ) ); return 0; } diff --git a/src/drivers/net/efi/snpnet.c b/src/drivers/net/efi/snpnet.c index 96642c4ca..0d876b636 100644 --- a/src/drivers/net/efi/snpnet.c +++ b/src/drivers/net/efi/snpnet.c @@ -431,8 +431,8 @@ int snpnet_start ( struct efi_device *efidev ) { ( EFI_OPEN_PROTOCOL_BY_DRIVER | EFI_OPEN_PROTOCOL_EXCLUSIVE )))!=0){ rc = -EEFI ( efirc ); - DBGC ( device, "SNP %p %s cannot open SNP protocol: %s\n", - device, efi_handle_name ( device ), strerror ( rc ) ); + DBGC ( device, "SNP %s cannot open SNP protocol: %s\n", + efi_handle_name ( device ), strerror ( rc ) ); DBGC_EFI_OPENERS ( device, device, &efi_simple_network_protocol_guid ); goto err_open_protocol; @@ -463,32 +463,30 @@ int snpnet_start ( struct efi_device *efidev ) { if ( ( mode->State == EfiSimpleNetworkStopped ) && ( ( efirc = snp->snp->Start ( snp->snp ) ) != 0 ) ) { rc = -EEFI ( efirc ); - DBGC ( device, "SNP %p %s could not start: %s\n", device, + DBGC ( device, "SNP %s could not start: %s\n", efi_handle_name ( device ), strerror ( rc ) ); goto err_start; } if ( ( mode->State == EfiSimpleNetworkInitialized ) && ( ( efirc = snp->snp->Shutdown ( snp->snp ) ) != 0 ) ) { rc = -EEFI ( efirc ); - DBGC ( device, "SNP %p %s could not shut down: %s\n", device, + DBGC ( device, "SNP %s could not shut down: %s\n", efi_handle_name ( device ), strerror ( rc ) ); goto err_shutdown; } /* Populate network device parameters */ if ( mode->HwAddressSize != netdev->ll_protocol->hw_addr_len ) { - DBGC ( device, "SNP %p %s has invalid hardware address " - "length %d\n", device, efi_handle_name ( device ), - mode->HwAddressSize ); + DBGC ( device, "SNP %s has invalid hardware address length " + "%d\n", efi_handle_name ( device ), mode->HwAddressSize); rc = -ENOTSUP; goto err_hw_addr_len; } memcpy ( netdev->hw_addr, &mode->PermanentAddress, netdev->ll_protocol->hw_addr_len ); if ( mode->HwAddressSize != netdev->ll_protocol->ll_addr_len ) { - DBGC ( device, "SNP %p %s has invalid link-layer address " - "length %d\n", device, efi_handle_name ( device ), - mode->HwAddressSize ); + DBGC ( device, "SNP %s has invalid link-layer address length " + "%d\n", efi_handle_name ( device ), mode->HwAddressSize); rc = -ENOTSUP; goto err_ll_addr_len; } @@ -500,8 +498,8 @@ int snpnet_start ( struct efi_device *efidev ) { /* Register network device */ if ( ( rc = register_netdev ( netdev ) ) != 0 ) goto err_register_netdev; - DBGC ( device, "SNP %p %s registered as %s\n", - device, efi_handle_name ( device ), netdev->name ); + DBGC ( device, "SNP %s registered as %s\n", + efi_handle_name ( device ), netdev->name ); /* Set initial link state */ if ( snp->snp->Mode->MediaPresentSupported ) { @@ -547,7 +545,7 @@ void snpnet_stop ( struct efi_device *efidev ) { /* Stop SNP protocol */ if ( ( efirc = snp->snp->Stop ( snp->snp ) ) != 0 ) { rc = -EEFI ( efirc ); - DBGC ( device, "SNP %p %s could not stop: %s\n", device, + DBGC ( device, "SNP %s could not stop: %s\n", efi_handle_name ( device ), strerror ( rc ) ); /* Nothing we can do about this */ } diff --git a/src/drivers/net/efi/snponly.c b/src/drivers/net/efi/snponly.c index 73abfdbf4..cb7ea1bbc 100644 --- a/src/drivers/net/efi/snponly.c +++ b/src/drivers/net/efi/snponly.c @@ -81,14 +81,14 @@ static int chained_locate ( struct chained_protocol *chained ) { /* Locate handle supporting this protocol */ if ( ( rc = efi_locate_device ( device, chained->protocol, &parent ) ) != 0 ) { - DBGC ( device, "CHAINED %p %s does not support %s: %s\n", - device, efi_handle_name ( device ), + DBGC ( device, "CHAINED %s does not support %s: %s\n", + efi_handle_name ( device ), efi_guid_ntoa ( chained->protocol ), strerror ( rc ) ); goto err_locate_device; } - DBGC ( device, "CHAINED %p %s found %s on ", device, - efi_handle_name ( device ), efi_guid_ntoa ( chained->protocol )); - DBGC ( device, "%p %s\n", parent, efi_handle_name ( parent ) ); + DBGC ( device, "CHAINED %s found %s on ", efi_handle_name ( device ), + efi_guid_ntoa ( chained->protocol ) ); + DBGC ( device, "%s\n", efi_handle_name ( parent ) ); /* Get protocol instance */ if ( ( efirc = bs->OpenProtocol ( parent, chained->protocol, @@ -96,11 +96,11 @@ static int chained_locate ( struct chained_protocol *chained ) { device, EFI_OPEN_PROTOCOL_GET_PROTOCOL ))!=0){ rc = -EEFI ( efirc ); - DBGC ( device, "CHAINED %p %s could not open %s on ", - device, efi_handle_name ( device ), + DBGC ( device, "CHAINED %s could not open %s on ", + efi_handle_name ( device ), efi_guid_ntoa ( chained->protocol ) ); - DBGC ( device, "%p %s: %s\n", - parent, efi_handle_name ( parent ), strerror ( rc ) ); + DBGC ( device, "%s: %s\n", + efi_handle_name ( parent ), strerror ( rc ) ); goto err_open_protocol; } @@ -130,25 +130,25 @@ static int chained_supported ( EFI_HANDLE device, efi_image_handle, device, EFI_OPEN_PROTOCOL_GET_PROTOCOL ))!=0){ rc = -EEFI ( efirc ); - DBGCP ( device, "CHAINED %p %s is not a %s device\n", - device, efi_handle_name ( device ), + DBGCP ( device, "CHAINED %s is not a %s device\n", + efi_handle_name ( device ), efi_guid_ntoa ( chained->protocol ) ); goto err_open_protocol; } /* Test for a match against the chainloading device */ if ( interface != chained->interface ) { - DBGC ( device, "CHAINED %p %s %p is not the chainloaded " - "%s\n", device, efi_handle_name ( device ), - interface, efi_guid_ntoa ( chained->protocol ) ); + DBGC ( device, "CHAINED %s %p is not the chainloaded %s\n", + efi_handle_name ( device ), interface, + efi_guid_ntoa ( chained->protocol ) ); rc = -ENOTTY; goto err_no_match; } /* Success */ rc = 0; - DBGC ( device, "CHAINED %p %s %p is the chainloaded %s\n", - device, efi_handle_name ( device ), interface, + DBGC ( device, "CHAINED %s %p is the chainloaded %s\n", + efi_handle_name ( device ), interface, efi_guid_ntoa ( chained->protocol ) ); err_no_match: |