33c33
< * @(#)fsck.h 8.1 (Berkeley) 6/5/93
---
> * @(#)fsck.h 8.4 (Berkeley) 5/9/95
35a36,39
> #include <unistd.h>
> #include <stdlib.h>
> #include <stdio.h>
>
56,61c60,65
< struct bufarea *b_next; /* free list queue */
< struct bufarea *b_prev; /* free list queue */
< daddr_t b_bno;
< int b_size;
< int b_errs;
< int b_flags;
---
> struct bufarea *b_next; /* free list queue */
> struct bufarea *b_prev; /* free list queue */
> ufs_daddr_t b_bno;
> int b_size;
> int b_errs;
> int b_flags;
63,67c67,71
< char *b_buf; /* buffer space */
< daddr_t *b_indir; /* indirect block */
< struct fs *b_fs; /* super block */
< struct cg *b_cg; /* cylinder group */
< struct dinode *b_dinode; /* inode block */
---
> char *b_buf; /* buffer space */
> ufs_daddr_t *b_indir; /* indirect block */
> struct fs *b_fs; /* super block */
> struct cg *b_cg; /* cylinder group */
> struct dinode *b_dinode; /* inode block */
69c73
< char b_dirty;
---
> char b_dirty;
80d83
< struct bufarea *getdatablk();
85c88
< (bp)->b_bno = (daddr_t)-1; \
---
> (bp)->b_bno = (ufs_daddr_t)-1; \
100c103
< daddr_t id_blkno; /* current block number being examined */
---
> ufs_daddr_t id_blkno; /* current block number being examined */
136c139
< daddr_t dup;
---
> ufs_daddr_t dup;
160c163
< daddr_t i_blks[1]; /* actually longer */
---
> ufs_daddr_t i_blks[1]; /* actually longer */
185c188
< daddr_t maxfsblock; /* number of blocks in the file system */
---
> ufs_daddr_t maxfsblock; /* number of blocks in the file system */
190c193
< unsigned char *typemap; /* ptr to inode type table */
---
> u_char *typemap; /* ptr to inode type table */
197,198c200,201
< daddr_t n_blks; /* number of blocks in use */
< daddr_t n_files; /* number of files in use */
---
> ufs_daddr_t n_blks; /* number of blocks in use */
> ufs_daddr_t n_files; /* number of files in use */
213,222c216
< /* dir.c */
< void adjust __P((struct inodesc *idesc, short lcnt));
< ino_t allocdir __P((ino_t parent, ino_t request, int mode));
< int changeino __P((ino_t dir, char *name, ino_t newnum));
< void direrror __P((ino_t ino, char *errmesg));
< int dirscan __P((struct inodesc *idesc));
< void fileerror __P((ino_t cwd, ino_t ino, char *errmesg));
< int linkup __P((ino_t orphan, ino_t parentdir));
< int makeentry __P((ino_t parent, ino_t ino, char *name));
< void propagate __P((void));
---
> #define EEXIT 8 /* Standard error exit. */
224,225c218
< /* ffs_subr.c */
< void ffs_fragacct __P((struct fs *fs, int fragmap, long *fraglist, int cnt));
---
> struct fstab;
227,293c220,281
< /* inode.c */
< ino_t allocino __P((ino_t request, int type));
< void blkerror __P((ino_t ino, char *type, daddr_t blk));
< void cacheino __P((struct dinode *dp, ino_t inumber));
< int chkrange __P((daddr_t blk, int cnt));
< int ckinode __P((struct dinode *dp, struct inodesc *idesc));
< void clri __P((struct inodesc *idesc, char *type, int flag));
< int findino __P((struct inodesc *idesc));
< void freeino __P((ino_t ino));
< void freeinodebuf __P((void));
< struct dinode * ginode __P((ino_t inumber));
< struct inoinfo * getinoinfo __P((ino_t inumber));
< struct dinode * getnextinode __P((ino_t inumber));
< void inodirty __P((void));
< void inocleanup __P((void));
< void pinode __P((ino_t ino));
< void resetinodebuf __P((void));
< int findname __P((struct inodesc *idesc));
<
< /* pass1.c */
< void pass1 __P((void));
< int pass1check __P((struct inodesc *idesc));
<
< /* pass1b.c */
< void pass1b __P((void));
<
< /* pass2.c */
< void pass2 __P((void));
<
< /* pass3.c */
< void pass3 __P((void));
<
< /* pass4.c */
< void pass4 __P((void));
< int pass4check __P((struct inodesc *idesc));
<
< /* pass5.c */
< void pass5 __P((void));
<
< /* preen.c */
< char *blockcheck __P((char *name));
< int checkfstab __P((int preen, int maxrun,int (*docheck)(), int (*chkit)()));
<
< /* setup.c */
< int setup __P((char *dev));
<
< /* utilities.c */
< int allocblk __P((long frags));
< int bread __P((int fd, char *buf, daddr_t blk, long size));
< void bufinit __P((void));
< void bwrite __P((int fd, char *buf, daddr_t blk, long size));
< void catch __P((int));
< void catchquit __P((int));
< void ckfini __P((void));
< int dofix __P((struct inodesc *idesc, char *msg));
< void errexit __P((const char *s1, ...)) __dead2;
< void flush __P((int fd, struct bufarea *bp));
< void freeblk __P((daddr_t blkno, long frags));
< int ftypeok __P((struct dinode *dp));
< void getblk __P((struct bufarea *bp, daddr_t blk, long size));
< struct bufarea * getdatablk __P((daddr_t blkno, long size));
< void getpathname __P((char *namebuf, ino_t curdir, ino_t ino));
< void panic __P((const char *, ...)) __dead2;
< void pfatal __P((const char *s1, ...));
< void pwarn __P((const char *s1, ...));
< int reply __P((char *question));
< void voidquit __P((int));
---
> void adjust __P((struct inodesc *, int lcnt));
> ufs_daddr_t allocblk __P((long frags));
> ino_t allocdir __P((ino_t parent, ino_t request, int mode));
> ino_t allocino __P((ino_t request, int type));
> void blkerror __P((ino_t ino, char *type, ufs_daddr_t blk));
> char *blockcheck __P((char *name));
> int bread __P((int fd, char *buf, ufs_daddr_t blk, long size));
> void bufinit __P((void));
> void bwrite __P((int fd, char *buf, ufs_daddr_t blk, long size));
> void cacheino __P((struct dinode *dp, ino_t inumber));
> void catch __P((int));
> void catchquit __P((int));
> int changeino __P((ino_t dir, char *name, ino_t newnum));
> int checkfstab __P((int preen, int maxrun,
> int (*docheck)(struct fstab *),
> int (*chkit)(char *, char *, long, int)));
> int chkrange __P((ufs_daddr_t blk, int cnt));
> void ckfini __P((int markclean));
> int ckinode __P((struct dinode *dp, struct inodesc *));
> void clri __P((struct inodesc *, char *type, int flag));
> void direrror __P((ino_t ino, char *errmesg));
> int dirscan __P((struct inodesc *));
> int dofix __P((struct inodesc *, char *msg));
> void ffs_clrblock __P((struct fs *, u_char *, ufs_daddr_t));
> void ffs_fragacct __P((struct fs *, int, int32_t [], int));
> int ffs_isblock __P((struct fs *, u_char *, ufs_daddr_t));
> void ffs_setblock __P((struct fs *, u_char *, ufs_daddr_t));
> void fileerror __P((ino_t cwd, ino_t ino, char *errmesg));
> int findino __P((struct inodesc *));
> int findname __P((struct inodesc *));
> void flush __P((int fd, struct bufarea *bp));
> void freeblk __P((ufs_daddr_t blkno, long frags));
> void freeino __P((ino_t ino));
> void freeinodebuf __P((void));
> int ftypeok __P((struct dinode *dp));
> void getblk __P((struct bufarea *bp, ufs_daddr_t blk, long size));
> struct bufarea *getdatablk __P((ufs_daddr_t blkno, long size));
> struct inoinfo *getinoinfo __P((ino_t inumber));
> struct dinode *getnextinode __P((ino_t inumber));
> void getpathname __P((char *namebuf, ino_t curdir, ino_t ino));
> struct dinode *ginode __P((ino_t inumber));
> void inocleanup __P((void));
> void inodirty __P((void));
> int linkup __P((ino_t orphan, ino_t parentdir));
> int makeentry __P((ino_t parent, ino_t ino, char *name));
> void panic __P((const char *fmt, ...));
> void pass1 __P((void));
> void pass1b __P((void));
> int pass1check __P((struct inodesc *));
> void pass2 __P((void));
> void pass3 __P((void));
> void pass4 __P((void));
> int pass4check __P((struct inodesc *));
> void pass5 __P((void));
> void pfatal __P((const char *fmt, ...));
> void pinode __P((ino_t ino));
> void propagate __P((void));
> void pwarn __P((const char *fmt, ...));
> int reply __P((char *question));
> void resetinodebuf __P((void));
> int setup __P((char *dev));
> void voidquit __P((int));
< * @(#)fsck.h 8.1 (Berkeley) 6/5/93
---
> * @(#)fsck.h 8.4 (Berkeley) 5/9/95
35a36,39
> #include <unistd.h>
> #include <stdlib.h>
> #include <stdio.h>
>
56,61c60,65
< struct bufarea *b_next; /* free list queue */
< struct bufarea *b_prev; /* free list queue */
< daddr_t b_bno;
< int b_size;
< int b_errs;
< int b_flags;
---
> struct bufarea *b_next; /* free list queue */
> struct bufarea *b_prev; /* free list queue */
> ufs_daddr_t b_bno;
> int b_size;
> int b_errs;
> int b_flags;
63,67c67,71
< char *b_buf; /* buffer space */
< daddr_t *b_indir; /* indirect block */
< struct fs *b_fs; /* super block */
< struct cg *b_cg; /* cylinder group */
< struct dinode *b_dinode; /* inode block */
---
> char *b_buf; /* buffer space */
> ufs_daddr_t *b_indir; /* indirect block */
> struct fs *b_fs; /* super block */
> struct cg *b_cg; /* cylinder group */
> struct dinode *b_dinode; /* inode block */
69c73
< char b_dirty;
---
> char b_dirty;
80d83
< struct bufarea *getdatablk();
85c88
< (bp)->b_bno = (daddr_t)-1; \
---
> (bp)->b_bno = (ufs_daddr_t)-1; \
100c103
< daddr_t id_blkno; /* current block number being examined */
---
> ufs_daddr_t id_blkno; /* current block number being examined */
136c139
< daddr_t dup;
---
> ufs_daddr_t dup;
160c163
< daddr_t i_blks[1]; /* actually longer */
---
> ufs_daddr_t i_blks[1]; /* actually longer */
185c188
< daddr_t maxfsblock; /* number of blocks in the file system */
---
> ufs_daddr_t maxfsblock; /* number of blocks in the file system */
190c193
< unsigned char *typemap; /* ptr to inode type table */
---
> u_char *typemap; /* ptr to inode type table */
197,198c200,201
< daddr_t n_blks; /* number of blocks in use */
< daddr_t n_files; /* number of files in use */
---
> ufs_daddr_t n_blks; /* number of blocks in use */
> ufs_daddr_t n_files; /* number of files in use */
213,222c216
< /* dir.c */
< void adjust __P((struct inodesc *idesc, short lcnt));
< ino_t allocdir __P((ino_t parent, ino_t request, int mode));
< int changeino __P((ino_t dir, char *name, ino_t newnum));
< void direrror __P((ino_t ino, char *errmesg));
< int dirscan __P((struct inodesc *idesc));
< void fileerror __P((ino_t cwd, ino_t ino, char *errmesg));
< int linkup __P((ino_t orphan, ino_t parentdir));
< int makeentry __P((ino_t parent, ino_t ino, char *name));
< void propagate __P((void));
---
> #define EEXIT 8 /* Standard error exit. */
224,225c218
< /* ffs_subr.c */
< void ffs_fragacct __P((struct fs *fs, int fragmap, long *fraglist, int cnt));
---
> struct fstab;
227,293c220,281
< /* inode.c */
< ino_t allocino __P((ino_t request, int type));
< void blkerror __P((ino_t ino, char *type, daddr_t blk));
< void cacheino __P((struct dinode *dp, ino_t inumber));
< int chkrange __P((daddr_t blk, int cnt));
< int ckinode __P((struct dinode *dp, struct inodesc *idesc));
< void clri __P((struct inodesc *idesc, char *type, int flag));
< int findino __P((struct inodesc *idesc));
< void freeino __P((ino_t ino));
< void freeinodebuf __P((void));
< struct dinode * ginode __P((ino_t inumber));
< struct inoinfo * getinoinfo __P((ino_t inumber));
< struct dinode * getnextinode __P((ino_t inumber));
< void inodirty __P((void));
< void inocleanup __P((void));
< void pinode __P((ino_t ino));
< void resetinodebuf __P((void));
< int findname __P((struct inodesc *idesc));
<
< /* pass1.c */
< void pass1 __P((void));
< int pass1check __P((struct inodesc *idesc));
<
< /* pass1b.c */
< void pass1b __P((void));
<
< /* pass2.c */
< void pass2 __P((void));
<
< /* pass3.c */
< void pass3 __P((void));
<
< /* pass4.c */
< void pass4 __P((void));
< int pass4check __P((struct inodesc *idesc));
<
< /* pass5.c */
< void pass5 __P((void));
<
< /* preen.c */
< char *blockcheck __P((char *name));
< int checkfstab __P((int preen, int maxrun,int (*docheck)(), int (*chkit)()));
<
< /* setup.c */
< int setup __P((char *dev));
<
< /* utilities.c */
< int allocblk __P((long frags));
< int bread __P((int fd, char *buf, daddr_t blk, long size));
< void bufinit __P((void));
< void bwrite __P((int fd, char *buf, daddr_t blk, long size));
< void catch __P((int));
< void catchquit __P((int));
< void ckfini __P((void));
< int dofix __P((struct inodesc *idesc, char *msg));
< void errexit __P((const char *s1, ...)) __dead2;
< void flush __P((int fd, struct bufarea *bp));
< void freeblk __P((daddr_t blkno, long frags));
< int ftypeok __P((struct dinode *dp));
< void getblk __P((struct bufarea *bp, daddr_t blk, long size));
< struct bufarea * getdatablk __P((daddr_t blkno, long size));
< void getpathname __P((char *namebuf, ino_t curdir, ino_t ino));
< void panic __P((const char *, ...)) __dead2;
< void pfatal __P((const char *s1, ...));
< void pwarn __P((const char *s1, ...));
< int reply __P((char *question));
< void voidquit __P((int));
---
> void adjust __P((struct inodesc *, int lcnt));
> ufs_daddr_t allocblk __P((long frags));
> ino_t allocdir __P((ino_t parent, ino_t request, int mode));
> ino_t allocino __P((ino_t request, int type));
> void blkerror __P((ino_t ino, char *type, ufs_daddr_t blk));
> char *blockcheck __P((char *name));
> int bread __P((int fd, char *buf, ufs_daddr_t blk, long size));
> void bufinit __P((void));
> void bwrite __P((int fd, char *buf, ufs_daddr_t blk, long size));
> void cacheino __P((struct dinode *dp, ino_t inumber));
> void catch __P((int));
> void catchquit __P((int));
> int changeino __P((ino_t dir, char *name, ino_t newnum));
> int checkfstab __P((int preen, int maxrun,
> int (*docheck)(struct fstab *),
> int (*chkit)(char *, char *, long, int)));
> int chkrange __P((ufs_daddr_t blk, int cnt));
> void ckfini __P((int markclean));
> int ckinode __P((struct dinode *dp, struct inodesc *));
> void clri __P((struct inodesc *, char *type, int flag));
> void direrror __P((ino_t ino, char *errmesg));
> int dirscan __P((struct inodesc *));
> int dofix __P((struct inodesc *, char *msg));
> void ffs_clrblock __P((struct fs *, u_char *, ufs_daddr_t));
> void ffs_fragacct __P((struct fs *, int, int32_t [], int));
> int ffs_isblock __P((struct fs *, u_char *, ufs_daddr_t));
> void ffs_setblock __P((struct fs *, u_char *, ufs_daddr_t));
> void fileerror __P((ino_t cwd, ino_t ino, char *errmesg));
> int findino __P((struct inodesc *));
> int findname __P((struct inodesc *));
> void flush __P((int fd, struct bufarea *bp));
> void freeblk __P((ufs_daddr_t blkno, long frags));
> void freeino __P((ino_t ino));
> void freeinodebuf __P((void));
> int ftypeok __P((struct dinode *dp));
> void getblk __P((struct bufarea *bp, ufs_daddr_t blk, long size));
> struct bufarea *getdatablk __P((ufs_daddr_t blkno, long size));
> struct inoinfo *getinoinfo __P((ino_t inumber));
> struct dinode *getnextinode __P((ino_t inumber));
> void getpathname __P((char *namebuf, ino_t curdir, ino_t ino));
> struct dinode *ginode __P((ino_t inumber));
> void inocleanup __P((void));
> void inodirty __P((void));
> int linkup __P((ino_t orphan, ino_t parentdir));
> int makeentry __P((ino_t parent, ino_t ino, char *name));
> void panic __P((const char *fmt, ...));
> void pass1 __P((void));
> void pass1b __P((void));
> int pass1check __P((struct inodesc *));
> void pass2 __P((void));
> void pass3 __P((void));
> void pass4 __P((void));
> int pass4check __P((struct inodesc *));
> void pass5 __P((void));
> void pfatal __P((const char *fmt, ...));
> void pinode __P((ino_t ino));
> void propagate __P((void));
> void pwarn __P((const char *fmt, ...));
> int reply __P((char *question));
> void resetinodebuf __P((void));
> int setup __P((char *dev));
> void voidquit __P((int));