diff options
author | Michael Brown | 2006-08-16 02:05:24 +0200 |
---|---|---|
committer | Michael Brown | 2006-08-16 02:05:24 +0200 |
commit | cf2178f885db34b73bd60973a1427add9cb3678b (patch) | |
tree | 35b1cb50776c4eb11852e725858d44c272a0061d /src/include/gpxe/scsi.h | |
parent | Remove old-style debug message (diff) | |
download | ipxe-cf2178f885db34b73bd60973a1427add9cb3678b.tar.gz ipxe-cf2178f885db34b73bd60973a1427add9cb3678b.tar.xz ipxe-cf2178f885db34b73bd60973a1427add9cb3678b.zip |
Added debug strings.
Diffstat (limited to 'src/include/gpxe/scsi.h')
-rw-r--r-- | src/include/gpxe/scsi.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/include/gpxe/scsi.h b/src/include/gpxe/scsi.h index 33cce327..4cc2b86d 100644 --- a/src/include/gpxe/scsi.h +++ b/src/include/gpxe/scsi.h @@ -147,9 +147,20 @@ union scsi_cdb { struct scsi_cdb_write_16 write16; struct scsi_cdb_read_capacity_10 readcap10; struct scsi_cdb_read_capacity_16 readcap16; - char bytes[16]; + unsigned char bytes[16]; }; +/** printf() format for dumping a scsi_cdb */ +#define SCSI_CDB_FORMAT "%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:" \ + "%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x" + +/** printf() parameters for dumping a scsi_cdb */ +#define SCSI_CDB_DATA(cdb) \ + (cdb).bytes[0], (cdb).bytes[1], (cdb).bytes[2], (cdb).bytes[3], \ + (cdb).bytes[4], (cdb).bytes[5], (cdb).bytes[6], (cdb).bytes[7], \ + (cdb).bytes[8], (cdb).bytes[9], (cdb).bytes[10], (cdb).bytes[11], \ + (cdb).bytes[12], (cdb).bytes[13], (cdb).bytes[14], (cdb).bytes[15] + /** @} */ /** A SCSI command */ |