# 2.11BSD#431 - /usr/src/old/dump/dump.h

##### Variables

    asize             X
    blockswritten     X
    clrmap            X
    dadded            X
    density           X
    dirmap            X
    disk              X
    esize             X
    etapes            X
    fi                X
    idates_in         X
    idatev            X
    incno             X
    increm            X
    ino               X
    ithead            X
    nadded            X
    newtape           X
    nidates           X
    nodmap            X
    notify            X
    nsubdir           X
    processname       X
    tape              X
    tapeno            X
    to                X
    tsize             X
    tstart_writing    X
    uflag             X

##### Macros

    BIC               X
    BIS               X
    BIT               X
    DAY               X
    DIALUP            X
    DIRPB             X
    DISK              X
    HOUR              X
    ITITERATE         X
    MBIT              X
    MWORD             X
    NI                X
    NINCREM           X
    OINCREM           X
    OPGRENT           X
    TAPE              X
    X_ABORT           X
    X_FINOK           X
    X_REWRITE         X
    YEAR              X

##### struct's

    itime             X
    v7direct          X

       1: /*
       2:  * "@(#)dump.h	1.1 (Berkeley) 10/13/80"
       3:  */
       4: struct v7direct
       5:     {
       6:     unsigned short  d_ino;
       7:     char    d_name[14];
       8:     };
       9: #define NI  8   /* number of blocks of inodes per read */
      10: #define DIRPB   (DEV_BSIZE/sizeof(struct v7direct))
      11:
      12: #include <stdio.h>
      13: #include <ctype.h>
      14: #include <strings.h>
      15: #include <grp.h>
      16: #include <sys/param.h>
      17: #include <sys/stat.h>
      18: #include <sys/fs.h>
      19: #include <sys/inode.h>
      20: #include <sys/dir.h>
      21: #include <sys/time.h>
      22: #include <utmp.h>
      23: #include <protocols/dumprestor.h>
      24: #include <fstab.h>
      25:
      26: #define MWORD(m,i)  (m[(unsigned)(i-1)/MLEN])
      27: #define MBIT(i)     (1<<((unsigned)(i-1)%MLEN))
      28: #define BIS(i,w)    (MWORD(w,i) |=  MBIT(i))
      29: #define BIC(i,w)    (MWORD(w,i) &= ~MBIT(i))
      30: #define BIT(i,w)    (MWORD(w,i) & MBIT(i))
      31:
      32: short   clrmap[MSIZ];
      33: short   dirmap[MSIZ];
      34: short   nodmap[MSIZ];
      35:
      36: /*
      37:  *	All calculations done in 0.1" units!
      38:  */
      39:
      40: char    *disk;      /* name of the disk file */
      41: char    *tape;      /* name of the tape file */
      42: char    *increm;    /* name of the file containing incremental information*/
      43: char    incno;      /* increment number */
      44: int uflag;      /* update flag */
      45: int fi;     /* disk file descriptor */
      46: int to;     /* tape file descriptor */
      47: ino_t   ino;        /* current inumber; used globally */
      48: int nsubdir;
      49: int newtape;    /* new tape flag */
      50: int nadded;     /* number of added sub directories */
      51: int dadded;     /* directory added flag */
      52: int density;    /* density in 0.1" units */
      53: long    tsize;      /* tape size in 0.1" units */
      54: long    esize;      /* estimated tape size, blocks */
      55: long    asize;      /* number of 0.1" units written on current tape */
      56: int etapes;     /* estimated number of tapes */
      57:
      58: int notify;     /* notify operator flag */
      59: long    blockswritten;  /* number of blocks written on current tape */
      60: int tapeno;     /* current tape number */
      61: time_t  tstart_writing; /* when started writing the first tape block */
      62: char    *processname;
      63:
      64: time_t  time();
      65: off_t   lseek();
      66: char    *ctime();
      67: char    *prdate();
      68: long    atol();
      69: int mark();
      70: int add();
      71: int dump();
      72: int tapsrec();
      73: int dmpspc();
      74: int dsrch();
      75: int nullf();
      76: char    *getsuffix();
      77: char    *rawname();
      78:
      79: int interrupt();        /* in case operator bangs on console */
      80:
      81: #define HOUR    (60L*60L)
      82: #define DAY (24L*HOUR)
      83: #define YEAR    (365L*DAY)
      84:
      85: /*
      86:  *	Exit status codes
      87:  */
      88: #define X_FINOK     1   /* normal exit */
      89: #define X_REWRITE   2   /* restart writing from the check point */
      90: #define X_ABORT     3   /* abort all of dump; don't attempt checkpointing*/
      91:
      92: #ifdef DEBUG
      93: #define OINCREM "./ddate"       /*old format incremental info*/
      94: #define NINCREM "./dumpdates"       /*new format incremental info*/
      95: #else not DEBUG
      96: #define OINCREM "/etc/ddate"        /*old format incremental info*/
      97: #define NINCREM "/etc/dumpdates"    /*new format incremental info*/
      98: #endif
      99:
     100: #define TAPE    "/dev/rmt8"     /* default tape device */
     101: #define DISK    "/dev/rxp0a"        /* default disk */
     102: #define OPGRENT "operator"      /* group entry to notify */
     103: #define DIALUP  "ttyd"          /* prefix for dialups */
     104:
     105: /*
     106:  *	The contents of the file NINCREM is maintained both on
     107:  *	a linked list, and then (eventually) arrayified.
     108:  */
     109: struct  itime{
     110:     struct  idates  it_value;
     111:     struct  itime   *it_next;
     112: };
     113: struct  itime   *ithead;    /* head of the list version */
     114: int nidates;        /* number of records (might be zero) */
     115: int idates_in;      /* we have read the increment file */
     116: struct  idates  **idatev;   /* the arrayfied version */
     117: #define ITITERATE(i, ip) for (i = 0,ip = idatev[0]; i < nidates; i++, ip = idatev[i])
     118:
     119: /*
     120:  *	We catch these interrupts
     121:  */
     122: int sighup();
     123: int sigquit();
     124: int sigill();
     125: int sigtrap();
     126: int sigfpe();
     127: int sigkill();
     128: int sigbus();
     129: int sigsegv();
     130: int sigsys();
     131: int sigalrm();
     132: int sigterm();

#### Defined variables

asize defined in line 55; used 4 times

- in /usr/src/old/dump/dumptape.c line 81-84(3), 230

blockswritten defined in line 59; used 4 times

- in /usr/src/old/dump/dumpoptr.c line 215, 224-228(2)
- in /usr/src/old/dump/dumptape.c line 83

clrmap defined in line 32; used 4 times

- in /usr/src/old/dump/dumpmain.c line 151, 165, 188
- in /usr/src/old/dump/dumptraverse.c line 97

dadded defined in line 51; used 4 times

- in /usr/src/old/dump/dumptraverse.c line 118-120(2), 211, 226

density defined in line 52; used 3 times

- in /usr/src/old/dump/dumpmain.c line 63, 171
- in /usr/src/old/dump/dumptape.c line 81

dirmap defined in line 33; used 6 times

- in /usr/src/old/dump/dumpmain.c line 152, 162, 191
- in /usr/src/old/dump/dumptraverse.c line 99, 127, 229

disk defined in line 40; used 15 times

- in /usr/src/old/dump/dumpitime.c line 60, 93
- in /usr/src/old/dump/dumpmain.c line 22, 104, 129-135(6), 141-148(3)
- in /usr/src/old/dump/dumptraverse.c line 255-258(2)

esize defined in line 54; used 15 times

- in /usr/src/old/dump/dumpitime.c line 217-219(2), 228, 243-244(2)
- in /usr/src/old/dump/dumpmain.c line 154, 169-173(2), 183-184(3)
- in /usr/src/old/dump/dumpoptr.c line 224-228(2), 246
- in /usr/src/old/dump/dumptraverse.c line 104

etapes defined in line 56; used 4 times

- in /usr/src/old/dump/dumpmain.c line 178-179(2)
- in /usr/src/old/dump/dumpoptr.c line 245-246(2)

fi defined in line 45; used 4 times

- in /usr/src/old/dump/dumpmain.c line 146-147(2)
- in /usr/src/old/dump/dumptraverse.c line 249-252(2)

idates_in defined in line 115; used 2 times

- in /usr/src/old/dump/dumpitime.c line 27, 44

idatev defined in line 116; used 6 times

- in line 117(2)
- in /usr/src/old/dump/dumpitime.c line 49-51(2), 108
- in /usr/src/old/dump/dumpoptr.c line 290

incno defined in line 43; used 9 times

- in /usr/src/old/dump/dumpitime.c line 63, 76, 100, 113, 124
- in /usr/src/old/dump/dumpmain.c line 25, 86, 139-140(2)

increm defined in line 42; used 5 times

- in /usr/src/old/dump/dumpitime.c line 29, 63, 116-117(2)
- in /usr/src/old/dump/dumpmain.c line 23

ino defined in line 47; used 15 times

- in /usr/src/old/dump/dumptape.c line 238
- in /usr/src/old/dump/dumptraverse.c line 19-32(5), 97-102(3), 115, 121-127(3), 139, 192

ithead defined in line 113; used 4 times

- in /usr/src/old/dump/dumpitime.c line 31, 38-39(2), 50

nadded defined in line 50; used 3 times

- in /usr/src/old/dump/dumpmain.c line 161-163(2)
- in /usr/src/old/dump/dumptraverse.c line 123

newtape defined in line 49; used 3 times

- in /usr/src/old/dump/dumptape.c line 232
- in /usr/src/old/dump/dumptraverse.c line 135-136(2)

nidates defined in line 114; used 8 times

- in line 117
- in /usr/src/old/dump/dumpitime.c line 30, 37, 49-50(2), 108-110(2)
- in /usr/src/old/dump/dumpoptr.c line 290

nodmap defined in line 34; used 10 times

- in /usr/src/old/dump/dumpmain.c line 153, 166, 194
- in /usr/src/old/dump/dumptraverse.c line 102, 115, 121-126(2), 137-139(2), 225

notify defined in line 58; used 4 times

- in /usr/src/old/dump/dumpmain.c line 94
- in /usr/src/old/dump/dumpoptr.c line 98, 105, 137

nsubdir defined in line 48; used 3 times

- in /usr/src/old/dump/dumptraverse.c line 117, 125, 230

processname defined in line 62; used 1 times

- in /usr/src/old/dump/dumpitime.c line 172

tape defined in line 41; used 5 times

- in /usr/src/old/dump/dumpmain.c line 21, 55, 144
- in /usr/src/old/dump/dumptape.c line 103, 223

tapeno defined in line 60; used 10 times

- in /usr/src/old/dump/dumpoptr.c line 245
- in /usr/src/old/dump/dumptape.c line 60, 69-73(2), 114, 173, 220, 231-238(3)

to defined in line 46; used 7 times

- in /usr/src/old/dump/dumpmain.c line 203
- in /usr/src/old/dump/dumptape.c line 59, 102, 111, 150, 223-224(2)

tsize defined in line 53; used 7 times

- in /usr/src/old/dump/dumpmain.c line 20, 71-72(2), 176
- in /usr/src/old/dump/dumpoptr.c line 246-247(2)
- in /usr/src/old/dump/dumptape.c line 84

tstart_writing defined in line 61; used 2 times

- in /usr/src/old/dump/dumpmain.c line 187
- in /usr/src/old/dump/dumpoptr.c line 225

uflag defined in line 44; used 3 times

- in /usr/src/old/dump/dumpitime.c line 91
- in /usr/src/old/dump/dumpmain.c line 26, 90

#### Defined struct's

itime defined in line 109; used 12 times

- in line 111-113(4)
- in /usr/src/old/dump/dumpitime.c line 19(2), 25(2), 34(4)

v7direct defined in line 4; used 2 times

- in /usr/src/old/dump/dumptraverse.c line 209(2)

#### Defined macros

BIC defined in line 29; used 2 times

- in /usr/src/old/dump/dumptraverse.c line 127, 139

BIS defined in line 28; used 4 times

- in /usr/src/old/dump/dumptraverse.c line 97-102(3), 121

BIT defined in line 30; used 4 times

- in /usr/src/old/dump/dumptraverse.c line 115, 126, 225-229(2)

DAY defined in line 82; used 2 times

- in line 83
- in /usr/src/old/dump/dumpoptr.c line 306

DIALUP defined in line 103; used 2 times

- in /usr/src/old/dump/dumpoptr.c line 158(2)

DIRPB defined in line 10; used 2 times

- in /usr/src/old/dump/dumptraverse.c line 209-214(2)

DISK defined in line 101; used 1 times

- in /usr/src/old/dump/dumpmain.c line 22

HOUR defined in line 81; used 1 times

- in line 82

ITITERATE defined in line 117; used 4 times

- in /usr/src/old/dump/dumpitime.c line 72, 96, 120
- in /usr/src/old/dump/dumpoptr.c line 297

MBIT defined in line 27; used 3 times

- in line 28-30(3)

MWORD defined in line 26; used 3 times

- in line 28-30(3)

NI defined in line 9; used 3 times

- in /usr/src/old/dump/dumptraverse.c line 5, 20-24(2)

NINCREM defined in line 97; used 4 times

- in /usr/src/old/dump/dumpitime.c line 151, 171-172(2)
- in /usr/src/old/dump/dumpmain.c line 23

OINCREM defined in line 96; used 1 times

- in /usr/src/old/dump/dumpitime.c line 175

OPGRENT defined in line 102; used 2 times

- in /usr/src/old/dump/dumpoptr.c line 100-104(2)

TAPE defined in line 100; used 1 times

- in /usr/src/old/dump/dumpmain.c line 21

X_ABORT defined in line 90; used 7 times

- in /usr/src/old/dump/dumpitime.c line 173
- in /usr/src/old/dump/dumpmain.c line 99, 149
- in /usr/src/old/dump/dumptape.c line 161, 208-213(2), 254

X_FINOK defined in line 88; used 2 times

- in /usr/src/old/dump/dumpmain.c line 206
- in /usr/src/old/dump/dumptape.c line 206

X_REWRITE defined in line 89; used 2 times

- in /usr/src/old/dump/dumpmain.c line 223
- in /usr/src/old/dump/dumptape.c line 74

YEAR defined in line 83; never used

#### Usage of this include

dump.h used 5 times

- in /usr/src/old/dump/dumpitime.c line 2
- in /usr/src/old/dump/dumpmain.c line 2
- in /usr/src/old/dump/dumpoptr.c line 2
- in /usr/src/old/dump/dumptape.c line 2
- in /usr/src/old/dump/dumptraverse.c line 2

Last modified: 1990-06-08 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 1713 |