1*a74e29feSjoerg /* $NetBSD: fsck_vars.h,v 1.16 2020/04/03 19:36:33 joerg Exp $ */ 2369e9cadSperseant 3369e9cadSperseant /* 4369e9cadSperseant * Copyright (c) 1980, 1986, 1993 5369e9cadSperseant * The Regents of the University of California. All rights reserved. 6369e9cadSperseant * 7369e9cadSperseant * Redistribution and use in source and binary forms, with or without 8369e9cadSperseant * modification, are permitted provided that the following conditions 9369e9cadSperseant * are met: 10369e9cadSperseant * 1. Redistributions of source code must retain the above copyright 11369e9cadSperseant * notice, this list of conditions and the following disclaimer. 12369e9cadSperseant * 2. Redistributions in binary form must reproduce the above copyright 13369e9cadSperseant * notice, this list of conditions and the following disclaimer in the 14369e9cadSperseant * documentation and/or other materials provided with the distribution. 15276d62f6Sagc * 3. Neither the name of the University nor the names of its contributors 16369e9cadSperseant * may be used to endorse or promote products derived from this software 17369e9cadSperseant * without specific prior written permission. 18369e9cadSperseant * 19369e9cadSperseant * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 20369e9cadSperseant * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21369e9cadSperseant * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22369e9cadSperseant * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 23369e9cadSperseant * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24369e9cadSperseant * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25369e9cadSperseant * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26369e9cadSperseant * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27369e9cadSperseant * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28369e9cadSperseant * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29369e9cadSperseant * SUCH DAMAGE. 30369e9cadSperseant * 31369e9cadSperseant * @(#)fsck.h 8.1 (Berkeley) 6/5/93 32369e9cadSperseant */ 33369e9cadSperseant 34369e9cadSperseant extern struct dups *duplist; /* head of dup list */ 35369e9cadSperseant extern struct dups *muldup; /* end of unique duplicate dup block numbers */ 36369e9cadSperseant 37369e9cadSperseant extern struct zlncnt *zlnhead; /* head of zero link count list */ 38cb2499acSperseant extern struct zlncnt *orphead; /* head of "properly orphaned" list */ 39ba10361aSperseant extern struct lfs *fs; 40369e9cadSperseant 4175453f28Sperseant extern daddr_t idaddr; /* inode block containing ifile inode */ 42369e9cadSperseant extern long numdirs, listmax, inplast; 43369e9cadSperseant 44369e9cadSperseant extern long dev_bsize; /* computed value of DEV_BSIZE */ 45369e9cadSperseant extern long secsize; /* actual disk sector size */ 46369e9cadSperseant extern char nflag; /* assume a no response */ 47369e9cadSperseant extern char yflag; /* assume a yes response */ 48369e9cadSperseant extern int bflag; /* location of alternate super block */ 49369e9cadSperseant extern int debug; /* output debugging info */ 50369e9cadSperseant extern int exitonfail; 51369e9cadSperseant extern int preen; /* just fix normal inconsistencies */ 5268db7998Sperseant extern int quiet; /* don't report clean filesystems */ 53369e9cadSperseant extern char havesb; /* superblock has been read */ 54369e9cadSperseant extern char skipclean; /* skip clean file systems if preening */ 55369e9cadSperseant extern int fsmodified; /* 1 => write done to file system */ 56369e9cadSperseant extern int fsreadfd; /* file descriptor for reading file system */ 57369e9cadSperseant extern int fswritefd; /* file descriptor for writing file system */ 58369e9cadSperseant extern int rerun; /* rerun fsck. Only used in non-preen mode */ 59369e9cadSperseant 60369e9cadSperseant extern daddr_t maxfsblock; /* number of blocks in the file system */ 61369e9cadSperseant #ifndef VERBOSE_BLOCKMAP 62369e9cadSperseant extern char *blockmap; /* ptr to primary blk allocation map */ 63369e9cadSperseant #else 64369e9cadSperseant extern ino_t *blockmap; /* ptr to primary blk allocation map */ 65369e9cadSperseant #endif 66369e9cadSperseant extern ino_t maxino; /* number of inodes in file system */ 67369e9cadSperseant extern ino_t lastino; /* last inode in use */ 68369e9cadSperseant extern char *statemap; /* ptr to inode state table */ 69369e9cadSperseant extern char *typemap; /* ptr to inode type table */ 70369e9cadSperseant extern int16_t *lncntp; /* ptr to link count table */ 71369e9cadSperseant 72369e9cadSperseant extern ino_t lfdir; /* lost & found directory inode number */ 73e0dd0ca2Schristos extern const char *lfname; /* lost & found directory name */ 74369e9cadSperseant extern int lfmode; /* lost & found directory creation mode */ 75369e9cadSperseant 76369e9cadSperseant extern daddr_t n_blks; /* number of blocks in use */ 77a3ff3a30Sfvdl extern ino_t n_files; /* number of files in use */ 78369e9cadSperseant 7929f1062bSperseant extern int no_roll_forward; /* Don't roll forward */ 8008dc10dcSdholland 81*a74e29feSjoerg extern blkcnt_t badblkcount; /* count of "bad" blocks */ 8208dc10dcSdholland 8308dc10dcSdholland /* from setup.c */ 8408dc10dcSdholland extern SEGUSE *seg_table; 8508dc10dcSdholland extern daddr_t *din_table; 86