.title diskquota Perform Diskquota Control Functions .ident /V1.0/ ; ; Author: Rodrick A. Eldridge ; 104 Computer Science ; Iowa State University ; Ames, IA 50011 ; (515) 294-5659 ; ; Created: January 1986 ; ; Modification History: ; ; April 1986 ; Converted to MLR ; ; Description: This routine performs diskquota control functions that operate ; on individual entries in the disk quota file. ; ; Format: external module disk_quota - ; ; ; Arguments: work_area: record structure ; (passed by reference) ; ; Work area. ; ; io_chan: word ; ; I/O channel. ; If io_chan = 0 then assign channel. ; ; func: word ; ; Quota control function. ; If func = 0 then deassign channel. ; ; Use one of the following functions: ; ; 0: deassign channel ; fib$c_add_quota: add entry ; fib$c_exa_quota: examine entry ; fib$c_mod_quota: modify entry ; fib$c_rem_quota: remove entry ; ; cntrl: longword ; ; Control function value(s). ; ; Use one of the following control functions: ; ; 0: no control function ; fib$m_all_mem: match all uic members ; fib$m_all_grp: match all uic groups ; fib$m_mod_perm: change permanent quota ; fib$m_mod_over: change overdraft quota ; fib$m_mod_use: change usage data ; ; device_name: character string ; (passed by descriptor) ; ; Device name. ; ; buffer: $dfqdef record structure ; (passed by reference) ; ; Quota file transfer block. ; global module disk_quota - mask= const $dqfdef ; diskquota definitions $dscdef ; desctiptor definitions $fibdef ; file information block defintions $iodef ; i/o definitions $ssdef ; system status definitions record disk_quota disk_quota.io_chan: .blkw 1 ; i/o channel disk_quota.func: .blkw 1 ; function disk_quota.cntrl: .blkl 1 ; control value disk_quota.length = .-disk_quota.io_chan end var buffer_descr: stdescr .blkb 0 fib_descr: stdescr .blkb fib$k_length fib * status: .blkq 1 begin moval buffer_descr,r9 ; r9 =address of descriptor moval fib,r10 ; r10=address of fib movl disk_quota.work_area(ap),r11 ; r11=address of work area if lss then movl #ss$_insfarg,r0 goto exit end if eql then $assign_s - chan= disk_quota.io_chan(r11),- devnam= @disk_quota.device_descr(ap) exit_if_error elseif eql then $dassgn_s - chan= disk_quota.io_chan(r11) goto exit end movw #dqf$k_length,dsc$w_length(r9) movl disk_quota.buffer(ap),dsc$a_pointer(r9) movc5 #0,(r0),#^x00,#fib$k_length,(r10) movw disk_quota.func(r11),fib$w_cntrlfunc(r10) movl disk_quota.cntrl(r11),fib$l_cntrlval(r10) $qiow_s - chan= disk_quota.io_chan(r11),- iosb= status,- func= #io$_acpcontrol,- p1= fib_descr,- p2= #buffer_descr,- p3= #buffer_descr,- p4= #buffer_descr exit_if_error movzwl status,r0 exit: return .end