.ONERR ERXIT
.ENABLE SUBSTITUTION
; EXEDRVMOD.CMD - Command file to apply Goodyear Aerospace Corp. developed
;                 patches to RSX11M, PMT, and COT to support loadable
;                 device drivers with loadable data bases.
;                 MDSUB.MAC is corrected to properly support disc
;		  write checking.
;
; Extract new RSX-11M version modules that are effected by the COT
; modifications.
;
.SETS SAVUIC "'<UIC>'"
.SETF INSPIP
.IFNINS PIP .SETT INSPIP
.IFT INSPIP INS LB:'<SYSUIC>'PIP
SET /UIC=[1,24]
.TESTFILE KT3:COTOLB.VGN;1
.IF <FILERR> EQ 1 .GOTO DOPTCH
PIP KT3:COTOLB.VGN;1/RE=KT3:COT.OLB;0
PIP KT3:COT.OLB/NV/-CD=KT3:COTOLB.VGN;1
.DOPTCH:
SET /UIC='SAVUIC'
.IFINS DOB REM DOB
INS MD0:'<UIC>'DOBNLB
DOB MD0:COTDSP.VGN=KT3:[1,24]COTOLB.VGN;1/LB:COTDSP
DOB MD0:COTINI.VGN=KT3:[1,24]COTOLB.VGN;1/LB:COTINI
REM DOB
.SETF INSLBR
.IFNINS LBR .SETT INSLBR
.IFT INSLBR INS LB:'<SYSUIC>'LBR
;
; Apply the changes to the modules extracted from libraries, and to
; RSX11M source files.
;
.SETF INSSLP
.IFNINS SLP .SETT INSSLP
.IFT INSSLP INS LB:'<SYSUIC>'SLP
SLP @MD0:EXEDRVMOD.COR
.IFT INSSLP REM SLP
;
; Now test if the modules have been patched properly.
; If any of the file compares that follow generate differences, it
; means that the new release of RSX11M contains a change to the base
; module.  The reason for the difference and its effect on a newly
; generated system must be determined before continuing.
;
.SETF INSCMP
.IFNINS CMP .SETT INSCMP
.IFT INSCMP INS LB:'<SYSUIC>'CMP
CMP TI:/-CO/-TB=MD0:COTDSP.MAC;2,;1
CMP TI:/-CO/-TB=MD0:COTINI.MAC;2,;1
CMP TI:/-CO/-TB=MD0:INITL.MAC;2,;1
CMP TI:/-CO/-TB=MD0:PMT.MAC;2,;1
CMP TI:/-CO/-TB=MD0:SYSCM.MAC;2,;1
CMP TI:/-CO/-TB=MD0:MDSUB.MAC;2,;1
.IFT INSCMP REM CMP
.ASK [<TRUE>:10S] Q Did all of the file compares pass
.IFT Q .GOTO 10
;
; At this point, the cause(s) for the file compare errors must be
; determined.  This process is exiting in order that such an evaluation
; may take place.
;
.IFT INSLBR REM LBR
.IFT INSPIP REM PIP
.EXIT 1
.ERXIT:
.EXIT 4
.10:
;
; Now assemble the changed modules, and insert them into the
; distribution library (COT.OLB).
; Also, return changed executive sources to source directory.
; The unchanged libraries have been renamed to *.VGN;1 files.
;
.SETF INSMAC
.IFNINS MAC .SETT INSMAC
.IFT INSMAC INS LB:'<SYSUIC>'MAC
MAC MD0:COTDSP=MD0:COTDSP
MAC MD0:COTINI=MD0:COTINI
.IFT INSMAC REM MAC
SET /UIC=[1,24]
LBR KT3:COT/RP=MD0:'SAVUIC'COTDSP,COTINI
.IFT INSLBR REM LBR
SET /UIC=[11,10]
PIP KT1:/NV/-CD=MD0:'SAVUIC'INITL.MAC;2
PIP KT1:/NV/-CD=MD0:'SAVUIC'PMT.MAC;2
PIP KT1:/NV/-CD=MD0:'SAVUIC'SYSCM.MAC;2
PIP KT1:/NV/-CD=MD0:'SAVUIC'MDSUB.MAC;2
SET /UIC='SAVUIC'
PIP MD0:*.OBJ;1/DE,*.VGN;1
PIP MD0:COTINI.MAC;2/DE
PIP MD0:COTDSP.MAC;2/DE
PIP MD0:INITL.MAC;2/DE
PIP MD0:PMT.MAC;2/DE
PIP MD0:SYSCM.MAC;2/DE
PIP MD0:MDSUB.MAC;2/DE
.IFT INSPIP REM PIP
;
; This completes the application of the EXEDRVMOD modifications.
;
