Open SCSI Integrator's Manual for NonStop S-Series Servers

The Open SCSI I/O Process (IOP)
Open SCSI Integrator’s Manual for NonStop Servers422988-002
4-2
Using the FILE_OPEN_ Procedure
The remainder of this subsection discusses only those aspects of these Guardian
procedure calls that apply to the Open SCSI interface.
Using the FILE_OPEN_ Procedure
The Guardian FILE_OPEN_ procedure establishes a communications path between an
application process and a file. When FILE_OPEN_ successfully finishes, it returns a file
number to the caller. The file number identifies this communications path in subsequent
file-system procedure calls. The syntax of the FILE_OPEN_ procedure call is:
error
This is an integer value returned from the file system indicating the outcome of the
operation. See the parameter filenum.
filename:length
If the application or driver wants to open a device controlled by the Open SCSI IOP,
it must supply the name of the device (and the length of the name) as specified to
SYSGENR. This is a required parameter pair.
filenum
Upon successful completion of a FILE_OPEN_ procedure call to open a SCSI
driver, filenum returns a file number to be used for future I/O operations with that
device. If FILE_OPEN_ fails, a value of -1 is returned in filenum and no further
I/O operations should be attempted using that value of filenum.
access
This parameter is optional. If access appears, it specifies a direction mode. In
subsequent I/O operations that use the passthrough mode, the Open SCSI IOP
checks the direction bits in the flag field of the CAM control block (CCB) for
consistency with the direction mode specified by access.
exclusion
This parameter is not handled directly by the Open SCSI IOP.
Note. For a complete description of the purpose, use, syntax, parameters, and limitations of
the Guardian procedure calls, refer to the Guardian Procedure Calls Reference Manual.
error := FILE_OPEN_ ( filename:length ! i:i
,filenum ! i,o
,[access] ! i
,[exclusion] ! i
,[nowait-depth] ! i
,[sync-depth] ! i
,[options] ! i
,[seq-buffer-id] ! i
,[seq-buffer-len] ! i
,[primary-processhandle] ); ! i