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