HP-UX Reference (11i v2 03/08) - 5 Miscellaneous Topics, 7 Device (Special) Files, 9 General Information, Index (vol 9)

s
scsi(7) scsi(7)
device 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
sdisk/schgr/sflop/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:
0 Release exclusive access to logical unit (LUN).
1 Gain exclusive access to logical unit (LUN).
2 Release exclusive access to associated SCSI target.
3 Gain exclusive access to associated SCSI target.
4 Release exclusive access to associated SCSI bus.
5 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.
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), scsi_ctl(7), scsi_disk(7), scsi_tape(7).
HP-UX 11i Version 2: August 2003 4 Hewlett-Packard Company Section 7133