[mod.computers.vax] reading the quota file

JMS@ARIZMIS.BITNET (I think I'll dye my hair blue.) (09/07/86)

One doesn't read the quota file; only VMS actually performs operations
on QUOTA.SYS.  Use QIOs, like this (incomplete) code fragment illustrates:

fibdesc:                                        ; FIB descriptor
        .word           FIB$C_LENGTH            ; length
        .word           0                       ; not used
        .address        fibblk                  ; address of fib block
fibblk: .blkb           FIB$C_LENGTH            ; an FIB

dqfdesc:                                        ; disk quota file descriptor
        .word           DQF$C_LENGTH            ; length
        .word           0                       ; not used
        .address        dqfblk                  ; address of dqf block
dqfblk: .blkb           DQF$C_LENGTH            ; a DQF block (only need one)

iosb:   .blkw   4                               ; I/O status block

        movab   fibblk, r0
        movw    #FIB$C_EXA_QUOTA, FIB$W_CNTRLFUNC(r0)   ; EXAmine quota entry

        movab   dqfblk, r11                     ; get UIC for exquota
                                                ; R11 IS NOT SCRATCH ANYMORE!!!
        movw    member, DQF$L_UIC(r11)          ; ... member
        movw    group, DQF$L_UIC+2(r11)         ; ... and group

        movab   dqfdesc,r0
        $QIOW_S -                               ; do the read
                CHAN=dkchan, -                  ; disk channel
                FUNC=#IO$_ACPCONTROL, -         ; ACP function
                IOSB=iosb, -                    ; IO status block
                P1=fibdesc, -                   ; FIB descriptor
                P2=#dqfdesc, -                  ; Disk Quota Descriptor-IN
                P4=#dqfdesc                     ; Disk Quota Descriptor-OUT


jms

+-------------------------------+
| Joel M Snyder                 |             BITNET: jms@arizmis.BITNET
| Univ of Arizona Dep't of MIS  |           ArizoNET: MRSVAX::JMS
| Tucson, Arizona 85721         |    Pseudo-PhoneNET: (602) 621-2748
+-------------------------------+
(std. disclaimer in re: nobody taking anything I say seriously)
--*> "Wherever you go ... there you are."  -- Buckaroo Bonzai <*--