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

s
scsi(7) scsi(7)
On systems that support the scsi_ctl interface, the
SIOC_CMD_MODE, SIOC_SET_CMD , and
SIOC_RETURN_STATUS
ioctls are obsolete (see scsi_ctl(7)). Direct manipulation of SCSI devices via the
scsi_ctl interface provides a more functionally complete and easier-to-use means of low level SCSI dev-
ice control (see scsi_ctl(7)).
Drivers that support only devices which have no meaningful size may not support the
SIOC_CAPACITY
ioctl. Total device size in bytes may exceed 2
32
1 for some devices.
DEPENDENCIES
esdisk/estape/eschgr/sdisk/schgr/stape
The SIOC_EXCLUSIVE
ioctl may be used to obtain and release exclusive access. Exclusive access, which
prevents simultaneous access by other applications, is required for some operations and may be desirable in
other circumstances. The following exclusive access control arguments are supported. The corresponding
values are defined in
<sys/scsi.h> If the ioctl is issued on a persistent device file, target and bus
exclusive access actually result to LUN exclusive access.
SIOC_REL_LUN_EXCL Release exclusive access to logical unit (LUN).
SIOC_SET_LUN_EXCL Gain exclusive access to logical unit (LUN).
SIOC_REL_TGT_EXCL Release exclusive access to associated SCSI target.
SIOC_SET_TGT_EXCL Gain exclusive access to associated SCSI target.
SIOC_REL_BUS_EXCL Release exclusive access to associated SCSI bus.
SIOC_SET_BUS_EXCL Gain exclusive access to associated SCSI bus.
The
SIOC_MEDIUM_CHANGED
ioctl indicates when the media in a removable-media device may have
changed. A value of "1" indicates the device media may have changed since the last
SIOC_MEDIUM_CHANGED
ioctl call. Note that only the first such call after a media change receives this
indication. This means that media changes are likely to be missed if multiple applications are attempting
to detect media changes. Exclusive access, obtained through use of the
SIOC_EXCLUSIVE
ioctl, can be
used to avoid this problem.
The following information is included from
<sys/scsi.h> :
#define SIOC_MEDIUM_CHANGED _IOR(’S’, 42, int)
#define SIOC_EXCLUSIVE _IOR(’S’, 68, int)
disc3
The SIOC_VPD_INQUIRY
ioctl allows access to detailed device specific information. The page_code
field specifies which SCSI vital product data page is requested. The page_buf field is filled with the
requested page data. This ioctl when issued on a legacy device file only attempts to send the INQUIRY
command through the LUN path corresponding to the legacy device file even if multi-pathing is enabled on
legacy device files.
The following information is included from
<sys/scsi.h> :
#define SIOC_VPD_INQUIRY _IOWR(’S’, 10, struct vpd_inquiry)
/* union for SIOC_VPD_INQUIRY ioctl */
struct vpd_inquiry {
char page_code; /* VPD page code */
char page_buf[126]; /* buffer for VPD page info */
};
FILES
/usr/include/sys/scsi.h
SEE ALSO
diskinfo(1M), ioctl(2), autochanger(7), intro(7), scsi_ctl(7), scsi_disk(7), scsi_tape(7).
HP-UX 11i Version 3: February 2007 6 Hewlett-Packard Company 153