瀏覽代碼

Added debug strings.

tags/v0.9.3
Michael Brown 18 年之前
父節點
當前提交
cf2178f885
共有 1 個檔案被更改,包括 12 行新增1 行删除
  1. 12
    1
      src/include/gpxe/scsi.h

+ 12
- 1
src/include/gpxe/scsi.h 查看文件

@@ -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…
取消
儲存