summaryrefslogtreecommitdiffstats
path: root/src/interface/efi/efi_bofm.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/interface/efi/efi_bofm.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/interface/efi/efi_bofm.c')
-rw-r--r--src/interface/efi/efi_bofm.c67
1 files changed, 33 insertions, 34 deletions
diff --git a/src/interface/efi/efi_bofm.c b/src/interface/efi/efi_bofm.c
index ea0e15f7..00f6a1d5 100644
--- a/src/interface/efi/efi_bofm.c
+++ b/src/interface/efi/efi_bofm.c
@@ -178,8 +178,8 @@ static int efi_bofm_supported ( EFI_HANDLE device ) {
/* Look for a BOFM driver */
if ( ( rc = bofm_find_driver ( &pci ) ) != 0 ) {
- DBGCP ( device, "EFIBOFM %p %s has no driver\n",
- device, efi_handle_name ( device ) );
+ DBGCP ( device, "EFIBOFM %s has no driver\n",
+ efi_handle_name ( device ) );
return rc;
}
@@ -187,8 +187,8 @@ static int efi_bofm_supported ( EFI_HANDLE device ) {
if ( ( efirc = bs->LocateProtocol ( &bofm1_protocol_guid, NULL,
&bofm1.interface ) ) != 0 ) {
rc = -EEFI ( efirc );
- DBGC ( device, "EFIBOFM %p %s cannot find BOFM protocol\n",
- device, efi_handle_name ( device ) );
+ DBGC ( device, "EFIBOFM %s cannot find BOFM protocol\n",
+ efi_handle_name ( device ) );
return rc;
}
@@ -198,13 +198,13 @@ static int efi_bofm_supported ( EFI_HANDLE device ) {
0x00 /* No iSCSI */,
0x02 /* Version */ ))!=0){
rc = -EEFI ( efirc );
- DBGC ( device, "EFIBOFM %p %s could not register support: %s\n",
- device, efi_handle_name ( device ), strerror ( rc ) );
+ DBGC ( device, "EFIBOFM %s could not register support: %s\n",
+ efi_handle_name ( device ), strerror ( rc ) );
return rc;
}
- DBGC ( device, "EFIBOFM %p %s has driver \"%s\"\n",
- device, efi_handle_name ( device ), pci.id->name );
+ DBGC ( device, "EFIBOFM %s has driver \"%s\"\n",
+ efi_handle_name ( device ), pci.id->name );
return 0;
}
@@ -241,49 +241,48 @@ static int efi_bofm_start ( struct efi_device *efidev ) {
if ( ( efirc = bs->LocateProtocol ( &bofm1_protocol_guid, NULL,
&bofm1.interface ) ) != 0 ) {
rc = -EEFI ( efirc );
- DBGC ( device, "EFIBOFM %p %s cannot find BOFM protocol\n",
- device, efi_handle_name ( device ) );
+ DBGC ( device, "EFIBOFM %s cannot find BOFM protocol\n",
+ efi_handle_name ( device ) );
goto err_locate_bofm;
}
bofmtab = &bofm1.bofm1->BofmTable;
- DBGC ( device, "EFIBOFM %p %s found version 1 BOFM table at %p+%04x\n",
- device, efi_handle_name ( device ), bofmtab,
- bofmtab->Parameters.Length );
+ DBGC ( device, "EFIBOFM %s found version 1 BOFM table at %p+%04x\n",
+ efi_handle_name ( device ), bofmtab, bofmtab->Parameters.Length);
/* Locate BOFM2 protocol, if available */
if ( ( efirc = bs->LocateProtocol ( &bofm2_protocol_guid, NULL,
&bofm2.interface ) ) == 0 ) {
bofmtab2 = &bofm2.bofm2->BofmTable;
- DBGC ( device, "EFIBOFM %p %s found version 2 BOFM table at "
- "%p+%04x\n", device, efi_handle_name ( device ),
- bofmtab2, bofmtab2->Parameters.Length );
+ DBGC ( device, "EFIBOFM %s found version 2 BOFM table at "
+ "%p+%04x\n", efi_handle_name ( device ), bofmtab2,
+ bofmtab2->Parameters.Length );
assert ( bofm2.bofm2->RegisterSupport ==
bofm1.bofm1->RegisterSupport );
} else {
- DBGC ( device, "EFIBOFM %p %s cannot find BOFM2 protocol\n",
- device, efi_handle_name ( device ) );
+ DBGC ( device, "EFIBOFM %s cannot find BOFM2 protocol\n",
+ efi_handle_name ( device ) );
/* Not a fatal error; may be a BOFM1-only system */
bofmtab2 = NULL;
}
/* Process BOFM table */
- DBGC2 ( device, "EFIBOFM %p %s version 1 before processing:\n",
- device, efi_handle_name ( device ) );
+ DBGC2 ( device, "EFIBOFM %s version 1 before processing:\n",
+ efi_handle_name ( device ) );
DBGC2_HD ( device, bofmtab, bofmtab->Parameters.Length );
if ( bofmtab2 ) {
- DBGC2 ( device, "EFIBOFM %p %s version 2 before processing:\n",
- device, efi_handle_name ( device ) );
+ DBGC2 ( device, "EFIBOFM %s version 2 before processing:\n",
+ efi_handle_name ( device ) );
DBGC2_HD ( device, bofmtab2, bofmtab2->Parameters.Length );
}
bofmrc = bofm ( virt_to_user ( bofmtab2 ? bofmtab2 : bofmtab ), &pci );
- DBGC ( device, "EFIBOFM %p %s status %08x\n",
- device, efi_handle_name ( device ), bofmrc );
- DBGC2 ( device, "EFIBOFM %p %s version 1 after processing:\n",
- device, efi_handle_name ( device ) );
+ DBGC ( device, "EFIBOFM %s status %08x\n",
+ efi_handle_name ( device ), bofmrc );
+ DBGC2 ( device, "EFIBOFM %s version 1 after processing:\n",
+ efi_handle_name ( device ) );
DBGC2_HD ( device, bofmtab, bofmtab->Parameters.Length );
if ( bofmtab2 ) {
- DBGC2 ( device, "EFIBOFM %p %s version 2 after processing:\n",
- device, efi_handle_name ( device ) );
+ DBGC2 ( device, "EFIBOFM %s version 2 after processing:\n",
+ efi_handle_name ( device ) );
DBGC2_HD ( device, bofmtab2, bofmtab2->Parameters.Length );
}
@@ -292,18 +291,18 @@ static int efi_bofm_start ( struct efi_device *efidev ) {
if ( ( efirc = bofm2.bofm2->SetStatus ( bofm2.bofm2, device,
FALSE, bofmrc ) ) != 0){
rc = -EEFI ( efirc );
- DBGC ( device, "EFIBOFM %p %s could not set BOFM2 "
- "status: %s\n", device,
- efi_handle_name ( device ), strerror ( rc ) );
+ DBGC ( device, "EFIBOFM %s could not set BOFM2 "
+ "status: %s\n", efi_handle_name ( device ),
+ strerror ( rc ) );
goto err_set_status;
}
} else {
if ( ( efirc = bofm1.bofm1->SetStatus ( bofm1.bofm1, device,
FALSE, bofmrc ) ) != 0){
rc = -EEFI ( efirc );
- DBGC ( device, "EFIBOFM %p %s could not set BOFM "
- "status: %s\n", device,
- efi_handle_name ( device ), strerror ( rc ) );
+ DBGC ( device, "EFIBOFM %s could not set BOFM "
+ "status: %s\n", efi_handle_name ( device ),
+ strerror ( rc ) );
goto err_set_status;
}
}