Using the SC_SINGLE Option

The SC_SINGLE option causes the SCSI device driver to issue a normal open, but does not allow another caller to issue another open until the first caller has closed the device. This request gives the caller an exclusive open to the selected device. If this openx is attempted when the device is already open, a return value of -1 is passed, with the errno global variable set to a value of EBUSY.

Once sucessfully opened, the device is placed in Exclusive Access mode. If another caller tries to do any type of open, a return value of -1 is passed, with the errno global variable set to a value of EACCES.

The remaining options for the ext parameter are reserved for future requirements.

Implementation note: The following table shows how the various combinations of ext options should be handled in the SCSI device driver.

EXT OPTIONS openx ext option Device Driver Action
none Open: normal. Close: normal.
diag Open: no SCSI commands. Close: no SCSI commands.
diag + force Open: issue SCIORESET otherwise, no SCSI commands issued. Close: no SCSI commands.
diag + force + no_reserve Open: issue SCIORESET; otherwise, no SCSI commands isssued. Close: no SCSI commands.
diag + force + no_reserve + single Open: issue SCIORESET; otherwise, no SCSI commands isssued. Close: no SCSI commands.
diag + force +retain Open: issue SCIORESET; otherwise, no SCSI commands issued. Close: no SCSI commands.
diag + force +retain + no_reserve Open: issue SCIORESET; otherwise, no SCSI commands issued. Close: no SCSI commands.
diag + force +retain + no_reserve + single Open: issue SCIORESET; otherwise, no SCSI commands issued. Close: no SCSI commands.
diag + force +retain + single Open: issue SCIORESET; otherwise, no SCSI commands issued. Close: no SCSI commands.
diag + force + single Open: issue SCIORESET; otherwise, no SCSI commands issued. Close: no SCSI commands.
diag+no_reserve Open: no SCSI commands. Close: no SCSI commands.
diag + retain Open: no SCSI commands. Close: no SCSI commands.
diag + retain + no_reserve Open: no SCSI commands. Close: no SCSI commands.
diag + retain + no_reserve + single Open: no SCSI commands. Close: no SCSI commands.
diag + retain + single Open: no SCSI commands. Close: no SCSI commands.
diag + single Open: no SCSI commands. Close: no SCSI commands.
diag + single + no_reserve Open: no SCSI commands. Close: no SCSI commands.
force Open: normal, except SCIORESET issued prior toany SCSI commands. Close: normal.
force + no_reserve Open: normal except SCIORESET issued prior to any SCSI commands. No RESERVE command issued. Close: normal except no RELEASE.
force + retain Open: normal, except SCIORESET issued prior to any SCSI commands. Close: no RELEASE.
force + retain + no_reserve Open: normal except SCIORESET issued prior to any SCSI commands. No RESERVE command issued. Close: no RELEASE.
force + retain + no_reserve + single Open: normal except SCIORESET issued prior to any SCSI commands. No RESERVE command issued. Close: no RELEASE.
force + retain + single Open: normal except SCIORESET issued prior to any SCSI commands. Close: no RELEASE.
force + single Open: normal except SCIORESETissued prior to any SCSI commands. Close: normal.
force + single + no_reserve Open: normal except SCIORESET issued prior to any SCSI commands. No RESERVE command issued. Close: no RELEASE.
no_reserve Open: no RESERVE. Close: no RELEASE.
retain Open: normal. Close: no RELEASE.
retain + no_reserve Open: no RESERVE. Close: no RELEASE.
retain + single Open: normal. Close: no RELEASE.
retain + single + no_reserve Open: normal except no RESERVE command issued. Close: no RELEASE.
single Open: normal. Close: normal.
single + no_reserve Open: no RESERVE. Close: no RELEASE.