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 reconfigure_rcp:  procedure;
12 
13 /*        This program is an operator command that adds and deletes devices.
14 *         Created on 12/31/74 by Bill Silver.
15 *
16 *         This program has two entry points:
17 *              1.   add_device    -     Add a deleted device back to the system.
18 *              2.   del_device    -     Delete a device from the system.
19 */
20 
21 dcl       arg_len             fixed bin;          /* Length of device name argument. */
22 dcl       arg_ptr             ptr;                /* Pointer to device name argument. */
23 dcl       ecode               fixed bin(35);      /* error_table_ code. */
24 
25 dcl       argument char(arg_len) based(arg_ptr);  /* Used to reference device name argument. */
26 
27 dcl       com_err_               entry  options(variable);
28 dcl       cu_$arg_ptr            entry  (fixed bin,ptr,fixed bin,fixed bin(35));
29 dcl       rcp_sys_$add_device    entry  (char(*),fixed bin(35));
30 dcl       rcp_sys_$delete_device entry  (char(*),fixed bin(35));
31 /*^L      */
32 add_device:  entry;
33 
34 /*        This entry is called to add a deleted device back to the system.
35 */
36           call cu_$arg_ptr (1,arg_ptr,arg_len,ecode);
37           if   ecode ^= 0
38                then do;
39                     call com_err_ (ecode,"reconfigure_rcp","Error getting device name.");
40                     return;
41                end;
42 
43           call rcp_sys_$add_device (argument,ecode);
44           if   ecode ^= 0
45                then call com_err_ (ecode,"reconfigure_rcp","Error adding device: ^a",argument);
46 
47           return;
48 
49 
50 
51 
52 del_device:  entry;
53 
54 /*        This entry is called to delete a device from the system.
55 *         The device must be known to RCP, that is, it must be configured.
56 *         If the device is currently in use by some process that usage will be
57 *         terminated.  The device will not be assigned to any other process until
58 *         it is added again.
59 */
60           call cu_$arg_ptr (1,arg_ptr,arg_len,ecode);
61           if   ecode ^= 0
62                then do;
63                     call com_err_ (ecode,"reconfigure_rcp","Error getting device name.");
64                     return;
65                end;
66 
67           call rcp_sys_$delete_device (argument,ecode);
68           if   ecode ^= 0
69                then call com_err_ (ecode,"reconfigure_rcp","Error deleting device: ^a",argument);
70 
71           end  reconfigure_rcp;