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 salv_dump_copy: proc (a_block_p, a_block_len, a_name);
 14 
 15 /* *      SALV_DUMP_COPY
 16    *
 17    *      Procedure to copy data into a segment in >dumps, with condition handlers
 18    *      to deal with the unexpected. It is the callers responsibility to ensure that
 19    *      the this will not cause a mylock error on >dumps.
 20    *
 21    *      Created, from on_line_salvager, 10 August 1981, W. Olin Sibert
 22    */
 23 
 24 dcl  a_block_p ptr parameter;                               /* ptr to block. */
 25 dcl  a_block_len fixed bin parameter;                       /* Number of words in block. */
 26 dcl  a_name char (*) parameter;                             /* name of segment in >dumps */
 27 
 28 dcl  block_p pointer;
 29 dcl  block_len fixed bin;
 30 dcl  name char (32);
 31 dcl  rings (3) fixed bin (3);
 32 dcl  seg_p ptr;                                             /* Ptr. to segment in >dumps */
 33 dcl  code fixed bin (35);
 34 dcl  copy (block_len) bit (36) aligned based;               /* Used to copy block. */
 35 
 36 dcl 1 del_acl aligned,
 37     2 user char (32),
 38     2 err_code fixed bin (35);
 39 
 40 dcl  pds$process_group_id char (32) external static;
 41 
 42 dcl  append$branchx entry (char (*), char (*), fixed bin (5), (3) fixed bin (3), char (*),
 43      fixed bin (1), fixed bin (1), fixed bin (24), fixed bin (35));
 44 dcl  asd_$del_sentries entry (char (*), char (*), ptr, fixed bin, fixed bin (35));
 45 dcl  delentry$dseg entry (pointer, fixed bin (35));
 46 dcl  initiate$priv_init entry (char (*) aligned, char (*) aligned, char (*) aligned,
 47      fixed bin (1), fixed bin (2), ptr, fixed bin (35));
 48 dcl  syserr entry options (variable);
 49 dcl  syserr$error_code entry options (variable);
 50 
 51 dcl  WHOAMI char (32) internal static options (constant) init ("salv_dump_copy");
 52 
 53 dcl  seg_fault_error condition;
 54 
 55 dcl (addr, null, ptr) builtin;
 56 
 57 /* ^L */
 58 
 59           block_p = a_block_p;
 60           block_len = a_block_len;
 61           name = a_name;
 62 
 63           rings (*) = 7;
 64           call append$branchx (">dumps", name, RW_ACCESS_BIN, rings, pds$process_group_id, 0, 0, 36 * block_len, code);
 65           if code ^= 0 then do;
 66                call syserr$error_code (LOG, code, "^a: Appending ^a to dump directory.", WHOAMI, name);
 67                return;
 68                end;
 69 
 70           call initiate$priv_init (">dumps", (name), "", 0, 0, seg_p, code); /* get a pointer to the new seg */
 71           if seg_p = null then do;
 72                call syserr$error_code (LOG, code, "^a: Intiating ^a.", WHOAMI, name);
 73                return;
 74                end;
 75 
 76           on condition (seg_fault_error) begin;
 77                call syserr (LOG, "^a: seg_fault_error copying ^p into >dumps>^a", WHOAMI, block_p, name);
 78                call delentry$dseg (seg_p, (0));             /* Get rid of it to avoid embarassment later */
 79                goto DUMP_FINISHED;
 80                end;
 81 
 82           seg_p -> copy = block_p -> copy;                  /* copy the information */
 83 
 84           del_acl.user = pds$process_group_id;              /* set to delete user */
 85           call asd_$del_sentries (">dumps", name, addr (del_acl), 1, (0));
 86 
 87 DUMP_FINISHED:
 88           return;
 89 
 90 %page; %include syserr_constants;
 91 %page; %include access_mode_values;
 92 
 93 /* ^L */
 94 
 95 /* BEGIN MESSAGE DOCUMENTATION
 96 
 97    Message:
 98    salv_dump_copy: Appending SEGNAME to dump directory ERRORMESSAGE
 99 
100    S: $log
101 
102    T: $run
103 
104    M: The directory salvager could not append a copy of a directory being
105    salvaged or the stack at the time of salvage to the system dump directory.
106 
107    A: Check the ACL on the system dump directory, and site exec_coms which set it.
108    $notify_sa
109 
110    Message:
111    salv_dump_copy: Initiating SEGNAME ERRORMESSAGE
112 
113    S: $log
114 
115    T: $run
116 
117    M: The directory salvager could not initiate a copy of a
118    ring 0 stack or directory being salvaged in the system dump directory.
119    There may be ACL problems in the system dump directory.
120 
121    A: $notify_sa
122 
123    Message:
124    salv_dump_copy: seg_fault_error copying PPPP into >dumps>SEGNAME
125 
126    S: $log
127 
128    T: $run
129 
130    M: The directory salvager attempted to create a copy of a segment in >dumps,
131    but encountered a seg_fault_error condition
132    while attempting to copy it. This is probably caused by quota problems in
133    >dumps or insufficient space on the logical volume.
134 
135    A: $notify_sa
136 
137    END MESSAGE DOCUMENTATION */
138 
139           end salv_dump_copy;