.TITLE GETDSKUSE .IDENT \ISUQUOTA 2.9\ ARG_COUNT= 0 ARG_UIC= 4 ARG_DSKUSE= 8 ARG_TAB_DSKNAM= 12 ; THIS ROUTINE RETURNS THE CUMULATIVE DISK USAGE ON ALL DISKS LISTED IN A TABLE ; FOR A SPECIFIED UIC. DISKQUOTA MUST BE ENABLED ON EACH DISK TO BE CHECKED. ; ; ; CALL GETDSKUSE (UIC, DSKUSE, TAB_DSKNAM) ; ; WHERE ; ; UIC - UIC FOR WHICH USAGE IS TO BE OBTAINED ; DSKUSE - CUMULATIVE DISK USAGE ; TAB_DSKNAM - TABLE OF DISK NAME DESCRIPTORS FOR DEVICES TO BE SEARCHED. ; LAST TABLE ENTRY MUST BE ZERO TO FLAG END_TABLE. ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; ANTHONY E. BIBLE ; 104 COMPUTER SCIENCE ; ISU COMPUTATION CENTER ; IOWA STATE UNIVERSITY ; AMES, IA 50011 ; ; 515-294-5659 ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; .PAGE .SBTTL MACROS ; SYSTEM MACROS $DIBDEF $DQFDEF $FIBDEF $IODEF $SSDEF .PAGE .SBTTL LOCAL READ-WRITE DATA .PSECT LCLRWDATA,RD,WRT,NOEXE,LONG DSC_DQF: .LONG DQF$K_LENGTH .LONG DQF DQF: .BLKB DQF$K_LENGTH DSC_FIB_DISK: .LONG FIB$K_LENGTH .LONG FIB_DISK FIB_DISK: .BLKB FIB$K_LENGTH CHAN_DISK: .BLKW 1 IOSB_DISK: .BLKQ 1 DYN_DISKNAM: .BLKQ 1 .PAGE .SBTTL CODE .PSECT CODE,RD,NOWRT,EXE,LONG .ENTRY GETDSKUSE,^M MOVAL DQF,R11 ; ADR DQF TABLE MOVL @ARG_UIC(AP),DQF$L_UIC(R11) ; ENTER UIC IN DQF TABLE MOVL ARG_TAB_DSKNAM(AP),R6 ; ADR DISK NAME TABLE MOVL #FIB$C_EXA_QUOTA,FIB_DISK+FIB$W_CNTRLFUNC ; INIT FIB CLRL @ARG_DSKUSE(AP) ; INIT CUMULATIVE USAGE LOOP_GETDSKUSE: MOVZBL (R6)+,DYN_DISKNAM ; DISKNAME DESCRIPTOR BNEQ 5$ JMP RET_GETDSKUSE ; END DISK NAME TABLE 5$: MOVL R6,DYN_DISKNAM+4 ADDL DYN_DISKNAM,R6 ; NEXT DISK NAME $ASSIGN_S CHAN=CHAN_DISK,- ; CHANNEL TO DISK DEVNAM=DYN_DISKNAM BLBC R0,RET_GETDSKUSE ; ERROR RETURN $QIOW_S CHAN=CHAN_DISK,- ; GET USAGE ON THIS DISK IOSB=IOSB_DISK,- FUNC=#IO$_ACPCONTROL,- P1=DSC_FIB_DISK,- P2=#DSC_DQF,- P3=#DSC_DQF,- P4=#DSC_DQF BLBC R0,10$ MOVL IOSB_DISK,R0 BLBS R0,20$ 10$: CMPL R0,#SS$_NODISKQUOTA ; IF NO QUOTA THEN CONTINUE BEQL CONT_GETDSKUSE BRW RET_GETDSKUSE ; ELSE ERROR RETURN 20$: ADDL DQF$L_USAGE(R11),@ARG_DSKUSE(AP) ; UPDATE USAGE $DASSGN_S CHAN=CHAN_DISK ; RLSE CHANNEL CONT_GETDSKUSE: MOVL #SS$_NORMAL,R0 ; RESET RETURN STATUS BRW LOOP_GETDSKUSE RET_GETDSKUSE: RET .END