COMPILATION LISTING OF SEGMENT set_quota Compiled by: Multics PL/I Compiler, Release 27d, of October 11, 1982 Compiled at: Honeywell LISD Phoenix, System M Compiled on: 11/15/82 1733.2 mst Mon Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 4* * * 5* * Copyright (c) 1972 by Massachusetts Institute of * 6* * Technology and Honeywell Information Systems, Inc. * 7* * * 8* *********************************************************** */ 9 10 11 /* quota manipulating commands 12* 13* set_quota, sq, requires a privileged entry to set a quota 14* priv_move_quota, sets directory access isolation privileges before doing the move_quota function 15* (actually by calling the priv_move_quota_ subroutine to do it) 16* 17* set_quota and priv_move_quota take pairs of arguments the first of which 18* is the pathname (can be "-wd" or "-wdir") of the directory on which a quota 19* is to be set, and the second of which specifies the value of the 20* quota which is to be used. 21* 22* coded November 1969 MR Thompson 23* to pl1 January 1970 JW Gintell 24* modified May 1971 JW Gintell 25* star convention added to get_quota Sept 1971 JW Gintell 26* converted to version 2 Dec l972 JW Gintell 27* priv_move_quota entry added 09/26/74 J. C. Whitmore 28* */ 29 set_quota: setquota: sq: proc; 30 31 dcl pathname char (plen) based (pp), /* command argument */ 32 dirname char (168) aligned, /* returned by expand_path_ */ 33 ename char (32) aligned, /* " */ 34 quota char (qlen) based (qp), /* command argument */ 35 qlen fixed bin (17), 36 qvalue fixed bin (17), /* value of quota */ 37 comname char (16) aligned, /* name of command */ 38 (nargs, plen) fixed bin (17), 39 code fixed bin (35), 40 i fixed bin (17), 41 entry_sw fixed bin, /* 1 = sq, 2 = priv_mq */ 42 dir_sw bit (1) init ("0"b), /* TRUE for dir quota */ 43 tup fixed bin (35), /* date-time ptp updated */ 44 (tused, tquota) fixed bin (17) init (0), /* total used and quota */ 45 prheadsw bit (1) aligned init ("1"b), /* switch for printing heading */ 46 stars bit (1) aligned init (""b), /* switch if stars found */ 47 (pp, qp, enp) ptr; 48 dcl error_table_$badopt external fixed bin (35); 49 dcl error_table_$badcall external fixed bin (35); 50 51 dcl cu_$arg_count external entry (fixed bin (17)), 52 cu_$arg_ptr external entry (fixed bin (17), ptr, fixed bin (17), fixed bin (35)), 53 expand_path_ external entry (ptr, fixed bin (17), ptr, ptr, fixed bin (35)), 54 ioa_ external entry options (variable), 55 com_err_ external entry options (variable), 56 57 hphcs_$quota_set external entry (char (*) aligned, fixed bin, fixed bin (35)), 58 hphcs_$dir_quota_set external entry (char (*) aligned, fixed bin, fixed bin (35)), 59 priv_move_quota_ entry (char (*) aligned, char (*) aligned, fixed bin, fixed bin (35)), 60 priv_move_quota_$dir entry (char (*) aligned, char (*) aligned, fixed bin, fixed bin (35)), 61 cv_dec_check_ external entry (char (*), fixed bin (35)) returns (fixed bin (17)); 62 dcl (null, addr, substr) builtin; 63 dcl linkage_error condition; 64 65 66 67 /* */ 68 69 SET: 70 entry_sw = 1; 71 enp = null; /* expand_path_ will retn single string */ 72 comname = "set_quota"; 73 on condition (linkage_error) begin; /* catch call to priv. entry */ 74 code = error_table_$badcall; 75 goto ERROR; /* non local goto */ 76 end; 77 go to COMMON; 78 79 set_dir_quota: entry; 80 81 dir_sw = "1"b; 82 go to SET; 83 84 85 priv_move_dir_quota: entry; 86 87 dir_sw = "1"b; 88 89 priv_move_quota: entry; 90 91 entry_sw = 2; 92 enp = addr (ename); 93 comname = "priv_move_quota"; 94 95 96 97 COMMON: 98 call cu_$arg_count (nargs); 99 if nargs < 2 then do; 100 call ioa_ ("^a: not enough arguments", comname); 101 return; 102 end; 103 104 do i = 1 to nargs by 2; /* arguments come in pairs */ 105 call cu_$arg_ptr (i, pp, plen, code); /* the first is a pathname */ 106 if code ^= 0 then go to ERROR; 107 if substr (pathname, 1, 1) = "-" then do; 108 if pathname = "-wd" | pathname = "-wdir" then plen = 0; /* expand path will then work */ 109 else do; 110 call com_err_ (error_table_$badopt, comname, pathname); 111 return; 112 end; 113 end; 114 115 call cu_$arg_ptr (i+1, qp, qlen, code); /* the second is a quota value */ 116 if code ^= 0 then go to ERROR; 117 if qlen = 0 then go to ERROR; 118 qvalue = cv_dec_check_ (quota, code); /* which must converted */ 119 if code ^= 0 then go to NUMERR; /* it must be decimal */ 120 121 call expand_path_ (pp, plen, addr (dirname), enp, code); 122 if code ^= 0 then go to ERROR; 123 if entry_sw = 1 then do; /* set_quota entry */ 124 if dir_sw then call hphcs_$dir_quota_set (dirname, qvalue, code); 125 else call hphcs_$quota_set (dirname, qvalue, code); 126 end; 127 else do; /* priv_move_quota entry */ 128 if dir_sw then call priv_move_quota_$dir (dirname, ename, qvalue, code); 129 else call priv_move_quota_ (dirname, ename, qvalue, code); 130 131 end; 132 if code ^= 0 then go to ERROR; 133 ENDARG: end; 134 135 RETURN: return; 136 137 ERROR: 138 if code = error_table_$badcall then 139 mess: call com_err_ ((0), "set_quota", "This command requires privileged access not given to this user."); 140 else 141 call com_err_ (code, comname, pathname); 142 go to ENDARG; 143 144 NUMERR: call com_err_ ((0), comname, "Numerical value for quota must be given - ^a", quota); 145 go to ENDARG; 146 147 end set_quota; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/15/82 1518.9 set_quota.pl1 >dumps>old>recomp>set_quota.pl1 NAMES DECLARED IN THIS COMPILATION. IDENTIFIER OFFSET LOC STORAGE CLASS DATA TYPE ATTRIBUTES AND REFERENCES (* indicates a set context) NAMES DECLARED BY DECLARE STATEMENT. addr builtin function dcl 62 ref 92 121 121 code 000172 automatic fixed bin(35,0) dcl 31 set ref 74* 105* 106 115* 116 118* 119 121* 122 124* 125* 128* 129* 132 137 140* com_err_ 000024 constant entry external dcl 51 ref 110 137 140 144 comname 000164 automatic char(16) dcl 31 set ref 72* 93* 100* 110* 140* 144* cu_$arg_count 000014 constant entry external dcl 51 ref 97 cu_$arg_ptr 000016 constant entry external dcl 51 ref 105 115 cv_dec_check_ 000036 constant entry external dcl 51 ref 118 dir_sw 000175 automatic bit(1) initial unaligned dcl 31 set ref 31* 81* 87* 124 128 dirname 000100 automatic char(168) dcl 31 set ref 121 121 124* 125* 128* 129* ename 000152 automatic char(32) dcl 31 set ref 92 128* 129* enp 000206 automatic pointer dcl 31 set ref 71* 92* 121* entry_sw 000174 automatic fixed bin(17,0) dcl 31 set ref 69* 91* 123 error_table_$badcall 000012 external static fixed bin(35,0) dcl 49 ref 74 137 error_table_$badopt 000010 external static fixed bin(35,0) dcl 48 set ref 110* expand_path_ 000020 constant entry external dcl 51 ref 121 hphcs_$dir_quota_set 000030 constant entry external dcl 51 ref 124 hphcs_$quota_set 000026 constant entry external dcl 51 ref 125 i 000173 automatic fixed bin(17,0) dcl 31 set ref 104* 105* 115* ioa_ 000022 constant entry external dcl 51 ref 100 linkage_error 000210 stack reference condition dcl 63 ref 73 nargs 000170 automatic fixed bin(17,0) dcl 31 set ref 97* 99 104 null builtin function dcl 62 ref 71 pathname based char unaligned dcl 31 set ref 107 108 108 110* 140* plen 000171 automatic fixed bin(17,0) dcl 31 set ref 105* 107 108 108 108* 110 110 121* 140 140 pp 000202 automatic pointer dcl 31 set ref 105* 107 108 108 110 121* 140 prheadsw 000200 automatic bit(1) initial dcl 31 set ref 31* priv_move_quota_ 000032 constant entry external dcl 51 ref 129 priv_move_quota_$dir 000034 constant entry external dcl 51 ref 128 qlen 000162 automatic fixed bin(17,0) dcl 31 set ref 115* 117 118 118 144 144 qp 000204 automatic pointer dcl 31 set ref 115* 118 144 quota based char unaligned dcl 31 set ref 118* 144* qvalue 000163 automatic fixed bin(17,0) dcl 31 set ref 118* 124* 125* 128* 129* stars 000201 automatic bit(1) initial dcl 31 set ref 31* substr builtin function dcl 62 ref 107 tquota 000177 automatic fixed bin(17,0) initial dcl 31 set ref 31* tused 000176 automatic fixed bin(17,0) initial dcl 31 set ref 31* NAME DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. tup automatic fixed bin(35,0) dcl 31 NAMES DECLARED BY EXPLICIT CONTEXT. COMMON 000230 constant label dcl 97 ref 77 ENDARG 000601 constant label dcl 133 ref 142 145 ERROR 000605 constant label dcl 137 ref 75 106 116 117 122 132 NUMERR 000666 constant label dcl 144 ref 119 RETURN 000604 constant label dcl 135 SET 000134 constant label dcl 69 ref 82 mess 000611 constant label dcl 137 priv_move_dir_quota 000201 constant entry external dcl 85 priv_move_quota 000213 constant entry external dcl 89 set_dir_quota 000167 constant entry external dcl 79 set_quota 000126 constant entry external dcl 29 setquota 000116 constant entry external dcl 29 sq 000106 constant entry external dcl 29 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 1136 1176 724 1146 Length 1372 724 40 160 211 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME sq 200 external procedure is an external procedure. on unit on line 73 64 on unit STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME sq 000100 dirname sq 000152 ename sq 000162 qlen sq 000163 qvalue sq 000164 comname sq 000170 nargs sq 000171 plen sq 000172 code sq 000173 i sq 000174 entry_sw sq 000175 dir_sw sq 000176 tused sq 000177 tquota sq 000200 prheadsw sq 000201 stars sq 000202 pp sq 000204 qp sq 000206 enp sq THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc call_ext_out return tra_ext enable ext_entry int_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. com_err_ cu_$arg_count cu_$arg_ptr cv_dec_check_ expand_path_ hphcs_$dir_quota_set hphcs_$quota_set ioa_ priv_move_quota_ priv_move_quota_$dir THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$badcall error_table_$badopt LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 31 000075 29 000105 69 000134 71 000136 72 000140 73 000143 74 000157 75 000162 77 000165 79 000166 81 000175 82 000177 85 000200 87 000207 89 000211 91 000221 92 000223 93 000225 97 000230 99 000237 100 000242 101 000262 104 000263 105 000271 106 000306 107 000310 108 000315 110 000330 111 000354 115 000355 116 000375 117 000377 118 000401 119 000424 121 000426 122 000447 123 000451 124 000454 125 000500 126 000521 128 000522 129 000552 132 000577 133 000601 135 000604 137 000605 140 000642 142 000665 144 000666 145 000722 ----------------------------------------------------------- Historical Background This edition of the Multics software materials and documentation is provided and donated to Massachusetts Institute of Technology by Group BULL including BULL HN Information Systems Inc. as a contribution to computer science knowledge. This donation is made also to give evidence of the common contributions of Massachusetts Institute of Technology, Bell Laboratories, General Electric, Honeywell Information Systems Inc., Honeywell BULL Inc., Groupe BULL and BULL HN Information Systems Inc. to the development of this operating system. Multics development was initiated by Massachusetts Institute of Technology Project MAC (1963-1970), renamed the MIT Laboratory for Computer Science and Artificial Intelligence in the mid 1970s, under the leadership of Professor Fernando Jose Corbato. Users consider that Multics provided the best software architecture for managing computer hardware properly and for executing programs. Many subsequent operating systems incorporated Multics principles. Multics was distributed in 1975 to 2000 by Group Bull in Europe , and in the U.S. by Bull HN Information Systems Inc., as successor in interest by change in name only to Honeywell Bull Inc. and Honeywell Information Systems Inc. . ----------------------------------------------------------- Permission to use, copy, modify, and distribute these programs and their documentation for any purpose and without fee is hereby granted,provided that the below copyright notice and historical background appear in all copies and that both the copyright notice and historical background and this permission notice appear in supporting documentation, and that the names of MIT, HIS, BULL or BULL HN not be used in advertising or publicity pertaining to distribution of the programs without specific prior written permission. Copyright 1972 by Massachusetts Institute of Technology and Honeywell Information Systems Inc. Copyright 2006 by BULL HN Information Systems Inc. Copyright 2006 by Bull SAS All Rights Reserved