xref: /minix3/sbin/fsck_ext2fs/extern.h (revision 84d9c625bfea59e274550651111ae9edfdc40fbd)
1*84d9c625SLionel Sambuc /*	$NetBSD: extern.h,v 1.8 2012/11/25 19:42:14 jakllsch Exp $	*/
294715d8eSBen Gras 
394715d8eSBen Gras /*
494715d8eSBen Gras  * Copyright (c) 1997 Manuel Bouyer.
594715d8eSBen Gras  * Copyright (c) 1994 James A. Jegers
694715d8eSBen Gras  * All rights reserved.
794715d8eSBen Gras  *
894715d8eSBen Gras  * Redistribution and use in source and binary forms, with or without
994715d8eSBen Gras  * modification, are permitted provided that the following conditions
1094715d8eSBen Gras  * are met:
1194715d8eSBen Gras  * 1. Redistributions of source code must retain the above copyright
1294715d8eSBen Gras  *    notice, this list of conditions and the following disclaimer.
1394715d8eSBen Gras  * 2. The name of the author may not be used to endorse or promote products
1494715d8eSBen Gras  *    derived from this software without specific prior written permission
1594715d8eSBen Gras  *
1694715d8eSBen Gras  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
1794715d8eSBen Gras  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
1894715d8eSBen Gras  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
1994715d8eSBen Gras  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
2094715d8eSBen Gras  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
2194715d8eSBen Gras  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2294715d8eSBen Gras  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2394715d8eSBen Gras  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2494715d8eSBen Gras  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
2594715d8eSBen Gras  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2694715d8eSBen Gras  */
2794715d8eSBen Gras 
2894715d8eSBen Gras void	adjust(struct inodesc *, short);
2994715d8eSBen Gras int	allocblk(void);
3094715d8eSBen Gras int	allocdir(ino_t, ino_t, int);
3194715d8eSBen Gras void	blkerror(ino_t, const char *, daddr_t);
3294715d8eSBen Gras int	bread(int, char *, daddr_t, long);
3394715d8eSBen Gras void	bufinit(void);
3494715d8eSBen Gras void	bwrite(int, char *, daddr_t, long);
3594715d8eSBen Gras void	cacheino(struct ext2fs_dinode *, ino_t);
3694715d8eSBen Gras int	changeino(ino_t, const char *, ino_t);
3794715d8eSBen Gras int	chkrange(daddr_t, int);
3894715d8eSBen Gras void	ckfini(int);
3994715d8eSBen Gras int	ckinode(struct ext2fs_dinode *, struct inodesc *);
4094715d8eSBen Gras void	clri(struct inodesc *, const char *, int);
4194715d8eSBen Gras int	dircheck(struct inodesc *, struct ext2fs_direct *);
4294715d8eSBen Gras void	direrror(ino_t, const char *);
4394715d8eSBen Gras int	dirscan(struct inodesc *);
4494715d8eSBen Gras int	dofix(struct inodesc *, const char *);
4594715d8eSBen Gras void	fileerror(ino_t, ino_t, const char *);
4694715d8eSBen Gras int	findino(struct inodesc *);
4794715d8eSBen Gras int	findname(struct inodesc *);
4894715d8eSBen Gras void	flush(int, struct bufarea *);
4994715d8eSBen Gras void	freeblk(daddr_t);
5094715d8eSBen Gras void	freeino(ino_t);
5194715d8eSBen Gras void	freeinodebuf(void);
5294715d8eSBen Gras int	ftypeok(struct ext2fs_dinode *);
5394715d8eSBen Gras void	getpathname(char *, size_t, ino_t, ino_t);
5494715d8eSBen Gras void	inocleanup(void);
5594715d8eSBen Gras void	inodirty(void);
5694715d8eSBen Gras u_int64_t inosize(struct ext2fs_dinode *);
5794715d8eSBen Gras void	inossize(struct ext2fs_dinode *, u_int64_t);
5894715d8eSBen Gras int	linkup(ino_t, ino_t);
5994715d8eSBen Gras int	makeentry(ino_t, ino_t, const char *);
6094715d8eSBen Gras void	pass1(void);
6194715d8eSBen Gras void	pass1b(void);
6294715d8eSBen Gras void	pass2(void);
6394715d8eSBen Gras void	pass3(void);
6494715d8eSBen Gras void	pass4(void);
6594715d8eSBen Gras int	pass1check(struct inodesc *);
6694715d8eSBen Gras int	pass4check(struct inodesc *);
6794715d8eSBen Gras void	pass5(void);
6894715d8eSBen Gras void	pinode(ino_t);
6994715d8eSBen Gras void	propagate(void);
7094715d8eSBen Gras int	reply(const char *);
7194715d8eSBen Gras void	resetinodebuf(void);
7294715d8eSBen Gras int	setup(const char *);
7394715d8eSBen Gras struct	ext2fs_dinode * getnextinode(ino_t);
74*84d9c625SLionel Sambuc uint64_t inonblock(struct ext2fs_dinode *);
75*84d9c625SLionel Sambuc void	inosnblock(struct ext2fs_dinode *, uint64_t);
76