COMPILATION LISTING OF SEGMENT find_partition_ Compiled by: Multics PL/I Compiler, Release 30, of February 16, 1988 Compiled at: Honeywell Bull, Phoenix AZ, SysM Compiled on: 07/20/88 1030.3 mst Wed Options: optimize map 1 /****^ *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1984 * 4* * * 5* * Copyright (c) 1972 by Massachusetts Institute of * 6* * Technology and Honeywell Information Systems, Inc. * 7* * * 8* *********************************************************** */ 9 10 /* format: style2,indcomtxt */ 11 12 find_partition_: 13 proc (P_pvname, P_part_name, P_pvid, P_part_start, P_part_lth, P_code); 14 15 /* * FIND_PARTITION_ 16* * 17* * This procedure is used to locate a disk partition if it exists, and returns the 18* * size, location, and volume pvid for the partition. It is designed to make partition 19* * processing programs easier to write. 20* * 21* * Written 12/06/80, W. Olin Sibert 22* * Modified 1/31/85, Keith Loepere, for real error codes. 23**/ 24 25 /* Modified by BIM, 830601, to default to using phcs_$find_partition to find 26* the config_deck specified partition if P_pvname = "" */ 27 28 29 dcl ( 30 P_pvname char (*), /* Input: name of volume to look on */ 31 P_part_name char (*), /* Input: name of partition to look for */ 32 P_pvid bit (36) aligned, /* Output: PVID of volume */ 33 P_part_start fixed bin (35), /* Output: first record of partition */ 34 P_part_lth fixed bin (35), /* Output: number of words in partition */ 35 P_code fixed bin (35) 36 ) parameter; /* Output: error code */ 37 38 dcl fb18_record fixed bin (18); 39 dcl fb18_length fixed bin (18); 40 dcl pvid bit (36) aligned; 41 dcl code fixed bin (35); 42 dcl idx fixed bin; 43 44 dcl label_buffer (1024) bit (36) aligned; 45 46 dcl mdc_$pvname_info entry (char (*), bit (36) aligned, char (*), bit (36) aligned, fixed bin, 47 fixed bin (35)); 48 dcl phcs_$read_disk_label entry (bit (36) aligned, pointer, fixed bin (35)); 49 dcl phcs_$find_partition entry (char (*), fixed bin, bit (36) aligned, fixed bin (18), fixed bin (18), 50 fixed bin (35)); 51 52 dcl ( 53 error_table_$device_parity, 54 error_table_$device_not_usable, 55 error_table_$invalid_device, 56 error_table_$moderr, 57 error_table_$noentry 58 ) fixed bin (35) external static; 59 60 dcl sys_info$page_size fixed bin external static; 61 62 dcl linkage_error condition; 63 64 dcl addr builtin; 65 66 67 on condition (linkage_error) 68 begin; /* Lose gracefully if no access to phcs_ */ 69 code = error_table_$moderr; 70 goto MAIN_RETURN; 71 end; 72 73 if P_pvname = "" 74 then do; 75 P_pvid = ""b; 76 fb18_record = 0; 77 fb18_length = 0; 78 call phcs_$find_partition (P_part_name, (0), P_pvid, fb18_record, fb18_length, P_code); 79 P_part_start = fb18_record; 80 P_part_lth = fb18_length; 81 return; 82 end; 83 84 call mdc_$pvname_info (P_pvname, pvid, (""), (""b), (0), code); 85 if code ^= 0 86 then /* Wrong name, probably */ 87 goto MAIN_RETURN; 88 89 labelp = addr (label_buffer); 90 91 92 call phcs_$read_disk_label (pvid, labelp, code); 93 94 revert condition (linkage_error); 95 96 if code ^= 0 97 then goto MAIN_RETURN; 98 99 do idx = 1 to label.nparts while (label.parts (idx).part ^= P_part_name); 100 end; 101 102 if idx > label.nparts 103 then do; 104 code = error_table_$noentry; 105 goto MAIN_RETURN; 106 end; 107 108 P_pvid = pvid; /* Found it. Copy output parameters */ 109 P_part_start = label.parts (idx).frec; 110 P_part_lth = sys_info$page_size * label.parts (idx).nrec; 111 code = 0; 112 113 MAIN_RETURN: 114 P_code = code; 115 return; 116 117 1 1 /* BEGIN INCLUDE FILE ... fs_vol_label.incl.pl1 .. last modified January 1982 for new volume map format */ 1 2 1 3 /****^ HISTORY COMMENTS: 1 4* 1) change(86-04-10,Fawcett), approve(86-04-10,MCR7383), 1 5* audit(86-05-12,Coppola), install(86-07-18,MR12.0-1098): 1 6* Add the subvolume info. 1 7* 2) change(88-05-27,GWMay), approve(88-05-27,MCR7883), 1 8* audit(88-06-14,Beattie), install(88-07-19,MR12.2-1061): 1 9* Added inconsistent_dbm bit used to determine consistency of volume 1 10* dumper bit maps. 1 11* END HISTORY COMMENTS */ 1 12 1 13 /* This is the label at fixed location of each physical volume. Length 1 page */ 1 14 /* Note: fsout_vol clears pad fields before writing the label */ 1 15 1 16 dcl labelp ptr; 1 17 1 18 dcl 1 label based (labelp) aligned, 1 19 1 20 /* First comes data not used by Multics.. for compatibility with GCOS */ 1 21 1 22 2 gcos (5*64) fixed bin, 1 23 1 24 /* Now we have the Multics label */ 1 25 1 26 2 Multics char (32) init ("Multics Storage System Volume"), /* Identifier */ 1 27 2 version fixed bin, /* Version 1 */ 1 28 2 mfg_serial char (32), /* Manufacturer's serial number */ 1 29 2 pv_name char (32), /* Physical volume name. */ 1 30 2 lv_name char (32), /* Name of logical volume for pack */ 1 31 2 pvid bit (36), /* Unique ID of this pack */ 1 32 2 lvid bit (36), /* unique ID of its logical vol */ 1 33 2 root_pvid bit (36), /* unique ID of the pack containing the root. everybody must agree. */ 1 34 2 time_registered fixed bin (71), /* time imported to system */ 1 35 2 n_pv_in_lv fixed bin, /* # phys volumes in logical */ 1 36 2 vol_size fixed bin, /* total size of volume, in records */ 1 37 2 vtoc_size fixed bin, /* number of recs in fixed area + vtoc */ 1 38 2 not_used bit (1) unal, /* used to be multiple_class */ 1 39 2 private bit (1) unal, /* TRUE if was registered as private */ 1 40 2 inconsistent_dbm bit (1) unal, /* TRUE if ESD-less crash */ 1 41 2 flagpad bit (33) unal, 1 42 2 max_access_class bit (72), /* Maximum access class for stuff on volume */ 1 43 2 min_access_class bit (72), /* Minimum access class for stuff on volume */ 1 44 2 password bit (72), /* not yet used */ 1 45 2 number_of_sv fixed bin, /* if = 0 not a subvolume else the number of svs */ 1 46 2 this_sv fixed bin, /* what subvolume number it is */ 1 47 2 sub_vol_name char (1), /* what subvolume name (a b c d) it is */ 1 48 2 pad1 (13) fixed bin, 1 49 2 time_mounted fixed bin (71), /* time mounted */ 1 50 2 time_map_updated fixed bin (71), /* time vmap known good */ 1 51 1 52 /* The next two words overlay time_unmounted on pre-MR10 systems. This 1 53* forces a salvage if an MR10 pack is mounted on an earlier system. 1 54* */ 1 55 2 volmap_version fixed bin, /* version of volume map (currently 1) */ 1 56 2 pad6 fixed bin, 1 57 1 58 2 time_salvaged fixed bin (71), /* time salvaged */ 1 59 2 time_of_boot fixed bin (71), /* time of last bootload */ 1 60 2 time_unmounted fixed bin (71), /* time unmounted cleanly */ 1 61 2 last_pvtx fixed bin, /* pvtx in that PDMAP */ 1 62 2 pad1a (2) fixed bin, 1 63 2 err_hist_size fixed bin, /* size of pack error history */ 1 64 2 time_last_dmp (3) fixed bin (71), /* time last completed dump pass started */ 1 65 2 time_last_reloaded fixed bin (71), /* what it says */ 1 66 2 pad2 (40) fixed bin, 1 67 2 root, 1 68 3 here bit (1), /* TRUE if the root is on this pack */ 1 69 3 root_vtocx fixed bin (35), /* VTOC index of root, if it is here */ 1 70 3 shutdown_state fixed bin, /* Status of hierarchy */ 1 71 3 pad7 bit (1) aligned, 1 72 3 disk_table_vtocx fixed bin, /* VTOC index of disk table on RPV */ 1 73 3 disk_table_uid bit (36) aligned, /* UID of disk table */ 1 74 3 esd_state fixed bin, /* State of esd */ 1 75 2 volmap_record fixed bin, /* Begin record of volume map */ 1 76 2 size_of_volmap fixed bin, /* Number of records in volume map */ 1 77 2 vtoc_map_record fixed bin, /* Begin record of VTOC map */ 1 78 2 size_of_vtoc_map fixed bin, /* Number of records in VTOC map */ 1 79 2 volmap_unit_size fixed bin, /* Number of words per volume map section */ 1 80 2 vtoc_origin_record fixed bin, /* Begin record of VTOC */ 1 81 2 dumper_bit_map_record fixed bin, /* Begin record of dumper bit-map */ 1 82 2 vol_trouble_count fixed bin, /* Count of inconsistencies found since salvage */ 1 83 2 pad3 (52) fixed bin, 1 84 2 nparts fixed bin, /* Number of special partitions on pack */ 1 85 2 parts (47), 1 86 3 part char (4), /* Name of partition */ 1 87 3 frec fixed bin, /* First record */ 1 88 3 nrec fixed bin, /* Number of records */ 1 89 3 pad5 fixed bin, 1 90 2 pad4 (5*64) fixed bin; 1 91 1 92 dcl Multics_ID_String char (32) init ("Multics Storage System Volume") static; 1 93 1 94 /* END INCLUDE FILE fs_vol_label.incl.pl1 */ 118 119 120 end find_partition_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 07/19/88 1534.8 find_partition_.pl1 >special_ldd>install>MR12.2-1061>find_partition_.pl1 118 1 07/19/88 1523.2 fs_vol_label.incl.pl1 >special_ldd>install>MR12.2-1061>fs_vol_label.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. P_code parameter fixed bin(35,0) dcl 29 set ref 12 78* 113* P_part_lth parameter fixed bin(35,0) dcl 29 set ref 12 80* 110* P_part_name parameter char packed unaligned dcl 29 set ref 12 78* 99 P_part_start parameter fixed bin(35,0) dcl 29 set ref 12 79* 109* P_pvid parameter bit(36) dcl 29 set ref 12 75* 78* 108* P_pvname parameter char packed unaligned dcl 29 set ref 12 73 84* addr builtin function dcl 64 ref 89 code 000103 automatic fixed bin(35,0) dcl 41 set ref 69* 84* 85 92* 96 104* 111* 113 error_table_$moderr 000016 external static fixed bin(35,0) dcl 52 ref 69 error_table_$noentry 000020 external static fixed bin(35,0) dcl 52 ref 104 fb18_length 000101 automatic fixed bin(18,0) dcl 39 set ref 77* 78* 80 fb18_record 000100 automatic fixed bin(18,0) dcl 38 set ref 76* 78* 79 frec 1005 based fixed bin(17,0) array level 3 dcl 1-18 ref 109 idx 000104 automatic fixed bin(17,0) dcl 42 set ref 99* 99* 102 109 110 label based structure level 1 dcl 1-18 label_buffer 000105 automatic bit(36) array dcl 44 set ref 89 labelp 002114 automatic pointer dcl 1-16 set ref 89* 92* 99 99 102 109 110 linkage_error 002106 stack reference condition dcl 62 ref 67 94 mdc_$pvname_info 000010 constant entry external dcl 46 ref 84 nparts 1003 based fixed bin(17,0) level 2 dcl 1-18 ref 99 102 nrec 1006 based fixed bin(17,0) array level 3 dcl 1-18 ref 110 part 1004 based char(4) array level 3 dcl 1-18 ref 99 parts 1004 based structure array level 2 dcl 1-18 phcs_$find_partition 000014 constant entry external dcl 49 ref 78 phcs_$read_disk_label 000012 constant entry external dcl 48 ref 92 pvid 000102 automatic bit(36) dcl 40 set ref 84* 92* 108 sys_info$page_size 000022 external static fixed bin(17,0) dcl 60 ref 110 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. Multics_ID_String internal static char(32) initial packed unaligned dcl 1-92 error_table_$device_not_usable external static fixed bin(35,0) dcl 52 error_table_$device_parity external static fixed bin(35,0) dcl 52 error_table_$invalid_device external static fixed bin(35,0) dcl 52 NAMES DECLARED BY EXPLICIT CONTEXT. MAIN_RETURN 000273 constant label dcl 113 set ref 70 85 96 105 find_partition_ 000020 constant entry external dcl 12 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 412 436 277 422 Length 640 277 24 166 113 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME find_partition_ 1134 external procedure is an external procedure. on unit on line 67 64 on unit STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME find_partition_ 000100 fb18_record find_partition_ 000101 fb18_length find_partition_ 000102 pvid find_partition_ 000103 code find_partition_ 000104 idx find_partition_ 000105 label_buffer find_partition_ 002114 labelp find_partition_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out_desc call_ext_out return_mac tra_ext_1 enable_op ext_entry_desc int_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. mdc_$pvname_info phcs_$find_partition phcs_$read_disk_label THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$moderr error_table_$noentry sys_info$page_size LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 12 000012 67 000040 69 000054 70 000057 73 000062 75 000071 76 000072 77 000073 78 000074 79 000132 80 000135 81 000137 84 000140 85 000200 89 000202 92 000204 94 000217 96 000220 99 000222 100 000245 102 000247 104 000253 105 000256 108 000257 109 000262 110 000266 111 000272 113 000273 115 000276 ----------------------------------------------------------- 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