Annotation of coherent/f/usr/include/dumptape.h, revision 1.1.1.1

1.1       root        1: /* (-lgl
                      2:  *     COHERENT Version 3.0
                      3:  *     Copyright (c) 1982, 1993 by Mark Williams Company.
                      4:  *     All rights reserved. May not be copied without permission.
                      5:  -lgl) */
                      6: /*
                      7:  * Dump tapes.
                      8:  * A dump tape begins with a header
                      9:  * record. This contains the attributes of the
                     10:  * tape.
                     11:  * The remainder of the tape is filled with
                     12:  * arrays of dumpdata records. The map comes first,
                     13:  * then all the directories, then all the files.
                     14:  */
                     15: #ifndef __DUMPTAPE_H__
                     16: #define __DUMPTAPE_H__
                     17: 
                     18: #include <sys/types.h>
                     19: #include <sys/ino.h>
                     20: 
                     21: /*
                     22:  * Be warned! This header uses several magic numbers related to raw filesystem
                     23:  * structure that are not portable. Since raw filesystem structure is used,
                     24:  * this command will /not/ run on any filesystems other than the old-style
                     25:  * Coherent filesystem.
                     26:  */
                     27: 
                     28: #if    ! DIRSIZ
                     29: # define       DIRSIZ          14
                     30: #endif
                     31: #if    ! __BUFSIZ
                     32: # define       __BUFSIZ        512
                     33: #endif
                     34: 
                     35: /*
                     36:  * Dump tape header.
                     37:  * All entries are in cannonical
                     38:  * format on the tape.
                     39:  */
                     40: struct dumpheader
                     41: {
                     42:        int     dh_magic;               /* Magic number */
                     43:        ino_t   dh_nino;                /* # of inodes on file system */
                     44:        time_t  dh_bdate;               /* Date at beginning of dump */
                     45:        time_t  dh_ddate;               /* Dump since date */
                     46:        int     dh_level;               /* Dump level */
                     47:        int     dh_reel;                /* Reel number in dump */
                     48:        fsize_t dh_nbyte;               /* Length of disc */
                     49:        int     dh_blocking;            /* Blocking factor */
                     50:        char    dh_dev[DIRSIZ];         /* Name of dumped device */
                     51:        char    dh_fname[6];            /* File system name */
                     52:        char    dh_fpack[6];            /* File system pack name */
                     53:        int     dh_checksum;            /* Byte checksum */
                     54: };
                     55: 
                     56: #define        DH_MAG  0123456                 /* Magic number */
                     57: 
                     58: /*
                     59:  * Dump data blocks.
                     60:  * These are all a big union.
                     61:  * They are packed into much larger
                     62:  * blocks on the tape.
                     63:  */
                     64: union  dumpdata
                     65: {
                     66:        struct  {
                     67:                int     dd_type;        /* Type = DD_EOT */
                     68:        } dd_st1;
                     69: 
                     70:        struct  {
                     71:                int     dd_type;        /* Type = DD_DATA */
                     72:                ino_t   dd_ino;         /* Inode number */
                     73:                daddr_t dd_block;       /* Block number in file */
                     74:                int     dd_size;        /* Bytes used in this block */
                     75:                char    dd_data[__BUFSIZ];/* Data */
                     76:        } dd_st2;
                     77: 
                     78:        struct  {
                     79:                int     dd_type;        /* Type = DD_INO */
                     80:                ino_t   dd_ino;         /* Inode number */
                     81:                struct  dinode dd_dinode; /* On disc inode */
                     82:        } dd_st3;
                     83: 
                     84:        struct  {
                     85:                int     dd_type;        /* Type = DD_MAP */
                     86:                ino_t   dd_ino;         /* Base inode of this map block */
                     87:                int     dd_nmap;        /* # of map entries */
                     88:                char    dd_map[__BUFSIZ]; /* Some map */
                     89:        } dd_st4;
                     90: };
                     91: 
                     92: #define        DD_EOT  0                       /* End of dump */
                     93: #define        DD_INO  1                       /* Inode */
                     94: #define        DD_DATA 2                       /* Data block */
                     95: #define        DD_MAP  3                       /* Map */
                     96: 
                     97: #define        DD_BUSY 01                      /* Inode in use */
                     98: #define        DD_DUMP 02                      /* Inode dumped */
                     99: #define        DD_DIR  04                      /* Inode is a directory */
                    100: #define        DD_DEJA 010                     /* Already seen flag (dump) */
                    101: #define        DD_HERE (DD_BUSY|DD_DUMP)       /* On the tape */
                    102: 
                    103: /*
                    104:  * This structure is used
                    105:  * to hold the dump dates in the
                    106:  * file `/etc/ddate'.
                    107:  */
                    108: struct idates {
                    109:        char    id_name[DIRSIZ];        /* Device name */
                    110:        int     id_incno;               /* Level */
                    111:        time_t  id_ddate;               /* The date of the dump */
                    112: };
                    113: 
                    114: #define        DDATE   "/etc/ddate"            /* Date file name */
                    115: #define        DTAPE   "/dev/dump"             /* Default dump tape */
                    116: #define        DFSYS   ""                      /* No default file system */
                    117: 
                    118: #endif /* ! defined (__DUMPTAPE_H__) */

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.