xref: /netbsd-src/sbin/fsck_ffs/extern.h (revision d710132b4b8ce7f7cccaaf660cb16aa16b4077a0)
1 /*	$NetBSD: extern.h,v 1.17 2003/04/06 17:23:25 fvdl Exp $	*/
2 
3 /*
4  * Copyright (c) 1994 James A. Jegers
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions
9  * are met:
10  * 1. Redistributions of source code must retain the above copyright
11  *    notice, this list of conditions and the following disclaimer.
12  * 2. The name of the author may not be used to endorse or promote products
13  *    derived from this software without specific prior written permission
14  *
15  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25  */
26 
27 void		adjust __P((struct inodesc *, int));
28 daddr_t		allocblk __P((long));
29 ino_t		allocdir __P((ino_t, ino_t, int));
30 ino_t		allocino __P((ino_t request, int type));
31 void		blkerror __P((ino_t, char *, daddr_t));
32 int		bread __P((int, char *, daddr_t, long));
33 void		bufinit __P((void));
34 void		bwrite __P((int, char *, daddr_t, long));
35 void		cacheino __P((union dinode *, ino_t));
36 void		catch __P((int));
37 void		catchquit __P((int));
38 int		changeino __P((ino_t, char *, ino_t));
39 int		chkrange __P((daddr_t, int));
40 void		ckfini __P((void));
41 int		ckinode __P((union dinode *, struct inodesc *));
42 int		clearentry __P((struct inodesc *));
43 void		clri __P((struct inodesc *, char *, int));
44 int		cmpsblks __P((const struct fs *, struct fs *));
45 union		dinode * getnextinode __P((ino_t));
46 void		direrror __P((ino_t, char *));
47 int		dirscan __P((struct inodesc *));
48 int		dofix __P((struct inodesc *, char *));
49 void		fileerror __P((ino_t, ino_t, char *));
50 int		findino __P((struct inodesc *));
51 int		findname __P((struct inodesc *));
52 void		flush __P((int, struct bufarea *));
53 void		freeblk __P((daddr_t, long));
54 void		freeino __P((ino_t));
55 void		freeinodebuf __P((void));
56 int		ftypeok __P((union dinode *));
57 void		getblk __P((struct bufarea *, daddr_t, long));
58 struct bufarea *getdatablk __P((daddr_t, long));
59 struct inoinfo *getinoinfo __P((ino_t));
60 union dinode  *ginode __P((ino_t));
61 void		getpathname __P((char *, ino_t, ino_t));
62 void		infohandler __P((int sig));
63 void		inocleanup __P((void));
64 void		inodirty __P((void));
65 struct inostat *inoinfo __P((ino_t));
66 int		linkup __P((ino_t, ino_t, char *));
67 int		makeentry __P((ino_t, ino_t, char *));
68 void		pass1 __P((void));
69 void		pass1b __P((void));
70 int		pass1check __P((struct inodesc *));
71 void		pass2 __P((void));
72 void		pass3 __P((void));
73 void		pass4 __P((void));
74 int		pass4check __P((struct inodesc *));
75 void		pass5 __P((void));
76 void		pinode __P((ino_t));
77 void		propagate __P((ino_t));
78 int		reply __P((char *));
79 void		setinodebuf __P((ino_t));
80 int		setup __P((const char *));
81 void		voidquit __P((int));
82 
83 void	swap_cg __P((struct cg *, struct cg *));
84 void copyback_cg __P((struct bufarea *));
85 void sb_oldfscompat_write(struct fs *);
86