Originally posted by: SystemAdmin
I am getting an EFAULT error 14 (Bad Address) on AIX 5L but I don't see this on AIX 4.3.3. The application was built on AIX 4.3.3.
struct sc_iocmd scmd;
bzero((char *)&scmd, 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.)
Is STIOCMD supported on 5L?
As I mentioned above I don't have any problems on 4.3.3.
Thanks!
#AIX-Forum