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