COMPILATION LISTING OF SEGMENT countervalidate_label_ 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 1019.2 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 countervalidate_label_: proc (a_labelp, a_valid_reg, a_valid_copy, a_ss_pack); 14 15 /* Countervalidator of labels for mdxhdx/rcp 16* 17* Bernard Greenberg 12/1/76 */ 18 /* Modified 84-09-04 by EJ Sharpe - rename hdx refs to volume_registration_mgr_ */ 19 /* Modified 84-10-29 by EJ Sharpe - change date_time_ refs to date_time_$format */ 20 21 dcl a_labelp ptr; 22 dcl a_valid_reg bit (1); /* 1 => instance of valid registered volume */ 23 dcl a_valid_copy bit (1); /* 1 => valid and registered, but mtd copy exists */ 24 dcl a_ss_pack bit (1); /* 1 => this is a storage system pack. */ 25 26 dcl volume_registration_mgr_$pvname_info entry (char (*), bit (36) aligned, char (*), bit (36) aligned, fixed bin, fixed bin (35)); 27 dcl mdx$check_lv entry (char (*), fixed bin (35)); 28 dcl code fixed bin (35); 29 dcl (lvname, pvname) char (32); 30 dcl addr builtin; 31 32 labelp = a_labelp; 33 34 if label.Multics ^= Multics_ID_String then do; /* Not even ss pack */ 35 a_valid_reg, a_valid_copy, a_ss_pack = "0"b; 36 return; 37 end; 38 39 pvname = label.pv_name; 40 41 a_ss_pack = "1"b; /* Is surely a ss pack */ 42 43 call volume_registration_mgr_$pvname_info (pvname, pvid, lvname, lvid, (0), code); 44 if code ^= 0 then do; /* No such volume */ 45 a_valid_reg, a_valid_copy = "0"b; 46 return; 47 end; 48 49 if pvid = label.pvid & lvid = label.lvid & lvname = label.lv_name then do; /* It's real */ 50 a_valid_reg = "1"b; 51 call mdx$check_lv (lvname, code); 52 a_valid_copy = (code = 0); 53 end; 54 else a_valid_reg, a_valid_copy = "0"b; 55 return; 56 57 /* ----------------------------------------------------------- */ 58 59 query: entry (a_labelp, a_pvname, a_progname, a_drivename) returns (bit (1)); 60 61 dcl a_pvname char (32); 62 dcl (a_progname, a_drivename) char (*); 63 dcl (valid_reg, valid_copy, ss_pack) bit (1); 64 dcl command_query_ entry options (variable); 65 dcl answer char (10) varying; 66 dcl date_time_$format entry (char(*), fixed bin(71), char(*), char(*)) returns(char(250) var); 67 dcl chtime char (24); 68 dcl story char (50); 69 70 71 dcl 1 query_info aligned, 72 2 version fixed bin, 73 2 yes_or_no_sw bit (1) unal, 74 2 suppress_name_sw bit (1) unal, 75 2 code fixed bin (35), 76 2 query_code fixed bin (35); 77 78 dcl initializer_mdc_$countervalidate_label_ entry (ptr, bit (1), bit (1), bit (1)); 79 80 81 labelp = a_labelp; 82 pvname = a_pvname; 83 84 call initializer_mdc_$countervalidate_label_ (labelp, valid_reg, valid_copy, ss_pack); 85 /* Recursively get dope in other ring */ 86 if ^ss_pack then return ("1"b); /* No problem here! */ 87 88 if ^valid_reg then story = "an unregistered pack named"; 89 else if pvname = label.pv_name 90 then if valid_copy then story = "a copy of pv"; 91 else story = "an earlier instance of pv"; 92 else if valid_copy then story = "a copy of Multics Storage System Volume"; 93 else story = "Multics Storage System Volume"; 94 if valid_reg & ^(^valid_copy & ^(pvname = label.pv_name)) 95 then chtime = date_time_$format ("date_time", label.time_map_updated, "", ""); 96 else chtime = ""; 97 98 query_info.version = 2; 99 query_info.yes_or_no_sw = "1"b; 100 query_info.suppress_name_sw = "0"b; 101 query_info.code = 0; 102 query_info.query_code = 0; 103 104 call command_query_ (addr (query_info), answer, a_progname, 105 "Volume on ^a is ^a ""^a""^[.^/^2s^;,^/^[which was never used^s^;last used ^a^]. ^]Do you wish to overwrite it?", 106 a_drivename, story, label.pv_name, chtime = "", label.time_map_updated = 0, chtime); 107 return (answer = "yes"); 108 /* 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 */ 108 109 110 end; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/11/89 0802.8 countervalidate_label_.pl1 >spec>install>1111>countervalidate_label_.pl1 108 1 07/21/88 2036.0 fs_vol_label.incl.pl1 >ldd>include>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. Multics 500 based char(32) initial level 2 dcl 1-18 ref 34 Multics_ID_String 000000 constant char(32) initial packed unaligned dcl 1-92 ref 34 a_drivename parameter char packed unaligned dcl 62 set ref 59 104* a_labelp parameter pointer dcl 21 ref 13 32 59 81 a_progname parameter char packed unaligned dcl 62 set ref 59 104* a_pvname parameter char(32) packed unaligned dcl 61 ref 59 82 a_ss_pack parameter bit(1) packed unaligned dcl 24 set ref 13 35* 41* a_valid_copy parameter bit(1) packed unaligned dcl 23 set ref 13 35* 45* 52* 54* a_valid_reg parameter bit(1) packed unaligned dcl 22 set ref 13 35* 45* 50* 54* addr builtin function dcl 30 ref 104 104 answer 000124 automatic varying char(10) dcl 65 set ref 104* 107 chtime 000130 automatic char(24) packed unaligned dcl 67 set ref 94* 96* 104 104* code 000100 automatic fixed bin(35,0) dcl 28 in procedure "countervalidate_label_" set ref 43* 44 51* 52 code 2 000153 automatic fixed bin(35,0) level 2 in structure "query_info" dcl 71 in procedure "countervalidate_label_" set ref 101* command_query_ 000014 constant entry external dcl 64 ref 104 date_time_$format 000016 constant entry external dcl 66 ref 94 initializer_mdc_$countervalidate_label_ 000020 constant entry external dcl 78 ref 84 label based structure level 1 dcl 1-18 labelp 000160 automatic pointer dcl 1-16 set ref 32* 34 39 43 43 49 49 49 49 49 81* 84* 89 94 94 104 104 lv_name 531 based char(32) level 2 dcl 1-18 ref 49 lvid 542 based bit(36) level 2 dcl 1-18 set ref 43* 49 49 lvname 000101 automatic char(32) packed unaligned dcl 29 set ref 43* 49 51* mdx$check_lv 000012 constant entry external dcl 27 ref 51 pv_name 521 based char(32) level 2 dcl 1-18 set ref 39 89 94 104* pvid 541 based bit(36) level 2 dcl 1-18 set ref 43* 49 49 pvname 000111 automatic char(32) packed unaligned dcl 29 set ref 39* 43* 82* 89 94 query_code 3 000153 automatic fixed bin(35,0) level 2 dcl 71 set ref 102* query_info 000153 automatic structure level 1 dcl 71 set ref 104 104 ss_pack 000123 automatic bit(1) packed unaligned dcl 63 set ref 84* 86 story 000136 automatic char(50) packed unaligned dcl 68 set ref 88* 89* 91* 92* 93* 104* suppress_name_sw 1(01) 000153 automatic bit(1) level 2 packed packed unaligned dcl 71 set ref 100* time_map_updated 602 based fixed bin(71,0) level 2 dcl 1-18 set ref 94* 104 valid_copy 000122 automatic bit(1) packed unaligned dcl 63 set ref 84* 89 92 94 valid_reg 000121 automatic bit(1) packed unaligned dcl 63 set ref 84* 88 94 version 000153 automatic fixed bin(17,0) level 2 dcl 71 set ref 98* volume_registration_mgr_$pvname_info 000010 constant entry external dcl 26 ref 43 yes_or_no_sw 1 000153 automatic bit(1) level 2 packed packed unaligned dcl 71 set ref 99* NAMES DECLARED BY EXPLICIT CONTEXT. countervalidate_label_ 000146 constant entry external dcl 13 query 000367 constant entry external dcl 59 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 1034 1056 724 1044 Length 1254 724 22 161 107 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME countervalidate_label_ 276 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME countervalidate_label_ 000100 code countervalidate_label_ 000101 lvname countervalidate_label_ 000111 pvname countervalidate_label_ 000121 valid_reg countervalidate_label_ 000122 valid_copy countervalidate_label_ 000123 ss_pack countervalidate_label_ 000124 answer countervalidate_label_ 000130 chtime countervalidate_label_ 000136 story countervalidate_label_ 000153 query_info countervalidate_label_ 000160 labelp countervalidate_label_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. r_e_as call_ext_out_desc call_ext_out return_mac signal_op ext_entry ext_entry_desc THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. command_query_ date_time_$format initializer_mdc_$countervalidate_label_ mdx$check_lv volume_registration_mgr_$pvname_info NO EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 13 000141 32 000155 34 000161 35 000165 36 000201 39 000210 41 000213 43 000217 44 000252 45 000254 46 000265 49 000274 50 000307 51 000314 52 000331 53 000341 54 000342 55 000353 59 000362 81 000410 82 000414 84 000420 86 000435 88 000454 89 000463 91 000477 92 000503 93 000512 94 000515 96 000572 98 000575 99 000577 100 000601 101 000603 102 000604 104 000605 107 000701 ----------------------------------------------------------- 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