/ATG_FT_PATCH, Utilities, ATG FTDRIVER patch kit&ATG FTDRIVER patch kit, release X01.05Nick de Smith, 06-Jan-92 Comments etc.Nick de Smith (ATG310::NICK)-NICK@NCDLAB.ULCC.AC.UK PSI%234213300154::NICKIThe ATG_FT patches allow programs using the DEC supplied pseudo-terminalsN(FTAn:) to set the access port name string for the device, such that a $GETDVIJwith DVI$_TT_ACCPORNAM can retrieve the name. This also means that a "SHOW1TERMINAL" command will also display the set name.MThis code has been checked by DEC, but carries no warranty from them, or fromGthe author. However, it has been carefully field tested in both SMP and)uniprocessor environments up to VMS V5.5.Changes in X01.05J1. You can no longer use DVI$_LOCKID to return the PID of the process thatHcalled PTD$CREATE to generate the FTAn: device. The problem was that thePPCB$L_CPID field (which has the same address as PCB$L_LOCKID) is used by the VMSHUCB create/delete processing code to credit byte count quota back to theOcreating process. Use of DVI$_LOCKID now returns the MPID (which is the IPID ofIthe master process in the job tree), rather than the EPID of the creatingNprocess. To convert an IPID to an EPID (the one used by SHOW SYSTEM etc.) use5the ATG_CONVERT_IPID_TO_EPID.MAR routine in this kit.MNote that this will not generally be a problem as the master process in a jobJtree will almost certainly be the creator of the FT device, unless you arerunning in a sub-process.M2. A couple of potential problems were revealed during the code review by DECN(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.COMIYou will need CMKRNL and BYPASS (or similar) to execute ATG_FT_START.COM.Usage-----LOnce you have built, installed and started the ATG FTDRIVER patches, you mayuse: 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 yet4 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 value0; 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.; ATo 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.COMGBuilds ATG_FT_PATCH.EXE, ATG_FT_USS.EXE and ATG_FT_START.EXE from theirappropriate .MAR files.ATG_FT_INSTALL.COMDInstalls 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.COMNFile used to start up the ATG FTDRIVER patches. Should normally be called fromGwithin SYS$STARTUP:SYSTARTUP_V5.COM, but may be executed any time afterJATG_FT_INSTALL.COM. CMKRNL and SYSNAM (or SYSPRV or BYPASS) privileges areneeded.ATG_FT_PATCH.MAR6Source for ATG_FT_PATCH.EXE (used by ATG_FT_BUILD.COM)ATG_FT_USS.MAR4Source for ATG_FT_USS.EXE (used by ATG_FT_BUILD.COM)#ATG_FT_START.MAR, LOADER_ERRORS.MSG6Source for ATG_FT_START.EXE (used by ATG_FT_BUILD.COM)KNote that LOADER_ERRORS.MSG is the file of error messsages generated by theHLDR$xxxx routines. It is needed here to enable ATG_FT_START.EXE to printPmeaningful messages if there are any problems. Copyright of LOADER_ERRORS.MSG is with DEC.[end]