aboutsummaryrefslogtreecommitdiff
path: root/examples/sg_simple1.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/sg_simple1.c')
-rw-r--r--examples/sg_simple1.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/examples/sg_simple1.c b/examples/sg_simple1.c
index 73ba76e9..d8352678 100644
--- a/examples/sg_simple1.c
+++ b/examples/sg_simple1.c
@@ -26,7 +26,7 @@
Invocation: sg_simple1 [-x] <scsi_device>
- Version 03.58 (20070312)
+ Version 03.59 (20160528)
6 byte INQUIRY command:
[0x12][ |lu][pg cde][res ][al len][cntrl ]
@@ -45,9 +45,9 @@
int main(int argc, char * argv[])
{
int sg_fd, k, ok;
- 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;
@@ -95,13 +95,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 */
@@ -146,10 +146,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 */