COMPILATION LISTING OF SEGMENT get_pathname_ Compiled by: Multics PL/I Compiler, Release 32f, of October 9, 1989 Compiled at: Bull HN, Phoenix AZ, System-M Compiled on: 11/11/89 1009.8 mst Sat Options: optimize map 1 /****^ *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Bull Inc., 1987 * 4* * * 5* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 6* * * 7* * Copyright (c) 1972 by Massachusetts Institute of * 8* * Technology and Honeywell Information Systems, Inc. * 9* * * 10* *********************************************************** */ 11 12 13 14 /* 15* 16* Writtten March 1975 by R. Bratt 17* 18* Last modified by: 19* L. Scheffler 760317 to accept mylock 20* K. Loepere 841123 for PAM that uses uid's. 21* 22* ---> get_pathname_ obtains a pathname for the object associated with a given segment 23* number. It first calls upon the pathname associative memory to map the segment number into 24* a pathname. If no pathname is known to the pathname associative memory, then 25* get_pathname_ locates the branch of the object and extracts its primary name. 26* get_pathname_ then recursively invokes itself to obtain a pathname for the object's 27* parent. A pathname for the object is then formed by concatenating these two 28* peices. This pathname is then added to the pathname associative memory (currently 29* this is done only for directories) and returned. 30* USAGE: call get_pathname_ (segno, pathname, code); 31* 32* segno fixed bin (17) --- segment number of object (input) 33* pathname char (*) varying --- pathname of object (output) 34* code fixed bin (35) --- status code (output) 35* 36**/ 37 get_pathname_: proc (a_segno, a_pathname, a_code); 38 dcl (a_segno, segno, i) fixed bin (17), 39 a_pathname char (*) varying, 40 pathname char (528) varying, 41 (a_code, code) fixed bin (35), 42 (dirsw, locksw) bit (1) aligned, 43 ename char (32) aligned, 44 (error_table_$mylock, error_table_$root) ext fixed bin (35); 45 46 dcl get_pathname_ ext entry (fixed bin (17), char (*) varying, fixed bin (35)), 47 pathname_am$get_path ext entry (char (*) varying, fixed bin (17)), 48 pathname_am$set ext entry (char (*) varying, fixed bin (17)), 49 sum$getbranch_root_my ext entry (ptr, bit (36) aligned, ptr, fixed bin (35)), 50 lock$dir_unlock ext entry (ptr); 51 1 1 /* BEGIN INCLUDE FILE ... dir_header.incl.pl1 */ 1 2 /* Modified 8/74 for NSS */ 1 3 /* Modified 8/76 to add version number and hash table rel pointer for variable hash table sizes */ 1 4 /* Modified 3/82 BIM for change pclock */ 1 5 /* format: style3 */ 1 6 1 7 /* Template for the directory header. Length = 64 words. */ 1 8 1 9 dcl dp ptr; 1 10 1 11 dcl 1 dir based (dp) aligned, 1 12 1 13 2 modify bit (36), /* Process ID of last modifier */ 1 14 2 type bit (18) unaligned, /* type of object = dir header */ 1 15 2 size fixed bin (17) unaligned, /* size of header in words */ 1 16 2 dtc (3), /* date-time checked by salvager array */ 1 17 3 date bit (36), /* the date */ 1 18 3 error bit (36), /* what errors were discovered */ 1 19 1 20 2 uid bit (36), /* uid of the directory - copied from branch */ 1 21 1 22 2 pvid bit (36), /* phys vol id of the dir - copied from branch */ 1 23 1 24 2 sons_lvid bit (36), /* log vol id for inf non dir seg - copied from branch */ 1 25 1 26 2 access_class bit (72), /* security attributes of dir - copied from branch */ 1 27 1 28 (2 vtocx fixed bin (17), /* vtoc entry index of the dir - copied from branch */ 1 29 2 version_number fixed bin (17), /* version number of header */ 1 30 1 31 2 entryfrp bit (18), /* rel ptr to beginning of entry list */ 1 32 2 pad2 bit (18), 1 33 1 34 2 entrybrp bit (18), /* rel ptr to end of entry list */ 1 35 2 pad3 bit (18), 1 36 1 37 2 pers_frp bit (18), /* rel ptr to start of person name list */ 1 38 2 proj_frp bit (18), /* rel ptr to start of project name list */ 1 39 1 40 2 pers_brp bit (18), /* rel ptr to end of person name list */ 1 41 2 proj_brp bit (18), /* rel ptr to end of project name list */ 1 42 1 43 2 seg_count fixed bin (17), /* number of non-directory branches */ 1 44 2 dir_count fixed bin (17), /* number of directory branches */ 1 45 1 46 2 lcount fixed bin (17), /* number of links */ 1 47 2 acle_total fixed bin (17), /* total number of ACL entries in directory */ 1 48 1 49 2 arearp bit (18), /* relative pointer to beginning of allocation area */ 1 50 2 per_process_sw bit (1), /* indicates dir contains per process segments */ 1 51 2 master_dir bit (1), /* TRUE if this is a master dir */ 1 52 2 force_rpv bit (1), /* TRUE if segs must be on RPV */ 1 53 2 rehashing bit (1), /* TRUE if hash table is being constructed */ 1 54 2 pad4 bit (14), 1 55 1 56 2 iacl_count (0:7), 1 57 3 seg fixed bin (17), /* number of initial acl entries for segs */ 1 58 3 dir fixed bin (17), /* number of initial acl entries for dir */ 1 59 1 60 2 iacl (0:7), /* pointer to initial ACLs for each ring */ 1 61 3 seg_frp bit (18), /* rel ptr to start of initial ACL for segs */ 1 62 3 seg_brp bit (18), /* rel ptr to end of initial ACL for segs */ 1 63 1 64 3 dir_frp bit (18), /* rel ptr to start of initial for dirs */ 1 65 3 dir_brp bit (18), /* rel ptr to end of initial ACL for dirs */ 1 66 1 67 2 htsize fixed bin (17), /* size of hash table */ 1 68 2 hash_table_rp bit (18), /* rel ptr to start of hash table */ 1 69 1 70 2 htused fixed bin (17), /* no. of used places in hash table */ 1 71 2 pad6 fixed bin (17), 1 72 1 73 2 tree_depth fixed bin (17), /* number of levels from root of this dir */ 1 74 2 pad7 bit (18)) unaligned, 1 75 1 76 2 dts bit (36), /* date-time directory last salvaged */ 1 77 1 78 2 master_dir_uid bit (36), /* uid of superior master dir */ 1 79 2 change_pclock fixed bin (35), /* up one each call to sum$dirmod */ 1 80 2 pad8 (11) bit (36), /* pad to make it a 64 word header */ 1 81 2 checksum bit (36), /* checksummed from uid on */ 1 82 2 owner bit (36); /* uid of parent dir */ 1 83 1 84 dcl version_number_2 fixed bin int static options (constant) init (2); 1 85 1 86 /* END INCLUDE FILE ... dir_header.incl.pl1 */ 52 2 1 /* BEGIN INCLUDE FILE ... dir_entry.incl.pl1 ...last modified August 1974 for nss */ 2 2 2 3 2 4 /* Template for an entry. Length = 38 words */ 2 5 2 6 dcl ep ptr; 2 7 2 8 dcl 1 entry based (ep) aligned, 2 9 2 10 (2 efrp bit (18), /* forward rel ptr to next entry */ 2 11 2 ebrp bit (18)) unaligned, /* backward rel ptr to previous entry */ 2 12 2 13 2 type bit (18) unaligned, /* type of object = dir entry */ 2 14 2 size fixed bin (17) unaligned, /* size of dir entry */ 2 15 2 16 2 uid bit (36), /* unique id of entry */ 2 17 2 18 2 dtem bit (36), /* date-time entry modified */ 2 19 2 20 (2 bs bit (1), /* branch switch = 1 if branch */ 2 21 2 pad0 bit (17), 2 22 2 nnames fixed bin (17), /* number of names for this entry */ 2 23 2 24 2 name_frp bit (18), /* rel pointer to start of name list */ 2 25 2 name_brp bit (18), /* rel pointer to end of name list */ 2 26 2 27 2 author, /* user who created branch */ 2 28 3 pers_rp bit (18), /* name of user who created branch */ 2 29 3 proj_rp bit (18), /* project of user who created branch */ 2 30 2 31 3 tag char (1), /* tag of user who created branch */ 2 32 3 pad1 char (3), 2 33 2 34 2 primary_name bit (504), /* first name on name list */ 2 35 2 36 2 dtd bit (36), /* date time dumped */ 2 37 2 38 2 pad2 bit (36), 2 39 2 40 2 41 /* the declarations below are for branch only */ 2 42 2 43 2 44 2 pvid bit (36), /* physical volume id */ 2 45 2 46 2 vtocx fixed bin (17), /* vtoc entry index */ 2 47 2 pad3 bit (18), 2 48 2 49 2 dirsw bit (1), /* = 1 if this is a directory branch */ 2 50 2 oosw bit (1), /* out of service switch on = 1 */ 2 51 2 per_process_sw bit (1), /* indicates segment is per process */ 2 52 2 copysw bit (1), /* = 1 make copy of segment whenever initiated */ 2 53 2 safety_sw bit (1), /* if 1 then entry cannot be deleted */ 2 54 2 multiple_class bit (1), /* segment has multiple security classes */ 2 55 2 audit_flag bit (1), /* segment must be audited for security */ 2 56 2 security_oosw bit (1), /* security out of service switch */ 2 57 2 entrypt_sw bit (1), /* 1 if call limiter is to be enabled */ 2 58 2 master_dir bit (1), /* TRUE for master directory */ 2 59 2 tpd bit (1), /* TRUE if this segment is never to go on the PD */ 2 60 2 pad4 bit (11), 2 61 2 entrypt_bound bit (14)) unaligned, /* call limiter */ 2 62 2 63 2 access_class bit (72) aligned, /* security attributes : level and category */ 2 64 2 65 (2 ring_brackets (3) bit (3), /* ring brackets on segment */ 2 66 2 ex_ring_brackets (3) bit (3), /* extended ring brackets */ 2 67 2 acle_count fixed bin (17), /* number of entries on ACL */ 2 68 2 69 2 acl_frp bit (18), /* rel ptr to start of ACL */ 2 70 2 acl_brp bit (18), /* rel ptr to end of ACL */ 2 71 2 72 2 bc_author, /* user who last set the bit count */ 2 73 3 pers_rp bit (18), /* name of user who set the bit count */ 2 74 3 proj_rp bit (18), /* project of user who set the bit count */ 2 75 2 76 3 tag char (1), /* tag of user who set the bit count */ 2 77 3 pad5 bit (2), 2 78 2 bc fixed bin (24)) unaligned, /* bit count for segs, msf indicator for dirs */ 2 79 2 80 2 sons_lvid bit (36), /* logical volume id for immediat inf non dir seg */ 2 81 2 82 2 pad6 bit (36), 2 83 2 84 2 checksum bit (36), /* checksum from dtd */ 2 85 2 86 2 owner bit (36); /* uid of containing directory */ 2 87 2 88 /* END INCLUDE FILE ... dir_entry.incl.pl1 ... */ 53 3 1 /* BEGIN INCLUDE FILE ... dir_name.incl.pl1 ... last modified Nov 1975 for nss */ 3 2 3 3 /* Template for names of branches or links. Length = 14 words. */ 3 4 3 5 dcl np ptr; 3 6 3 7 dcl 1 names based aligned, /* based on ptr(dp,ep->entry.name_frp) */ 3 8 2 fp bit(18) unaligned, /* rel ptr to next name */ 3 9 2 bp bit(18) unaligned, /* rel ptr to prev name */ 3 10 3 11 2 type bit (18) unaligned, /* type = dir name */ 3 12 2 size fixed bin (17) unaligned, /* size of dir name */ 3 13 3 14 2 entry_rp bit(18) unaligned, /* rel ptr to entry */ 3 15 2 ht_index fixed bin(17) unaligned, /* index of hash table entry */ 3 16 3 17 2 hash_thread bit (18) unal, /* relative ptr to next hash entry */ 3 18 2 pad3 bit (18) unal, 3 19 3 20 2 name char(32) aligned, 3 21 3 22 2 checksum bit (36), /* checksum from entry_rp */ 3 23 3 24 2 owner bit (36); /* uid of entry */ 3 25 3 26 3 27 /* END INCLUDE FILE ... dir_name.incl.pl1 */ 54 55 56 a_code = 0; 57 a_pathname = ""; 58 segno = a_segno; 59 call pathname_am$get_path (pathname, segno); 60 if length (pathname) > 0 61 then do; 62 a_pathname = pathname; 63 return; 64 end; 65 locksw = "1"b; 66 call sum$getbranch_root_my (baseptr (segno), (36)"0"b, ep, code); 67 if code ^= 0 68 then if code = error_table_$mylock 69 then locksw = "0"b; /* Don't bother unlocking */ 70 else do; 71 if code = error_table_$root then a_pathname = ">"; 72 else a_code = code; /* Return anything else */ 73 return; 74 end; 75 dirsw = ep -> entry.dirsw; 76 ename = ptr (ep, ep -> entry.name_frp) -> name; 77 if locksw then call lock$dir_unlock (ptr (ep, 0)); 78 call get_pathname_ (fixed (baseno (ep), 17), pathname, code); 79 if code ^= 0 then do; 80 a_code = code; 81 return; 82 end; 83 i = 33 - verify (reverse (ename), " "); 84 if length (pathname) > 1 then pathname = pathname || ">"; 85 pathname = pathname || substr (ename, 1, i); 86 if dirsw then call pathname_am$set (pathname, segno); 87 a_pathname = pathname; 88 return; 89 end get_pathname_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/11/89 0839.4 get_pathname_.pl1 >special_ldd>install>MR12.3-1114>get_pathname_.pl1 52 1 05/24/82 1005.0 dir_header.incl.pl1 >ldd>include>dir_header.incl.pl1 53 2 04/29/76 1100.6 dir_entry.incl.pl1 >ldd>include>dir_entry.incl.pl1 54 3 11/02/76 1414.7 dir_name.incl.pl1 >ldd>include>dir_name.incl.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. a_code parameter fixed bin(35,0) dcl 38 set ref 37 56* 72* 80* a_pathname parameter varying char dcl 38 set ref 37 57* 62* 71* 87* a_segno parameter fixed bin(17,0) dcl 38 ref 37 58 code 000307 automatic fixed bin(35,0) dcl 38 set ref 66* 67 67 71 72 78* 79 80 dirsw 32 based bit(1) level 2 in structure "entry" packed packed unaligned dcl 2-8 in procedure "get_pathname_" ref 75 dirsw 000310 automatic bit(1) dcl 38 in procedure "get_pathname_" set ref 75* 86 ename 000312 automatic char(32) dcl 38 set ref 76* 83 85 entry based structure level 1 dcl 2-8 ep 000322 automatic pointer dcl 2-6 set ref 66* 75 76 76 77 77 78 78 error_table_$mylock 000010 external static fixed bin(35,0) dcl 38 ref 67 error_table_$root 000012 external static fixed bin(35,0) dcl 38 ref 71 get_pathname_ 000014 constant entry external dcl 46 ref 78 i 000101 automatic fixed bin(17,0) dcl 38 set ref 83* 85 lock$dir_unlock 000024 constant entry external dcl 46 ref 77 locksw 000311 automatic bit(1) dcl 38 set ref 65* 67* 77 name 4 based char(32) level 2 dcl 3-7 ref 76 name_frp 5 based bit(18) level 2 packed packed unaligned dcl 2-8 ref 76 names based structure level 1 dcl 3-7 pathname 000102 automatic varying char(528) dcl 38 set ref 59* 60 62 78* 84 84* 84 85* 85 86* 87 pathname_am$get_path 000016 constant entry external dcl 46 ref 59 pathname_am$set 000020 constant entry external dcl 46 ref 86 segno 000100 automatic fixed bin(17,0) dcl 38 set ref 58* 59* 66 66 86* sum$getbranch_root_my 000022 constant entry external dcl 46 ref 66 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. dir based structure level 1 dcl 1-11 dp automatic pointer dcl 1-9 np automatic pointer dcl 3-5 version_number_2 internal static fixed bin(17,0) initial dcl 1-84 NAME DECLARED BY EXPLICIT CONTEXT. get_pathname_ 000010 constant entry external dcl 37 NAMES DECLARED BY CONTEXT OR IMPLICATION. baseno builtin function ref 78 78 baseptr builtin function ref 66 66 fixed builtin function ref 78 78 length builtin function ref 60 84 ptr builtin function ref 76 77 77 reverse builtin function ref 83 substr builtin function ref 85 verify builtin function ref 83 STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 416 444 312 426 Length 666 312 26 206 104 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME get_pathname_ 240 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME get_pathname_ 000100 segno get_pathname_ 000101 i get_pathname_ 000102 pathname get_pathname_ 000307 code get_pathname_ 000310 dirsw get_pathname_ 000311 locksw get_pathname_ 000312 ename get_pathname_ 000322 ep get_pathname_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc call_ext_out return_mac ext_entry_desc THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. get_pathname_ lock$dir_unlock pathname_am$get_path pathname_am$set sum$getbranch_root_my THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$mylock error_table_$root LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 37 000004 56 000023 57 000025 58 000027 59 000031 60 000045 62 000047 63 000061 65 000062 66 000064 67 000107 71 000116 72 000133 73 000135 75 000136 76 000142 77 000151 78 000164 79 000211 80 000213 81 000215 83 000216 84 000233 85 000245 86 000257 87 000276 88 000310 ----------------------------------------------------------- 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