# 2.11BSD#431 - /usr/src/sbin/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
    lastlevel         X
    nadded            X
    newtape           X
    nidates           X
    nodmap            X
    nonodump          X
    notify            X
    nsubdir           X
    pipeout           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
    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

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

#### Defined variables

asize defined in line 52; used 4 times

- in /usr/src/sbin/dump/dumptape.c line 110, 141-143(2), 289

blockswritten defined in line 56; used 4 times

- in /usr/src/sbin/dump/dumpoptr.c line 219, 228-232(2)
- in /usr/src/sbin/dump/dumptape.c line 142

clrmap defined in line 26; used 5 times

- in /usr/src/sbin/dump/dumpmain.c line 225(2), 243, 296
- in /usr/src/sbin/dump/dumptraverse.c line 102

dadded defined in line 48; used 4 times

- in /usr/src/sbin/dump/dumptraverse.c line 122-124(2), 214, 238

density defined in line 49; used 9 times

- in /usr/src/sbin/dump/dumpmain.c line 22, 59, 157-158(2), 262, 271-275(2)
- in /usr/src/sbin/dump/dumptape.c line 60(2)

dirmap defined in line 27; used 8 times

- in /usr/src/sbin/dump/dumpmain.c line 226-228(3), 240, 299
- in /usr/src/sbin/dump/dumptraverse.c line 104, 131, 241

disk defined in line 34; used 15 times

- in /usr/src/sbin/dump/dumpitime.c line 58, 93
- in /usr/src/sbin/dump/dumpmain.c line 126, 197-203(6), 212, 220-222(2)
- in /usr/src/sbin/dump/dumptape.c line 415
- in /usr/src/sbin/dump/dumptraverse.c line 267-270(2)

esize defined in line 51; used 19 times

- in /usr/src/sbin/dump/dumpitime.c line 180-182(2), 191, 206-207(2)
- in /usr/src/sbin/dump/dumpmain.c line 230, 247-253(3), 260-264(2), 273-277(2), 285-289(3)
- in /usr/src/sbin/dump/dumpoptr.c line 228-232(2)
- in /usr/src/sbin/dump/dumptraverse.c line 108

etapes defined in line 53; used 4 times

- in /usr/src/sbin/dump/dumpmain.c line 282-287(4)

fi defined in line 39; used 6 times

- in /usr/src/sbin/dump/dumpmain.c line 220-221(2)
- in /usr/src/sbin/dump/dumptape.c line 414-415(2)
- in /usr/src/sbin/dump/dumptraverse.c line 261-264(2)

idates_in defined in line 110; used 2 times

- in /usr/src/sbin/dump/dumpitime.c line 25, 42

idatev defined in line 111; used 6 times

- in line 112(2)
- in /usr/src/sbin/dump/dumpitime.c line 47-49(2), 108
- in /usr/src/sbin/dump/dumpoptr.c line 278

incno defined in line 37; used 9 times

- in /usr/src/sbin/dump/dumpitime.c line 61, 75, 100, 113, 124
- in /usr/src/sbin/dump/dumpmain.c line 28, 101, 208, 232

increm defined in line 36; used 5 times

- in /usr/src/sbin/dump/dumpitime.c line 27, 61, 116-117(2)
- in /usr/src/sbin/dump/dumpmain.c line 27

ino defined in line 42; used 16 times

- in /usr/src/sbin/dump/dumptape.c line 297
- in /usr/src/sbin/dump/dumptraverse.c line 22-35(5), 102-106(3), 119, 125-131(3), 143, 196, 225

ithead defined in line 108; used 4 times

- in /usr/src/sbin/dump/dumpitime.c line 29, 36-37(2), 48

lastlevel defined in line 43; used 4 times

- in /usr/src/sbin/dump/dumpitime.c line 64, 80
- in /usr/src/sbin/dump/dumpmain.c line 78, 210

nadded defined in line 47; used 3 times

- in /usr/src/sbin/dump/dumpmain.c line 239-241(2)
- in /usr/src/sbin/dump/dumptraverse.c line 127

newtape defined in line 46; used 3 times

- in /usr/src/sbin/dump/dumptape.c line 291
- in /usr/src/sbin/dump/dumptraverse.c line 139-140(2)

nidates defined in line 109; used 8 times

- in line 112
- in /usr/src/sbin/dump/dumpitime.c line 28, 35, 47-48(2), 108-110(2)
- in /usr/src/sbin/dump/dumpoptr.c line 278

nodmap defined in line 28; used 11 times

- in /usr/src/sbin/dump/dumpmain.c line 227(2), 244, 302
- in /usr/src/sbin/dump/dumptraverse.c line 106, 119, 125-130(2), 141-143(2), 237

nonodump defined in line 44; used 2 times

- in /usr/src/sbin/dump/dumpmain.c line 232
- in /usr/src/sbin/dump/dumptraverse.c line 92

notify defined in line 55; used 4 times

- in /usr/src/sbin/dump/dumpmain.c line 109
- in /usr/src/sbin/dump/dumpoptr.c line 102, 109, 141

nsubdir defined in line 45; used 3 times

- in /usr/src/sbin/dump/dumptraverse.c line 121, 129, 242

pipeout defined in line 41; used 8 times

- in /usr/src/sbin/dump/dumpmain.c line 141, 246, 371
- in /usr/src/sbin/dump/dumptape.c line 104, 143, 154, 276-279(2)

tape defined in line 35; used 18 times

- in /usr/src/sbin/dump/dumpmain.c line 26, 54, 140-142(2), 163-166(4), 216-218(2)
- in /usr/src/sbin/dump/dumptape.c line 105, 159-163(2), 170, 275-282(4)

tapeno defined in line 57; used 7 times

- in /usr/src/sbin/dump/dumptape.c line 110, 179, 229, 272, 290-297(3)

to defined in line 40; used 5 times

- in /usr/src/sbin/dump/dumptape.c line 169, 275-278(2), 440-442(2)

tsize defined in line 50; used 7 times

- in /usr/src/sbin/dump/dumpmain.c line 25, 64, 159-160(2), 267, 280
- in /usr/src/sbin/dump/dumptape.c line 143

tstart_writing defined in line 58; used 2 times

- in /usr/src/sbin/dump/dumpmain.c line 295
- in /usr/src/sbin/dump/dumpoptr.c line 229

uflag defined in line 38; used 3 times

- in /usr/src/sbin/dump/dumpitime.c line 91
- in /usr/src/sbin/dump/dumpmain.c line 105, 135

#### Defined struct's

itime defined in line 104; used 10 times

- in line 106-108(4)
- in /usr/src/sbin/dump/dumpitime.c line 23(2), 32(4)

#### Defined macros

BIC defined in line 23; used 2 times

- in /usr/src/sbin/dump/dumptraverse.c line 131, 143

BIS defined in line 22; used 4 times

- in /usr/src/sbin/dump/dumptraverse.c line 102-106(3), 125

BIT defined in line 24; used 4 times

- in /usr/src/sbin/dump/dumptraverse.c line 119, 130, 237-241(2)

DAY defined in line 77; used 2 times

- in line 78
- in /usr/src/sbin/dump/dumpoptr.c line 294

DIALUP defined in line 98; used 2 times

- in /usr/src/sbin/dump/dumpoptr.c line 162(2)

DISK defined in line 96; never used
HOUR defined in line 76; used 1 times

- in line 77

ITITERATE defined in line 112; used 4 times

- in /usr/src/sbin/dump/dumpitime.c line 71, 96, 120
- in /usr/src/sbin/dump/dumpoptr.c line 285

MBIT defined in line 21; used 3 times

- in line 22-24(3)

MWORD defined in line 20; used 3 times

- in line 22-24(3)

NI defined in line 4; used 3 times

- in /usr/src/sbin/dump/dumptraverse.c line 8, 23-27(2)

NINCREM defined in line 92; used 2 times

- in /usr/src/sbin/dump/dumpitime.c line 151
- in /usr/src/sbin/dump/dumpmain.c line 27

OINCREM defined in line 91; never used
OPGRENT defined in line 97; used 2 times

- in /usr/src/sbin/dump/dumpoptr.c line 104-108(2)

TAPE defined in line 95; used 1 times

- in /usr/src/sbin/dump/dumpmain.c line 26

X_ABORT defined in line 85; used 15 times

- in /usr/src/sbin/dump/dumpmain.c line 32, 75, 119-124(2), 133-138(2), 169-172(2), 223, 346, 358
- in /usr/src/sbin/dump/dumptape.c line 217, 260-265(2), 309

X_FINOK defined in line 83; used 3 times

- in /usr/src/sbin/dump/dumpmain.c line 313
- in /usr/src/sbin/dump/dumptape.c line 258, 379

X_REWRITE defined in line 84; used 2 times

- in /usr/src/sbin/dump/dumpmain.c line 379
- in /usr/src/sbin/dump/dumptape.c line 120

YEAR defined in line 78; never used

#### Usage of this include

dump.h used 5 times

- in /usr/src/sbin/dump/dumpitime.c line 5
- in /usr/src/sbin/dump/dumpmain.c line 5
- in /usr/src/sbin/dump/dumpoptr.c line 5
- in /usr/src/sbin/dump/dumptape.c line 12
- in /usr/src/sbin/dump/dumptraverse.c line 5

Last modified: 1994-12-07 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 1087 |