Browse Source

Added debug strings.

tags/v0.9.3
Michael Brown 18 years ago
parent
commit
cf2178f885
1 changed files with 12 additions and 1 deletions
  1. 12
    1
      src/include/gpxe/scsi.h

+ 12
- 1
src/include/gpxe/scsi.h View File

@@ -147,9 +147,20 @@ union scsi_cdb {
147 147
 	struct scsi_cdb_write_16 write16;
148 148
 	struct scsi_cdb_read_capacity_10 readcap10;
149 149
 	struct scsi_cdb_read_capacity_16 readcap16;
150
-	char bytes[16];
150
+	unsigned char bytes[16];
151 151
 };
152 152
 
153
+/** printf() format for dumping a scsi_cdb */
154
+#define SCSI_CDB_FORMAT "%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:" \
155
+			"%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x"
156
+
157
+/** printf() parameters for dumping a scsi_cdb */
158
+#define SCSI_CDB_DATA(cdb)						  \
159
+	(cdb).bytes[0], (cdb).bytes[1], (cdb).bytes[2], (cdb).bytes[3],	  \
160
+	(cdb).bytes[4], (cdb).bytes[5], (cdb).bytes[6], (cdb).bytes[7],	  \
161
+	(cdb).bytes[8], (cdb).bytes[9], (cdb).bytes[10], (cdb).bytes[11], \
162
+	(cdb).bytes[12], (cdb).bytes[13], (cdb).bytes[14], (cdb).bytes[15]
163
+
153 164
 /** @} */
154 165
 
155 166
 /** A SCSI command */

Loading…
Cancel
Save