Home | History | Annotate | Line # | Download | only in fsck_lfs
vars.c revision 1.3
      1 /* $NetBSD: vars.c,v 1.3 2000/05/23 01:48:56 perseant Exp $	 */
      2 
      3 #include <sys/param.h>
      4 #include <sys/time.h>
      5 #include <ufs/ufs/dinode.h>
      6 #include <ufs/ufs/dir.h>
      7 #include <sys/mount.h>		/* XXX */
      8 #include <ufs/lfs/lfs.h>
      9 #include "fsck.h"
     10 
     11 /* variables previously of file scope (from fsck.h) */
     12 struct bufarea  bufhead;	/* head of list of other blks in filesys */
     13 struct bufarea  sblk;		/* file system superblock */
     14 struct bufarea  iblk;		/* ifile on-disk inode block */
     15 struct bufarea *pdirbp;		/* current directory contents */
     16 struct bufarea *pbp;		/* current inode block */
     17 struct bufarea *getdatablk(daddr_t, long);
     18 int             iinooff;	/* ifile inode offset in block of inodes */
     19 
     20 struct dups    *duplist;	/* head of dup list */
     21 struct dups    *muldup;		/* end of unique duplicate dup block numbers */
     22 
     23 struct zlncnt  *zlnhead;	/* head of zero link count list */
     24 
     25 long            numdirs, listmax, inplast;
     26 
     27 long            dev_bsize;	/* computed value of DEV_BSIZE */
     28 long            secsize;	/* actual disk sector size */
     29 char            nflag;		/* assume a no response */
     30 char            yflag;		/* assume a yes response */
     31 int             bflag;		/* location of alternate super block */
     32 int             debug;		/* output debugging info */
     33 #ifdef DEBUG_IFILE
     34 int             debug_ifile;	/* cat the ifile and exit */
     35 #endif
     36 int             cvtlevel;	/* convert to newer file system format */
     37 int             doinglevel1;	/* converting to new cylinder group format */
     38 int             doinglevel2;	/* converting to new inode format */
     39 int             exitonfail;
     40 int             newinofmt;	/* filesystem has new inode format */
     41 int             preen;		/* just fix normal inconsistencies */
     42 char            havesb;		/* superblock has been read */
     43 char            skipclean;	/* skip clean file systems if preening */
     44 int             fsmodified;	/* 1 => write done to file system */
     45 int             fsreadfd;	/* file descriptor for reading file system */
     46 int             fswritefd;	/* file descriptor for writing file system */
     47 int             rerun;		/* rerun fsck.  Only used in non-preen mode */
     48 
     49 daddr_t         maxfsblock;	/* number of blocks in the file system */
     50 #ifndef VERBOSE_BLOCKMAP
     51 char           *blockmap;	/* ptr to primary blk allocation map */
     52 #else
     53 ino_t          *blockmap;
     54 #endif
     55 ino_t           maxino;		/* number of inodes in file system */
     56 ino_t           lastino;	/* last inode in use */
     57 char           *statemap;	/* ptr to inode state table */
     58 char           *typemap;	/* ptr to inode type table */
     59 int16_t        *lncntp;		/* ptr to link count table */
     60 
     61 ino_t           lfdir;		/* lost & found directory inode number */
     62 char           *lfname;		/* lost & found directory name */
     63 int             lfmode;		/* lost & found directory creation mode */
     64 
     65 daddr_t         n_blks;		/* number of blocks in use */
     66 daddr_t         n_files;	/* number of files in use */
     67 
     68 struct dinode   zino;
     69