I am getting an EFAULT error 14 (Bad Address) on AIX 5L but I don't see this on AIX 4.3.3. Doesn't matter if it is built on 5L. Is STIOCMD supported by 5L?
struct sc_iocmd scmd;
(void) memset((char *)&scmd, 0, sizeof(scmd));
scmd.scsi_cdb[0] = 0x12;
scmd.scsi_cdb[1] = 0x0;
scmd.scsi_cdb[2] = 0x0;
scmd.scsi_cdb[3] = 0x0;
scmd.scsi_cdb[4] = 0x38;
scmd.scsi_cdb[5] = 0x0;
scmd.command_length = 0x06;
scmd.buffer = inq_data;
scmd.data_length = sizeof (inq_data);
scmd.flags = B_READ;
scmd.timeout_value = 60
if ( ioctl(fd, STIOCMD, &scmd) < 0 ) {
printf( "ioctl error on inquiry\n");
printf( "Errno: %d\n", errno);
(The device I am accessing is a tape drive.)
Thanks!
struct sc_iocmd scmd;
(void) memset((char *)&scmd, 0, sizeof(scmd));
scmd.scsi_cdb[0] = 0x12;
scmd.scsi_cdb[1] = 0x0;
scmd.scsi_cdb[2] = 0x0;
scmd.scsi_cdb[3] = 0x0;
scmd.scsi_cdb[4] = 0x38;
scmd.scsi_cdb[5] = 0x0;
scmd.command_length = 0x06;
scmd.buffer = inq_data;
scmd.data_length = sizeof (inq_data);
scmd.flags = B_READ;
scmd.timeout_value = 60
if ( ioctl(fd, STIOCMD, &scmd) < 0 ) {
printf( "ioctl error on inquiry\n");
printf( "Errno: %d\n", errno);
(The device I am accessing is a tape drive.)
Thanks!