Library /sys$common/syshlp/LD$HELP.HLB  —  LD  Driver functions, Connect
 	This function connects a file to a logical disk:

 	Method 1 (old):

 	Function:	IO$_LD_CONTROL

 	P1 = address of SBK block (Attributes Statistics Block) returned
 	     by XQP IO$_ACCESS!IO$M_ACCESS function used to open the file
 	     to connect.
 	P2 = logical disk size. If 0, the allocated size will be used
 	P3 = Number of tracks (optional)
 	P4 = Number of sectors (optional)
 	P5 = Number of cylinders (optional)
 	P6 = Subfunction: LDIO$K_CONNECT

 	Method 2 (new, preferred):

 	Function:	IO$_LD_CONTROL

 	P1 = address of itemlist describing the connection
 	P6 = Subfunction: LDIO$K_CONNECT | LDIO$M_ITEMLIST

 	The P6 argument may also contain the following sub-flags:

 	LDIO$M_LOCK	Will lock the container file
 	LDIO$M_NOFE	Will set the NOFE bit to prevent handling
 			forced errors.

 	The itemlist consist of entries like this:

         BUFLEN  (word)     - Length of buffer
         ITEM    (word)     - Item description:
 			     LDITM$K_CHANNEL
 			     LDITM$K_EXTENDSIZE
 			     LDITM$K_EXTENDLIMIT
 			     LDITM$K_DEVICENAME
 			     LDITM$K_FILEID
 			     LDITM$K_STARTLBN
 			     LDITM$K_ENDLBN
 			     LDITM$K_FLAGS
 			     LDITM$K_TRACKS
 			     LDITM$K_CYLINDERS
 			     LDITM$K_SECTORS
 			     LDITM$K_MAXBLOCKS
         ADDR (longword)    - Pointer to buffer
         RLENGTH (longword) - Returned data length

 	The following flags are for tape use only:

 	LDIO$M_INIT	Will init the tape metadata
 	LDIO$M_NOLOAD	Will create the unit without an attached containerfile
 	LDIO$M_LOADONLY	Will load a containerfile to an existing unit
 	LDIO$M_EXTEND   Extend containerfile on demand

 	This function connects a complete physical disk to a logical disk:

 	Function:	IO$_LD_CONTROL

 	P1 = descriptor of buffer which contains device name of
 	     physical device
 	P6 = Subfunction: LDIO$K_CONNECT | LDIO$M_REPLACE

 	This function connects a partial physical disk to a logical disk:

 	Function:	IO$_LD_CONTROL

 	P1 = descriptor of buffer which contains device name of
 	     physical device
 	P2 = Starting LBN (logical block number)
 	P3 = Ending LBN
 	P4 = Number of LBN's
 	P6 = Subfunction: LDIO$K_CONNECT | LDIO$M_LBN

 	Either P3 or P4 must be specified.

 	IOSB word 0 = status

 	Errors returned:

 	SS$_DEVACTIVE	Device already connected
 	SS$_FORMAT	FCB specified in SBK is invalid or file not opened
 	SS$_ACCVIO	One of the parameters cannot be read/written
 	SS$_IVDEVNAM	Attempt to connect to devicetype other than a disk
 	SS$_FILNOTCNTG	Logical disk file not contiguous
 	SS$_DATAOVERUN	Filename of file to connect too long
 	SS$_FILALRACC	File already in use (may be on other cluster nodes)
 	SS$_ILLKLKNUM	Disk size specified in P2 past end of file
 	SS$_IVADDR	Disk bigger than 2097151 blocks
 	SS$_NORMAL	Successful completion
 	SS$_BADPARAM	Invalid geometry information specified
 	SS$_NOSUCHNODE	Shared access was specified while no cluster code
 			is loaded
 	SS$_ACCONFLICT	Shared access was specified while the device is
 			not cluster-wide visible
 	SS$_WRONGACP	Container file is not on ODS-2 or ODS-5 disk
 	SS$_WRONGSTATE	Container file is not opened without caching (V8.2 and up)
 	SS$_BADFILESIZE	Container file too small (needs at least 5000 blocks) (Only for tape)

 	The following errors are returned for LDIO$M_REPLACE or
 	LDIO$M_LBN only:

 	SS$_DEVFOREIGN	Device foreign mounted
 	SS$_DEVMOUNT	Device mounted
 	SS$_DEVALLOC	Device already allocated

 	Other possible errors are errors returned by the lockmanager
 	and errors returned by IOC$SEARCH.
Close Help