2 ;;; Copyright (c) 1999 Massachusetts Institute of Technology
4 ;;; This program is free software; you can redistribute it and/or
5 ;;; modify it under the terms of the GNU General Public License as
6 ;;; published by the Free Software Foundation; either version 3 of the
7 ;;; License, or (at your option) any later version.
9 ;;; This program is distributed in the hope that it will be useful,
10 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
11 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 ;;; General Public License for more details.
14 ;;; You should have received a copy of the GNU General Public License
15 ;;; along with this program; if not, write to the Free Software
16 ;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 TITLE DMPCPY - COPY DUMPS FROM SWAP AREA TO FILE AREA
34 .INSRT SYSENG;FSDEFS >
39 ;DIRECTORIES WHERE STUFF MIGHT GET DUMPED OUT OF TIMESHARING
48 USRVAR: SIXBIT /OPTION/ ? TLO %OPINT\%OPOPC
49 SIXBIT /MASK/ ? MOVE [%PIIOC\%PIPDL]
52 GO: .CLOSE 1, ;RUNS AS DAEMON
54 MOVE TT,[-LUSRVAR,,USRVAR]
55 .CALL [ SETZ ? SIXBIT /USRVAR/
59 CHKTIM: .CALL [ SETZ ? SIXBIT /RQDATE/ ; don't frob with files
60 SETZM A ] ; if system doesn't know the time
63 MOVEI A,30.*15. ; 15 seconds
67 KNOTIM: MOVSI E,-NDIRS
68 CHKDIR: .CALL [ SETZ ? SIXBIT/OPEN/
74 JRST NXTDIR ; Hey, there might not -be- such a directory!
83 TLNE TT,UNDUMP\UNIGFL\UNREAP\UNLINK ; Don't screw with files
84 JRST NXTFIL ; you don't understand.
85 ;HERE WE HAVE FOUND A FILE WRITTEN OUT OF TIMESHARING
86 ;COPY IT SO AS TO (1) SET THE FILE DATE AND (2) GET IT OUT
87 ; OF THE SWAPPING AREA. NTS FILES ARE WRITTEN IN THE SWAPPING
88 ; AREA TO DECREASE THE PROBABILITY OF CLOBBERING SOME OTHER FILE.
89 .CALL [ SETZ ? SIXBIT/OPEN/
96 JSP T,[ CAIE TT,%ENSFL ; perhaps a hacker deleted it
97 CAIN TT,%ENAPK ; perhaps that pack had to go offline
100 .CALL [ SETZ ? SIXBIT/OPEN/
107 JSP T,[ CAIE TT,%EFLDR
109 MOVEI TT,30.*60.*5 ; 5 minutes
112 CPYFIL: MOVE TT,[-2000,,BUF]
122 ENDFIL: .CLOSE CHDSKI,
123 .CALL [ SETZ ? 'RENMWO
129 NXTFIL: ADDI D,LUNBLK
132 NXTDIR: AOBJN E,CHKDIR
136 ; JSP T,LOSE is like .LOSE %LSFIL(TT)
137 LOSE: .CALL [ SETZ ? SIXBIT /LOSE/
147 %PIIOC ? 0 ? %PIIOC ? 0 ? IOCINT
150 ; If there is a disk or directory full problem, wait for someone to notice.
157 CAIE T,11 ; DEVICE FULL
158 CAIN T,14 ; DIRECTORY FULL
162 WAIT: MOVEI T,30.*60.*5 ; 5 minutes
165 .CALL [ SETZ ? SIXBIT /DISMIS/