mirror of
https://github.com/ipxe/ipxe
synced 2026-02-14 02:31:26 +03:00
[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>
This commit is contained in:
@@ -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 */
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user