Annotation of coherent/f/usr/include.78/dumptape.h, revision 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/dir.h>
        !            20: #include <sys/ino.h>
        !            21: 
        !            22: /*
        !            23:  * Dump tape header.
        !            24:  * All entries are in cannonical
        !            25:  * format on the tape.
        !            26:  */
        !            27: struct dumpheader
        !            28: {
        !            29:        int     dh_magic;               /* Magic number */
        !            30:        ino_t   dh_nino;                /* # of inodes on file system */
        !            31:        time_t  dh_bdate;               /* Date at beginning of dump */
        !            32:        time_t  dh_ddate;               /* Dump since date */
        !            33:        int     dh_level;               /* Dump level */
        !            34:        int     dh_reel;                /* Reel number in dump */
        !            35:        fsize_t dh_nbyte;               /* Length of disc */
        !            36:        int     dh_blocking;            /* Blocking factor */
        !            37:        char    dh_dev[DIRSIZ];         /* Name of dumped device */
        !            38:        char    dh_fname[6];            /* File system name */
        !            39:        char    dh_fpack[6];            /* File system pack name */
        !            40:        int     dh_checksum;            /* Byte checksum */
        !            41: };
        !            42: 
        !            43: #define        DH_MAG  0123456                 /* Magic number */
        !            44: 
        !            45: /*
        !            46:  * Dump data blocks.
        !            47:  * These are all a big union.
        !            48:  * They are packed into much larger
        !            49:  * blocks on the tape.
        !            50:  */
        !            51: union  dumpdata
        !            52: {
        !            53:        struct  {
        !            54:                int     dd_type;        /* Type = DD_EOT */
        !            55:        } dd_st1;
        !            56: 
        !            57:        struct  {
        !            58:                int     dd_type;        /* Type = DD_DATA */
        !            59:                ino_t   dd_ino;         /* Inode number */
        !            60:                daddr_t dd_block;       /* Block number in file */
        !            61:                int     dd_size;        /* Bytes used in this block */
        !            62:                char    dd_data[BUFSIZ];/* Data */
        !            63:        } dd_st2;
        !            64: 
        !            65:        struct  {
        !            66:                int     dd_type;        /* Type = DD_INO */
        !            67:                ino_t   dd_ino;         /* Inode number */
        !            68:                struct  dinode dd_dinode; /* On disc inode */
        !            69:        } dd_st3;
        !            70: 
        !            71:        struct  {
        !            72:                int     dd_type;        /* Type = DD_MAP */
        !            73:                ino_t   dd_ino;         /* Base inode of this map block */
        !            74:                int     dd_nmap;        /* # of map entries */
        !            75:                char    dd_map[BUFSIZ]; /* Some map */
        !            76:        } dd_st4;
        !            77: };
        !            78: 
        !            79: #define        DD_EOT  0                       /* End of dump */
        !            80: #define        DD_INO  1                       /* Inode */
        !            81: #define        DD_DATA 2                       /* Data block */
        !            82: #define        DD_MAP  3                       /* Map */
        !            83: 
        !            84: #define        DD_BUSY 01                      /* Inode in use */
        !            85: #define        DD_DUMP 02                      /* Inode dumped */
        !            86: #define        DD_DIR  04                      /* Inode is a directory */
        !            87: #define        DD_DEJA 010                     /* Already seen flag (dump) */
        !            88: #define        DD_HERE (DD_BUSY|DD_DUMP)       /* On the tape */
        !            89: 
        !            90: /*
        !            91:  * This structure is used
        !            92:  * to hold the dump dates in the
        !            93:  * file `/etc/ddate'.
        !            94:  */
        !            95: struct idates {
        !            96:        char    id_name[DIRSIZ];        /* Device name */
        !            97:        int     id_incno;               /* Level */
        !            98:        time_t  id_ddate;               /* The date of the dump */
        !            99: };
        !           100: 
        !           101: #define        DDATE   "/etc/ddate"            /* Date file name */
        !           102: #define        DTAPE   "/dev/dump"             /* Default dump tape */
        !           103: #define        DFSYS   ""                      /* No default file system */
        !           104: 
        !           105: #endif

unix.superglobalmegacorp.com

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