/ ATG_FT_PATCH, Utilities, ATG FTDRIVER patch kit   & ATG FTDRIVER patch kit, release X01.05 Nick de Smith, 06-Jan-92  
 Comments etc.  Nick de Smith (ATG310::NICK)- NICK@NCDLAB.ULCC.AC.UK	PSI%234213300154::NICK   I The ATG_FT patches allow programs using the DEC supplied pseudo-terminals N (FTAn:) to set the access port name string for the device, such that a $GETDVIJ with DVI$_TT_ACCPORNAM can retrieve the name. This also means that a "SHOW1 TERMINAL" command will also display the set name.   M This code has been checked by DEC, but carries no warranty from them, or from G the author. However, it has been carefully field tested in both SMP and ) uniprocessor environments up to VMS V5.5.      Changes in X01.05 J 1. You can no longer use DVI$_LOCKID to return the PID of the process thatH called PTD$CREATE to generate the FTAn: device. The problem was that theP PCB$L_CPID field (which has the same address as PCB$L_LOCKID) is used by the VMSH UCB create/delete processing code to credit byte count quota back to theO creating process. Use of DVI$_LOCKID now returns the MPID (which is the IPID of I the master process in the job tree), rather than the EPID of the creating N process.  To convert an IPID to an EPID (the one used by SHOW SYSTEM etc.) use5 the ATG_CONVERT_IPID_TO_EPID.MAR routine in this kit.   M Note that this will not generally be a problem as the master process in a job J tree will almost certainly be the creator of the FT device, unless you are running in a sub-process.   M 2. A couple of potential problems were revealed during the code review by DEC N (thanks). These related to possible page faults at elevated IPLs, and have now
 been removed.      Installation ------------   Execute (in order):  	$ @ATG_FT_BUILD.COM 	$ @ATG_FT_INSTALL.COM 	$ @ATG_FT_START.COMI You will need CMKRNL and BYPASS (or similar) to execute ATG_FT_START.COM.    Usage  -----   L Once you have built, installed and started the ATG FTDRIVER patches, you may use: 	unsigned long l_status;9 	unsigned short w_chan;		/* Returned from PDT$CREATE() */ 3 	$DESCRIPTOR( x_accpornam, "an access port name" ); # 	$DESCRIPTOR( x_devnam, "FTA34:" );   H 	l_status = ATG_FT_SET_ACCPORNAM( w_chan, [ &x_devnam ], &x_accpornam );   	Returned status:  		SS$_NORMAL	Success2 		SS$_IVCHAN	Illegal channel (not from PDT$CREATE), 		SS$_IVDEVNAM	"devnam" was not an FT device& 		SS$_NOSUCHDEV	"devnam" was not found 		SS$_DEVOFFLINE	Device offline - 		SS$_NOPRIV	No privilege (wrong access mode) 0 		SS$_ACCVIO	Invalid string descriptor specified3 		SS$_UNSUPPORTED	ATG_FT_START has not been run yet 4 		SS$_BADPARAM	Specified string > 63 characters long& 				or both "chan" and "devnam" are 0.   ;	The routine supplied is: ; F ;	sts.wl = ATG_FT_SET_ACCPORNAM( chan.rw.v, [devnam.rx.d], text.rx.d ) ;  ;	sts	longword, write, by value  ;		Returned system status  ;  ;	chan	word, read, by value 0 ;		Channel number of FT device (from PTD$CREATE)A ;		If this word is 0, the "devnam" argument is used to locate the 	 ;		device  ; . ;	devnam	string, read, by descriptor, optional@ ;		Device name of FT device to modify. Used only if "chan" is 0.C ;		You must have LOGICAL access to the device to specify it by name  ; " ;	text	string, read, by descriptor< ;		Access port name string to set. Must be <= 63 characters. ;		   A To call ATG_FT_SET_ACCPORNAM, you have to link your program thus:    	$ LINK .....,SYS$INPUT/Option 	...  	SYS$SHARE:ATG_FT_USS.EXE /Share 	... 	$!      Source files ------------* The following files are in this directory:   ATG_FT_BUILD.COMG Builds ATG_FT_PATCH.EXE, ATG_FT_USS.EXE and ATG_FT_START.EXE from their  appropriate .MAR files.    ATG_FT_INSTALL.COMD Installs ATG_FT_PATCH.EXE in SYS$COMMON:[SYS$LDR], ATG_FT_USS.EXE in> SYS$COMMON:[SYSLIB] and ATG_FT_START.* in SYS$COMMON:[SYSMGR].   ATG_FT_START.COMN File used to start up the ATG FTDRIVER patches. Should normally be called fromG within SYS$STARTUP:SYSTARTUP_V5.COM, but may be executed any time after J ATG_FT_INSTALL.COM. CMKRNL and SYSNAM (or SYSPRV or BYPASS) privileges are needed.    ATG_FT_PATCH.MAR6 Source for ATG_FT_PATCH.EXE (used by ATG_FT_BUILD.COM)   ATG_FT_USS.MAR4 Source for ATG_FT_USS.EXE (used by ATG_FT_BUILD.COM)  # ATG_FT_START.MAR, LOADER_ERRORS.MSG 6 Source for ATG_FT_START.EXE (used by ATG_FT_BUILD.COM)K Note that LOADER_ERRORS.MSG is the file of error messsages generated by the H LDR$xxxx routines. It is needed here to enable ATG_FT_START.EXE to printP meaningful messages if there are any problems. Copyright of LOADER_ERRORS.MSG is	 with DEC.    [end] 