Google
 

Trailing-Edge - PDP-10 Archives - bb-bt99g-bb - qsrmda.c10
There are 2 other files named qsrmda.c10 in the archive. Click here to see a list.
 REP 50/49	;10C1
		JRST	[SETZM P2		;YES,,ZAP VSL QUEUE PTR
			 JRST  MNTV.8 ]		;   AND EXIT
 WIT
	;**;[1225] Change code at MNTV.1+12L. /LWS
		JRST	[MOVE  S1,P4		;[1225] GET PRIMARY VSL ADDRESS
			 PUSHJ P,TELOPR		;[1225] TELL OPR OF MOUNT
			 $RETF]			;[1225] RETURN FALSE
 REP 44/86	;10C2
		PUSHJ	P,FNDDSK		;YES,,GO FIND IT IN OUR DATA BASE
		JUMPF	ALIA.9			;NOT FOUND,,THATS AN ERROR
		SKIPE	.VLPTR(S1)		;ANY POINTERS SET UP ???
		JRST	ALIA.9			;YES,,THATS AN ERROR
 WIT
	;**;[1227] Change 1 line and delete 2 lines at ALIA.3+2L. /LWS
		PUSHJ	P,FNDVOL		;[1227] YES,,GO FIND IT IN OUR DATA BASE
		JUMPF	ALIA.9			;NOT FOUND,,THATS AN ERROR
 REP 17/87	;10C3
		JRST	ALIA.6			;YES
		LOAD	S2,.VLFLG(S1),VL.STA	;GET STR STATUS
		CAIN	S2,%STAMN		;MOUNTED?
		JRST	ALIA.6			;THEN NOTHING TO DO
		MOVEI	S2,.OTMNT		;GET OBJECT TYPE MOUNT
		MOVEM	S2,CATOBJ+OBJ.TY	;SAVE IT
		MOVE	S2,.VLUCB(S1)		;GET UCB ADDR
 WIT
	;**;[1227] Change 2 lines at ALIA.5+7L. /LWS
		JRST	ALI.6D			;[1227] YES
		LOAD	S2,.VLFLG(S1),VL.STA	;GET STR STATUS
		CAIN	S2,%STAMN		;MOUNTED?
		JRST	ALI.6D			;[1227] YES, CONTINUE. D$GENC WILL BOMB
		MOVEI	S2,.OTMNT		;GET OBJECT TYPE MOUNT
		MOVEM	S2,CATOBJ+OBJ.TY	;SAVE IT
		SKIPE	S2,.VLUCB(S1)		;[1227] GET UCB ADDR
 REP 27/87	;10C4
		$WTO	(<Deleting duplicate volume>,<Unit ^W/.VLVID(S1)/ for structure ^W/.VLNAM(S1)/>,CATOBJ,<$WTFLG(WT.SJI)>)
		PUSHJ	P,DELVOL		;DELETE THE OLD ONE

	ALIA.6:	EXCH	P2,.VLNAM(P1)		;SWAP ALIAS NAME WITH OLD NAME
 WIT
		LOAD	S2,.VLOWN(S1),VL.CNT	;[1227] GET REQUESTOR COUNT
		JUMPN	S2,ALIA.6		;[1227] IF REQUESTORS EXIST, CANT DELETE
		SKIPE	CATOBJ+OBJ.UN		;[1227] IF NO UCB, DON'T USE OBJECT BLK
		$WTO	(<Deleting duplicate volume>,<Unit ^W/.VLVID(S1)/ for structure ^W/.VLNAM(S1)/>,CATOBJ,<$WTFLG(WT.SJI)>)
		SKIPN	CATOBJ+OBJ.UN		;[1227]
		$WTO	(<Deleting duplicate volume>,<Unit ^W/.VLVID(S1)/ for structure ^W/.VLNAM(S1)/>,,<$WTFLG(WT.SJI)>) ;[1227]
		PUSHJ	P,DELVOL		;DELETE THE OLD ONE

	ALIA.6:	LOAD	S1,.VLOWN(P1),VL.CNT	;[1227] SEE IF ANY REQUESTORS
		JUMPE	S1,ALI.6D		;[1227] IF NONE, CONTINUE
		$SAVE	<T1,T2>			;[1227] SAVE T1 & T2
		SETZM	T1			;[1227] INDICATE NO PREVIOUS VOL BLOCK
		MOVE	T2,P1			;[1227] GET PRIMARY (OLD) VOL BLOCK ADDR
	ALI.6A:	PUSHJ	P,CREVOL		;[1227] CREATE A NEW VOL BLOCK
		MOVE	S2,S1			;[1227] COPY NEW VOL ADDR
		HRL	S1,T2			;[1227] COPY OLD VOL TO NEW VOL
		BLT	S1,.VLVSL-1(S2)		;[1227] EXCEPT FOR VSL POINTERS
		SETZM	.VLPTR(S2)		;[1227] CLEAR MULTIPLE VOL BLOCK PTRS
		SKIPN	T1			;[1227] SAVE PRIMARY VOL ADDR ONLY ONCE
		PUSH	P,S2			;[1227]
		MOVE	T1,S2			;[1227] GET NEW VOL BLOCK ADDR IN T1
		MOVX	S1,VL.CNT		;[1227] CLEAR REQUEST COUNT IN VOL COPY
		ANDCAM	S1,.VLOWN(T1)		;[1227]
		MOVX	S1,VL.RSN		;[1227] CLEAR RESOURCE NUMBER!
		ANDCAM	S1,.VLFLG(T1)		;[1227]
		SETZM	.VLMTM(T1)		;[1227] CLEAR MOUNT TIME
		SKIPE	S1,.VLUCB(T2)		;[1227] GET POINTER TO UCB
		MOVEM	T1,.UCBVL(S1)		;[1227] LINK UCB TO NEW VOL
		MOVEM	S1,.VLUCB(T1)		;[1227] LINK NEW VOL TO UCB
		SETZM	.VLUCB(T2)		;[1227] UNLINK OLD VOL FROM UCB
		CAME	T1,(P)			;[1227] NEW PRIMARY VOL BLOCK?
		JRST	ALI.6C			;[1227] NO, DON'T GET NEW RESOURCE
		MOVE	S1,T1			;[1227] YES, GET NEW VOL BLOCK ADDRESS
		EXCH	P2,.VLNAM(S1)		;[1227] USE ALIAS NAME FOR NEW RESOURCE
		PUSHJ	P,D$SVRS		;[1227] GET A RESOURCE NUMBER
	ALI.6C:	LOAD	T2,.VLPTR(T2),VL.NXT	;[1227] GET POINTER TO NEXT VOL BLOCK
		JUMPN	T2,ALI.6A		;[1227] IF ANOTHER VOL, LOOP.
		POP	P,P1			;[1227] GET NEW PRIMARY VOL ADDR
		TRNA				;[1227] ALREADY EXCH'D NAMES

	ALI.6D:	EXCH	P2,.VLNAM(P1)		;[1227] SWAP ALIAS NAME WITH OLD NAME
 INS 44/87	;10C5
		MOVE	S1,P1			;[1227] GET PRIMARY VOL ADDR
		PUSHJ	P,DELVOL		;[1227] DELETE VOL BLOCKS IF NO REQUESTORS
 INS 2/108	;10C6
	;		FNDVOL - ROUTINE TO FIND A VOL BLOCK LINKED TO A UCB (SPINNING)
 REP 8/108	;10C7
	FNDDSK:	PUSHJ	P,.SAVE1		;SAVE P1 FOR A MINUTE
		MOVE	P1,S1			;SAVE THE VOL ID WE ARE LOOKING FOR
 WIT
	FNDVOL:	TDZA	S2,S2			;[1227] INDICATE ENTRY POINT
	FNDDSK:	SETOM	S2			;[1227]
		PUSHJ	P,.SAVE2		;[1227] SAVE P1 & P2 FOR A MINUTE
		DMOVE	P1,S1			;[1227] SAVE THE VOL ID WE ARE LOOKING FOR
 REP 19/108	;10C8
		MOVE	S1,S2			;RETURN THE VOL BLOCK ADDRESS IN S1
 WIT
	;**;[1227] Change code at FNDD.2+3L. /LWS
		JUMPL	P2,FNDD.3		;[1227] IF FNDDSK, JUST RETURN VOL ADDR
		SKIPN	.VLUCB(S2)		;[1227] ELSE SEE IF VOL IS LINKED TO UCB
		JRST	FNDD.1			;[1227] IT'S NOT, KEEP LOOKING
	FNDD.3:	MOVE	S1,S2			;[1227] RETURN THE VOL BLOCK ADDRESS IN S1
 REP 8/172	;10C9
		PUSHJ	P,FNDDSK		;FIND IT IN OUR DATA BASE
 WIT
	;**;[1227] Change 1 line at SNDB.1+16L. /LWS
		PUSHJ	P,FNDVOL		;[1227] FIND IT IN OUR DATA BASE
 SUM 53020