summaryrefslogtreecommitdiffstats
path: root/src/drivers/net/efi/snpnet.c
diff options
context:
space:
mode:
authorMichael Brown2015-08-27 11:08:00 +0200
committerMichael Brown2015-08-27 16:40:44 +0200
commit9501eaf68d79a7baa2d71567481ccb0f43e56253 (patch)
tree5cf2705ee089b65dfc93b9a4f5f5c3bf3a10cf65 /src/drivers/net/efi/snpnet.c
parent[efi] Mark EFI debug transcription functions as __attribute__ (( pure )) (diff)
downloadipxe-9501eaf68d79a7baa2d71567481ccb0f43e56253.tar.gz
ipxe-9501eaf68d79a7baa2d71567481ccb0f43e56253.tar.xz
ipxe-9501eaf68d79a7baa2d71567481ccb0f43e56253.zip
[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/efi/snpnet.c')
-rw-r--r--src/drivers/net/efi/snpnet.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/src/drivers/net/efi/snpnet.c b/src/drivers/net/efi/snpnet.c
index 96642c4c..0d876b63 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 */
}