HP-UX Reference (11i v2 07/12) - 7 Device (Special) Files, 9 General Information, Index (vol 10)

s
scsi(7) scsi(7)
unsigned char added_len;
unsigned char resv2[2];
unsigned int reladr:1;
unsigned int wbus32:1;
unsigned int wbus16:1;
unsigned int sync:1;
unsigned int linked:1;
unsigned int resv3:1;
unsigned int cmdque:1;
unsigned int sftre:1;
char vendor_id[8];
char product_id[16];
char rev_num[4];
unsigned char vendor_spec[20];
unsigned char resv4[40];
unsigned char vendor_parm_bytes[32];
};
/* union for SIOC_INQUIRY ioctl */
union inquiry_data {
struct inquiry inq1; /* SCSI-1 inquiry */
struct inquiry_2 inq2; /* SCSI-2 inquiry */
};
/* structure for SIOC_CAPACITY ioctl */
struct capacity {
uint32_t lba;
uint32_t blksz;
};
/* structure for SIOC_STORAGE_CAPACITY ioctl */
typedef struct {
uint64_t lba;
uint32_t blksz;
} storage_capacity_t;
The SIOC_XSENSE ioctl returns detailed information about device status and errors when such informa-
tion is available. Since there have been multiple versions of the SCSI standard for sense (status) data, mul-
tiple versions of the sense data declaration are provided. The SCSI-1 and non-aligned versions are pro-
vided for backward compatibility only. If no new CHECK-CONDITION-caused REQUEST SENSE com-
mand data has been obtained since the last
SIOC_XSENSE ioctl call, the
xsense_aligned.error_class
and sense_2_aligned.error_code
fields will contain the
value zero. Applications which require more accurate REQUEST SENSE data handling should use the
SCSI device-control driver (see scsi_ctl(7)).
The following information is included from
<sys/scsi.h> :
#define SIOC_XSENSE _IOR(’S’, 7, union sense_data)
/* structure for SIOC_XSENSE ioctl */
union sense_data {
struct xsense_aligned r_sense1a; /* SCSI and CCS devices */
struct sense_2_aligned r_sense2a; /* SCSI-2 devices */
};
/* structure for SCSI-1 and SCSI-CCS sense data */
struct xsense_aligned {
unsigned int valid:1;
unsigned int error_class:3;
unsigned int error_code:4;
unsigned char seg_num;
unsigned int parms:4;
unsigned int sense_key:4;
unsigned char lba[4];
unsigned char add_len;
unsigned char copysearch[4];
HP-UX 11i Version 2: December 2007 Update 2 Hewlett-Packard Company 147