diff options
Diffstat (limited to 'examples/sg_excl.c')
-rw-r--r-- | examples/sg_excl.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/examples/sg_excl.c b/examples/sg_excl.c index 6f9aa3ad..de84905c 100644 --- a/examples/sg_excl.c +++ b/examples/sg_excl.c @@ -22,7 +22,7 @@ Invocation: sg_excl [-x] <sg_device> - Version 3.58 (20130731) + Version 3.59 (20160528) 6 byte INQUIRY command: [0x12][ |lu][pg cde][res ][al len][cntrl ] @@ -43,9 +43,9 @@ int main(int argc, char * argv[]) { int sg_fd, k, ok /*, sg_fd2 */; - unsigned char inqCmdBlk [INQ_CMD_LEN] = + unsigned char inq_cdb [INQ_CMD_LEN] = {0x12, 0, 0, 0, INQ_REPLY_LEN, 0}; - unsigned char turCmdBlk [TUR_CMD_LEN] = + unsigned char tur_cdb [TUR_CMD_LEN] = {0x00, 0, 0, 0, 0, 0}; unsigned char inqBuff[INQ_REPLY_LEN]; sg_io_hdr_t io_hdr; @@ -103,13 +103,13 @@ int main(int argc, char * argv[]) /* Prepare INQUIRY command */ memset(&io_hdr, 0, sizeof(sg_io_hdr_t)); io_hdr.interface_id = 'S'; - io_hdr.cmd_len = sizeof(inqCmdBlk); + io_hdr.cmd_len = sizeof(inq_cdb); /* io_hdr.iovec_count = 0; */ /* memset takes care of this */ io_hdr.mx_sb_len = sizeof(sense_buffer); io_hdr.dxfer_direction = SG_DXFER_FROM_DEV; io_hdr.dxfer_len = INQ_REPLY_LEN; io_hdr.dxferp = inqBuff; - io_hdr.cmdp = inqCmdBlk; + io_hdr.cmdp = inq_cdb; io_hdr.sbp = sense_buffer; io_hdr.timeout = 20000; /* 20000 millisecs == 20 seconds */ /* io_hdr.flags = 0; */ /* take defaults: indirect IO, etc */ @@ -154,10 +154,10 @@ int main(int argc, char * argv[]) /* Prepare TEST UNIT READY command */ memset(&io_hdr, 0, sizeof(sg_io_hdr_t)); io_hdr.interface_id = 'S'; - io_hdr.cmd_len = sizeof(turCmdBlk); + io_hdr.cmd_len = sizeof(tur_cdb); io_hdr.mx_sb_len = sizeof(sense_buffer); io_hdr.dxfer_direction = SG_DXFER_NONE; - io_hdr.cmdp = turCmdBlk; + io_hdr.cmdp = tur_cdb; io_hdr.sbp = sense_buffer; io_hdr.timeout = 20000; /* 20000 millisecs == 20 seconds */ |