COMPILATION LISTING OF SEGMENT list_partitions Compiled by: Multics PL/I Compiler, Release 30, of February 16, 1988 Compiled at: Honeywell Bull, Phoenix AZ, SysM Compiled on: 07/20/88 1033.0 mst Wed 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 list_partitions: 12 procedure () options (variable); 13 14 /* * Command to use phcs_$read_disk_label and to list the partitions on a volume. 15* * 16* * list_partitions Pvname 17* * 18* * 10/18/80, W. Olin Sibert 19* */ 20 21 dcl ap pointer; 22 dcl al fixed bin (21); 23 dcl arg char (al) based (ap); 24 dcl code fixed bin (35); 25 dcl (nargs, argno) fixed bin; 26 27 dcl pvname char (32); 28 dcl pvid bit (36) aligned; 29 dcl part_idx fixed bin; 30 31 dcl 1 local_label aligned like label automatic; 32 33 dcl com_err_ entry options (variable); 34 dcl cu_$arg_count entry (fixed bin, fixed bin (35)); 35 dcl cu_$arg_ptr entry (fixed bin, pointer, fixed bin (21), fixed bin (35)); 36 dcl phcs_$read_disk_label entry (bit (36) aligned, pointer, fixed bin (35)); 37 dcl ioa_ entry options (variable); 38 dcl mdc_$pvname_info entry (char (*), bit (36) aligned, char (*), bit (36) aligned, fixed bin, fixed bin (35)); 39 40 dcl (error_table_$badopt, 41 error_table_$too_many_args, 42 error_table_$noarg) fixed bin (35) external static; 43 44 dcl WHOAMI char (32) internal static options (constant) init ("list_partitions"); 45 46 dcl linkage_error condition; 47 48 dcl (addr, char) builtin; 49 50 /* */ 51 52 pvname = ""; 53 54 call cu_$arg_count (nargs, code); 55 if code ^= 0 then do; 56 call com_err_ (code, WHOAMI); 57 RETURN: return; 58 end; 59 60 do argno = 1 to nargs; 61 call cu_$arg_ptr (argno, ap, al, (0)); 62 63 if char (arg, 1) = "-" then do; 64 call com_err_ (error_table_$badopt, WHOAMI, "^a", arg); 65 goto RETURN; 66 end; 67 68 else if pvname = "" then /* first arg is volume name */ 69 pvname = arg; 70 71 else do; 72 code = error_table_$too_many_args; 73 goto USAGE; 74 end; 75 end; /* of argument loop */ 76 77 if pvname = "" then do; 78 code = error_table_$noarg; 79 USAGE: call com_err_ (code, WHOAMI, 80 "^/Usage:^-^a pvname", WHOAMI); 81 goto RETURN; 82 end; 83 84 /* */ 85 86 call mdc_$pvname_info (pvname, pvid, (""), (""b), (0), code); 87 if code ^= 0 then do; 88 call com_err_ (code, WHOAMI, "^a", pvname); 89 goto RETURN; 90 end; 91 92 labelp = addr (local_label); 93 94 on condition (linkage_error) begin; /* exit gracefully */ 95 call com_err_ (0, WHOAMI, 96 "This opertaion requires privileged access (phcs_) not given to this process."); 97 98 goto RETURN; /* and punt */ 99 end; 100 101 call phcs_$read_disk_label (pvid, labelp, code); 102 103 revert condition (linkage_error); 104 105 if code ^= 0 then do; 106 call com_err_ (code, WHOAMI, "Cannot read label of ^a", pvname); 107 goto RETURN; 108 end; 109 110 call ioa_ ("Volume ^a:", pvname); 111 call ioa_ ("^8d records, ^5d VTOC records.", label.vol_size, label.vtoc_size); 112 call ioa_ ("^[No^s^;^d^] partition^[s^]^[:^/^2xName^5xStart^5xSize^;.^]", 113 (label.nparts = 0), label.nparts, (label.nparts ^= 1), (label.nparts ^= 0)); 114 115 do part_idx = 1 to label.nparts; 116 call ioa_ ("^2x^4a^2x^8o^2x^6o^x(^d.)", 117 label.parts.part (part_idx), label.parts.frec (part_idx), 118 label.parts.nrec (part_idx), label.parts.nrec (part_idx)); 119 end; 120 121 call ioa_ (""); /* end with a blank line */ 122 123 goto RETURN; /* all done */ 124 125 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 */ 126 127 128 end list_partitions; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 07/19/88 1534.8 list_partitions.pl1 >special_ldd>install>MR12.2-1061>list_partitions.pl1 126 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. Multics 500 000120 automatic char(32) initial level 2 dcl 31 set ref 31* WHOAMI 000000 constant char(32) initial packed unaligned dcl 44 set ref 56* 64* 79* 79* 88* 95* 106* addr builtin function dcl 48 ref 92 al 000102 automatic fixed bin(21,0) dcl 22 set ref 61* 63 64 64 68 ap 000100 automatic pointer dcl 21 set ref 61* 63 64 68 arg based char packed unaligned dcl 23 set ref 63 64* 68 argno 000105 automatic fixed bin(17,0) dcl 25 set ref 60* 61* char builtin function dcl 48 ref 63 code 000103 automatic fixed bin(35,0) dcl 24 set ref 54* 55 56* 72* 78* 79* 86* 87 88* 101* 105 106* com_err_ 000010 constant entry external dcl 33 ref 56 64 79 88 95 106 cu_$arg_count 000012 constant entry external dcl 34 ref 54 cu_$arg_ptr 000014 constant entry external dcl 35 ref 61 error_table_$badopt 000024 external static fixed bin(35,0) dcl 40 set ref 64* error_table_$noarg 000030 external static fixed bin(35,0) dcl 40 ref 78 error_table_$too_many_args 000026 external static fixed bin(35,0) dcl 40 ref 72 frec 1005 based fixed bin(17,0) array level 3 dcl 1-18 set ref 116* ioa_ 000020 constant entry external dcl 37 ref 110 111 112 116 121 label based structure level 1 dcl 1-18 labelp 002126 automatic pointer dcl 1-16 set ref 92* 101* 111 111 112 112 112 112 115 116 116 116 116 linkage_error 002120 stack reference condition dcl 46 ref 94 103 local_label 000120 automatic structure level 1 dcl 31 set ref 92 mdc_$pvname_info 000022 constant entry external dcl 38 ref 86 nargs 000104 automatic fixed bin(17,0) dcl 25 set ref 54* 60 nparts 1003 based fixed bin(17,0) level 2 dcl 1-18 set ref 112 112* 112 112 115 nrec 1006 based fixed bin(17,0) array level 3 dcl 1-18 set ref 116* 116* part 1004 based char(4) array level 3 dcl 1-18 set ref 116* part_idx 000117 automatic fixed bin(17,0) dcl 29 set ref 115* 116 116 116 116* parts 1004 based structure array level 2 dcl 1-18 phcs_$read_disk_label 000016 constant entry external dcl 36 ref 101 pvid 000116 automatic bit(36) dcl 28 set ref 86* 101* pvname 000106 automatic char(32) packed unaligned dcl 27 set ref 52* 68 68* 77 86* 88* 106* 110* vol_size 547 based fixed bin(17,0) level 2 dcl 1-18 set ref 111* vtoc_size 550 based fixed bin(17,0) level 2 dcl 1-18 set ref 111* NAME DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. Multics_ID_String internal static char(32) initial packed unaligned dcl 1-92 NAMES DECLARED BY EXPLICIT CONTEXT. RETURN 000207 constant label dcl 57 ref 65 81 89 98 107 123 USAGE 000327 constant label dcl 79 ref 73 list_partitions 000145 constant entry external dcl 11 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 1110 1142 757 1120 Length 1356 757 32 177 131 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME list_partitions 1178 external procedure is an external procedure. on unit on line 94 100 on unit STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME list_partitions 000100 ap list_partitions 000102 al list_partitions 000103 code list_partitions 000104 nargs list_partitions 000105 argno list_partitions 000106 pvname list_partitions 000116 pvid list_partitions 000117 part_idx list_partitions 000120 local_label list_partitions 002126 labelp list_partitions THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. r_e_as r_ne_as call_ext_out_desc call_ext_out return_mac tra_ext_1 enable_op ext_entry int_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. com_err_ cu_$arg_count cu_$arg_ptr ioa_ mdc_$pvname_info phcs_$read_disk_label THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$badopt error_table_$noarg error_table_$too_many_args LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 11 000144 31 000152 52 000155 54 000160 55 000170 56 000172 57 000207 60 000210 61 000217 63 000235 64 000246 65 000300 68 000301 72 000312 73 000315 75 000316 77 000320 78 000324 79 000327 81 000360 86 000361 87 000420 88 000422 89 000450 92 000451 94 000453 95 000467 98 000513 101 000516 103 000531 105 000532 106 000534 107 000563 110 000564 111 000606 112 000632 115 000676 116 000707 119 000743 121 000745 123 000756 ----------------------------------------------------------- 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