NetBSD/sbin/fsck_lfs/vars.c

69 lines
2.9 KiB
C
Raw Normal View History

2001-02-05 00:52:02 +03:00
/* $NetBSD: vars.c,v 1.5 2001/02/04 21:52:04 christos Exp $ */
1999-07-03 23:55:03 +04:00
#include <sys/param.h>
#include <sys/time.h>
#include <ufs/ufs/dinode.h>
#include <ufs/ufs/dir.h>
2000-05-23 05:48:52 +04:00
#include <sys/mount.h> /* XXX */
#include <ufs/lfs/lfs.h>
#include "fsck.h"
/* variables previously of file scope (from fsck.h) */
2000-05-23 05:48:52 +04:00
struct bufarea bufhead; /* head of list of other blks in filesys */
struct bufarea sblk; /* file system superblock */
struct bufarea iblk; /* ifile on-disk inode block */
struct bufarea *pdirbp; /* current directory contents */
struct bufarea *pbp; /* current inode block */
2000-05-23 05:48:52 +04:00
int iinooff; /* ifile inode offset in block of inodes */
2000-05-23 05:48:52 +04:00
struct dups *duplist; /* head of dup list */
struct dups *muldup; /* end of unique duplicate dup block numbers */
2000-05-23 05:48:52 +04:00
struct zlncnt *zlnhead; /* head of zero link count list */
daddr_t idaddr; /* inode block containing ifile inode */
2000-05-23 05:48:52 +04:00
long numdirs, listmax, inplast;
2000-05-23 05:48:52 +04:00
long dev_bsize; /* computed value of DEV_BSIZE */
long secsize; /* actual disk sector size */
char nflag; /* assume a no response */
char yflag; /* assume a yes response */
int bflag; /* location of alternate super block */
int debug; /* output debugging info */
#ifdef DEBUG_IFILE
2000-05-23 05:48:52 +04:00
int debug_ifile; /* cat the ifile and exit */
#endif
2000-05-23 05:48:52 +04:00
int cvtlevel; /* convert to newer file system format */
int doinglevel1; /* converting to new cylinder group format */
int doinglevel2; /* converting to new inode format */
int exitonfail;
int newinofmt; /* filesystem has new inode format */
int preen; /* just fix normal inconsistencies */
char havesb; /* superblock has been read */
char skipclean; /* skip clean file systems if preening */
int fsmodified; /* 1 => write done to file system */
int fsreadfd; /* file descriptor for reading file system */
int fswritefd; /* file descriptor for writing file system */
int rerun; /* rerun fsck. Only used in non-preen mode */
2000-05-23 05:48:52 +04:00
daddr_t maxfsblock; /* number of blocks in the file system */
#ifndef VERBOSE_BLOCKMAP
2000-05-23 05:48:52 +04:00
char *blockmap; /* ptr to primary blk allocation map */
#else
2000-05-23 05:48:52 +04:00
ino_t *blockmap;
#endif
2000-05-23 05:48:52 +04:00
ino_t maxino; /* number of inodes in file system */
ino_t lastino; /* last inode in use */
char *statemap; /* ptr to inode state table */
char *typemap; /* ptr to inode type table */
int16_t *lncntp; /* ptr to link count table */
2000-05-23 05:48:52 +04:00
ino_t lfdir; /* lost & found directory inode number */
char *lfname; /* lost & found directory name */
int lfmode; /* lost & found directory creation mode */
2000-05-23 05:48:52 +04:00
daddr_t n_blks; /* number of blocks in use */
daddr_t n_files; /* number of files in use */
2000-05-23 05:48:52 +04:00
struct dinode zino;