Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[driver] Fix printing of SCSI LUN structures
Signed-off-by: Michael Brown <mbrown@fensystems.co.uk>
  • Loading branch information
mcb30 committed Sep 14, 2010
1 parent a6acfce commit 6ee299e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
10 changes: 5 additions & 5 deletions src/driver/ibft.c
Expand Up @@ -324,11 +324,11 @@ static VOID parse_ibft_target ( PIBFT_TABLE ibft, PIBFT_TARGET target ) {
DbgPrint ( " IP = %s\n",
ibft_ipaddr ( &target->ip_address ) );
DbgPrint ( " Port = %d\n", target->socket );
DbgPrint ( " LUN = %04x-%04x-%04x-%04x\n",
( ( target->boot_lun >> 48 ) & 0xffff ),
( ( target->boot_lun >> 32 ) & 0xffff ),
( ( target->boot_lun >> 16 ) & 0xffff ),
( ( target->boot_lun >> 0 ) & 0xffff ) );
DbgPrint ( " LUN = %02x%02x-%02x%02x-%02x%02x-%02x%02x\n",
target->boot_lun[0], target->boot_lun[1],
target->boot_lun[2], target->boot_lun[3],
target->boot_lun[4], target->boot_lun[5],
target->boot_lun[6], target->boot_lun[7] );
DbgPrint ( " CHAP type = %d (%s)\n", target->chap_type,
( ( target->chap_type == IBFT_CHAP_NONE ) ? "None" :
( ( target->chap_type == IBFT_CHAP_ONE_WAY ) ? "One-way" :
Expand Down
2 changes: 1 addition & 1 deletion src/driver/ibft.h
Expand Up @@ -211,7 +211,7 @@ typedef struct _IBFT_TARGET {
/** TCP port */
USHORT socket;
/** Boot LUN */
ULONGLONG boot_lun;
UCHAR boot_lun[8];
/** CHAP type
*
* This is an IBFT_CHAP_XXX constant.
Expand Down
8 changes: 3 additions & 5 deletions src/driver/sbft.c
Expand Up @@ -42,11 +42,9 @@
static VOID parse_sbft_scsi ( PSBFT_TABLE sbft, PSBFT_SCSI_SUBTABLE scsi ) {

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

Expand Down
2 changes: 1 addition & 1 deletion src/driver/sbft.h
Expand Up @@ -71,7 +71,7 @@ typedef struct _SBFT_TABLE {
#pragma pack(1)
typedef struct _SBFT_SCSI_SUBTABLE {
/** LUN */
ULONGLONG lun;
UCHAR lun[8];
} SBFT_SCSI_SUBTABLE, *PSBFT_SCSI_SUBTABLE;
#pragma pack()

Expand Down

0 comments on commit 6ee299e

Please sign in to comment.