[driver] Fix printing of SCSI LUN structures

Signed-off-by: Michael Brown <mbrown@fensystems.co.uk>
This commit is contained in:
Michael Brown 2010-09-14 19:04:08 +01:00
parent a6acfce738
commit 6ee299ebff
4 changed files with 10 additions and 12 deletions

View File

@ -324,11 +324,11 @@ static VOID parse_ibft_target ( PIBFT_TABLE ibft, PIBFT_TARGET target ) {
DbgPrint ( " IP = %s\n", DbgPrint ( " IP = %s\n",
ibft_ipaddr ( &target->ip_address ) ); ibft_ipaddr ( &target->ip_address ) );
DbgPrint ( " Port = %d\n", target->socket ); DbgPrint ( " Port = %d\n", target->socket );
DbgPrint ( " LUN = %04x-%04x-%04x-%04x\n", DbgPrint ( " LUN = %02x%02x-%02x%02x-%02x%02x-%02x%02x\n",
( ( target->boot_lun >> 48 ) & 0xffff ), target->boot_lun[0], target->boot_lun[1],
( ( target->boot_lun >> 32 ) & 0xffff ), target->boot_lun[2], target->boot_lun[3],
( ( target->boot_lun >> 16 ) & 0xffff ), target->boot_lun[4], target->boot_lun[5],
( ( target->boot_lun >> 0 ) & 0xffff ) ); target->boot_lun[6], target->boot_lun[7] );
DbgPrint ( " CHAP type = %d (%s)\n", target->chap_type, DbgPrint ( " CHAP type = %d (%s)\n", target->chap_type,
( ( target->chap_type == IBFT_CHAP_NONE ) ? "None" : ( ( target->chap_type == IBFT_CHAP_NONE ) ? "None" :
( ( target->chap_type == IBFT_CHAP_ONE_WAY ) ? "One-way" : ( ( target->chap_type == IBFT_CHAP_ONE_WAY ) ? "One-way" :

View File

@ -211,7 +211,7 @@ typedef struct _IBFT_TARGET {
/** TCP port */ /** TCP port */
USHORT socket; USHORT socket;
/** Boot LUN */ /** Boot LUN */
ULONGLONG boot_lun; UCHAR boot_lun[8];
/** CHAP type /** CHAP type
* *
* This is an IBFT_CHAP_XXX constant. * This is an IBFT_CHAP_XXX constant.

View File

@ -42,11 +42,9 @@
static VOID parse_sbft_scsi ( PSBFT_TABLE sbft, PSBFT_SCSI_SUBTABLE scsi ) { static VOID parse_sbft_scsi ( PSBFT_TABLE sbft, PSBFT_SCSI_SUBTABLE scsi ) {
DbgPrint ( "Found sBFT SCSI subtable:\n" ); DbgPrint ( "Found sBFT SCSI subtable:\n" );
DbgPrint ( " LUN = %04x-%04x-%04x-%04x\n", DbgPrint ( " LUN = %02x%02x-%02x%02x-%02x%02x-%02x%02x\n",
( ( scsi->lun >> 48 ) & 0xffff ), scsi->lun[0], scsi->lun[1], scsi->lun[2], scsi->lun[3],
( ( scsi->lun >> 32 ) & 0xffff ), scsi->lun[4], scsi->lun[5], scsi->lun[6], scsi->lun[7] );
( ( scsi->lun >> 16 ) & 0xffff ),
( ( scsi->lun >> 0 ) & 0xffff ) );
( VOID ) sbft; ( VOID ) sbft;
} }

View File

@ -71,7 +71,7 @@ typedef struct _SBFT_TABLE {
#pragma pack(1) #pragma pack(1)
typedef struct _SBFT_SCSI_SUBTABLE { typedef struct _SBFT_SCSI_SUBTABLE {
/** LUN */ /** LUN */
ULONGLONG lun; UCHAR lun[8];
} SBFT_SCSI_SUBTABLE, *PSBFT_SCSI_SUBTABLE; } SBFT_SCSI_SUBTABLE, *PSBFT_SCSI_SUBTABLE;
#pragma pack() #pragma pack()