


      CT(7)                      (Bull-SPS9)                      CT(7)



      NAME
           ct - cartridge tape interface files

      DESCRIPTION
           The ctcu, nctcu, rctcu, and nrctcu files refer to Bull-SPS9
           cartridge tape devices.  The ctcu file refers to non-raw
           device with rewind.  The nctcu file is non-raw without
           rewind.  The rctcu file is raw with rewind.  The nrctcu file
           is raw without rewind.  By convention, c is a CIO board
           number, which, when absent, is an implied 0.  u is a unit
           number on the controller that is either 0 or 1.

           When opened for reading or writing, the tape is assumed to
           be positioned as desired.  When a file is closed, an end-
           of-file is written if the file was opened for writing.  If a
           rewind tape device is specified, the tape is rewound.  If a
           no rewind device is used and the file was open for writing,
           the tape is positioned after the EOF mark.  If the no rewind
           device is used and opened read-only, the tape is positioned
           after the last block read.  Once opened, reading is
           restricted to between the position when opened and the next
           EOF or the last write.  The EOF is returned as a zero-length
           read.  By judiciously choosing ct and nct files, it is
           possible to read and write multi-file tapes.

           A standard tape consists of a series of 512-byte records
           terminated by an EOF.  If a file being written to the tape
           does not contain a multiple of 512 bytes the end of the file
           will be padded with zeros to fill out the last block.
           Though inefficient, the system makes it possible to treat
           the tape like any other file.

           Data can be written to the tape starting from the beginning
           of the tape or from end of recorded data on tape.  Writing
           cannot begin any place else.  Two ioctl operations are
           possible:  perform cartridge tape operation or read status
           from cartridge tape unit.  Reverse tape motion is
           prohibited.  The following definitions of ioctl operations
           are from sys/ctio.h:


           /*
               ctio.h
                structures and definitions for cartridge tape ioctl commands
           */
           #include <ros/ioctl.h>

           /*
           ** structure for CTIOCTOP - cartridge tape op command
           */
           struct    ctop
           {



      Page 1                                         (73 A2 02MTA REV1)






      CT(7)                      (Bull-SPS9)                      CT(7)



               short ct_op;         /* operations from list below */
               daddr_t ct_count;    /* how many operations to perform */
           };




















































      Page 2                                         (73 A2 02MTA REV1)






      CT(7)                      (Bull-SPS9)                      CT(7)



           /*
           ** operations
           */
           #define CTWEOF 0   /* write an end of file record */
           #define CTFSF  1   /* forward space file */
           #define CTFSR  2   /* forward space record */
           #define CTREW  3   /* rewind tape */
           #define CTEOD  4   /* seek to end of data on tape */
           #define CTNOP  5   /* no operation, set status only */
           #define CTRET  6   /* perform retention op on tape */

           /*
           ** structure for CTIOCGET cartridge tape get-status command
           */
           struct ctget
           {
               short   ct_type;
               /* these values are device dependent */
               int     ct_soft_er;    /* msb of short error count */
               char    ct_err_cd;       /* device error codes */
               char    ct_sense_info;  /* device sense info */
               int       ct_resid;      /* residual count */
               /* end device-dependent values */
           };

           /*
           ** constant for ct_type
           */
           #define CT_540 1

           #define CTIOCTOP    _IOW(c,1,struct ctop)    /* do a cartridge tape op */
           #define CTIOCGET    _IOR(c,2,struct ctget)    /* get tape status */




      DEVICE CODE
               4 device files per controller
               major device number: 15
               minor device number is calculated by:


                   (unsigned character byte)
                    bits  0 1 2 3 | 4 5 6 7
                    --------------|---------
           controller #1  0 0 0 0 | - - - 1 unit #0, rewind on close
                          0 0 0 0 | - - - 0 unit #0, no rewind on close
                          0 0 0 1 | - - - 1 unit #1, rewind on close (not supported)
                          0 0 0 1 | - - - 0 unit #1, no rewind on close (not supported)
           controller #2  0 0 1 0 | - - - 1 unit #0, rewind on close (not supported)
                          0 0 1 0 | - - - 0 unit #0, no rewind on close (not supported)
                          0 0 1 1 | - - - 1 unit #1, rewind on close (not supported)



      Page 3                                         (73 A2 02MTA REV1)






      CT(7)                      (Bull-SPS9)                      CT(7)



                          0 0 1 1 | - - - 0 unit #1, no rewind on close (not supported)






















































      Page 4                                         (73 A2 02MTA REV1)






      CT(7)                      (Bull-SPS9)                      CT(7)



      FILES
           /dev/[n]ct??
           /usr/include/sys/ctio.h


                                   Device Files
                                   ------------

                       Raw Mode                   Non-Raw Mode
                       --------                   ------------
                minor re-   unit  file       minor re-   unit  file
                 no.  wind   no.  name        no.  wind   no.  name
               ----- ----- ----- -----      ----- ----- ----- -----
                 1     y     0    rct0         1    y     0   ct0
                 0     n     0    nrct0        0    n     0   nct0
                 9     y     1    rct1         9    y     1   ct1
                 8     n     1    nrct1        8    n     1   nct1
                33     y     0    rct10       33    y     0   ct10
                32     n     0    nrct10      32    n     0   nct10
                49     y     1    rct11       49    y     1   ct11
                48     n     1    nrct11      48    n     1   nct11


































      Page 5                                         (73 A2 02MTA REV1)



