*copyc osd$default_pragmats
MODULE rmm$validate_tape_operations;

{ PURPOSE:
{
{   This module contains CYBIL procedures to be optionally modified by sites
{ which desire to validate tape accesses beyond the NOS/VE defaults.
{
{ DESIGN:
{
{   Three CYBIL procedures are implemented in this module which facilitate
{ site-defined tape validation.  By default, the procedures simply complete
{ the tape request.  Site validation of tape assignments, tape requests, or
{ tape volume initialization can be implemented by adding whatever code is
{ required immediately before the call to RMP$COMPLETE_(whatever).

*copyc osp$set_status_abnormal
*copyc pmh$execute_with_less_privilege
*copyc rmc$condition_code_limits
*copyc rme$request_tape
*copyc rmp$complete_tape_assignment
*copyc rmp$complete_tape_request
?? PUSH (LISTEXT := ON) ??
*copyc amt$file_identifier
*copyc amt$file_label_type
*copyc fst$file_reference
*copyc osd$virtual_address
*copyc ost$name
*copyc pft$password
*copyc pft$usage_selections
*copyc rmt$density
*copyc rmt$volume_descriptor
*copyc rmt$write_ring
*copyc rmt$volume_list
*copyc ost$status
?? POP ??

?? TITLE := 'rmp$validate_tape_assignment', EJECT ??

  PROCEDURE [XDCL] rmp$validate_tape_assignment (
         validation_state: boolean;
         file_identifier: amt$file_identifier;
         file: fst$file_reference;
         density: rmt$density;
         write_ring: rmt$write_ring;
         file_label_type: amt$file_label_type;
         access_mode: pft$usage_selections;
         initial_assignment: boolean;
         next_volume: amt$volume_number;
         volume_descriptor: rmt$volume_descriptor;
         removable_media_group: ost$name;
         removable_media_location: ost$name;
     VAR status: ost$status);

*copyc rmh$validate_tape_assignment

    VAR
      operator_terminated_assignment: boolean;

    status.normal := TRUE;

*copyc rmh$complete_tape_assignment

    rmp$complete_tape_assignment (file_identifier, file, density, write_ring,
        file_label_type, access_mode, initial_assignment, next_volume,
        volume_descriptor, removable_media_group, removable_media_location, operator_terminated_assignment,
        status);

  PROCEND rmp$validate_tape_assignment;
?? TITLE := 'rmp$validate_tape_request', EJECT ??

  PROCEDURE [XDCL] rmp$validate_tape_request (
         tape_validation: boolean;
         file: fst$file_reference;
         density: rmt$density;
         write_ring: rmt$write_ring;
         volume_list: rmt$volume_list;
         removable_media_group: ost$name;
         volume_overflow_allowed: boolean;
         validation_ring: ost$valid_ring;
         file_password: pft$password;
         attachment_logging: boolean;
     VAR status: ost$status);

*copyc rmh$validate_tape_request

    status.normal := TRUE;

*copyc rmh$complete_tape_request

    rmp$complete_tape_request (file, density, write_ring, volume_list, removable_media_group,
          volume_overflow_allowed, validation_ring, file_password, attachment_logging, status);

  PROCEND rmp$validate_tape_request;

MODEND rmm$validate_tape_operations;
