1341825Sdim/* $NetBSD: fsdb.h,v 1.10 2008/04/28 20:23:08 martin Exp $ */ 2239313Sdim 3353358Sdim/*- 4353358Sdim * Copyright (c) 1996 The NetBSD Foundation, Inc. 5353358Sdim * All rights reserved. 6239313Sdim * 7239313Sdim * This code is derived from software contributed to The NetBSD Foundation 8239313Sdim * by John T. Kohl. 9239313Sdim * 10239313Sdim * Redistribution and use in source and binary forms, with or without 11239313Sdim * modification, are permitted provided that the following conditions 12239313Sdim * are met: 13239313Sdim * 1. Redistributions of source code must retain the above copyright 14239313Sdim * notice, this list of conditions and the following disclaimer. 15239313Sdim * 2. Redistributions in binary form must reproduce the above copyright 16239313Sdim * notice, this list of conditions and the following disclaimer in the 17288943Sdim * documentation and/or other materials provided with the distribution. 18341825Sdim * 19341825Sdim * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 20288943Sdim * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 21341825Sdim * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 22239313Sdim * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 23239313Sdim * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24309124Sdim * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25239313Sdim * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26239313Sdim * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27341825Sdim * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28239313Sdim * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29239313Sdim * POSSIBILITY OF SUCH DAMAGE. 30309124Sdim */ 31239313Sdim 32239313Sdimextern void rwerror(char *mesg, daddr_t blk); 33341825Sdim 34239313Sdimextern long dev_bsize; 35239313Sdimextern long secsize; 36327952Sdimextern int fsmodified; 37239313Sdimextern int fsfd; 38239313Sdimextern int doswap; 39341825Sdimextern int needswap; 40239313Sdimextern int markclean; 41239313Sdim 42327952Sdimstruct cmdtable { 43239313Sdim const char *cmd; 44239313Sdim const char *helptxt; 45341825Sdim int minargc; 46239313Sdim int maxargc; 47239313Sdim int (*handler)(int argc, char *argv[]); 48327952Sdim}; 49239313Sdimextern union dinode *curinode; 50239313Sdimextern ino_t curinum; 51341825Sdim 52239313Sdimchar **crack(char *, int *); 53239313Sdimint argcount(struct cmdtable *, int, char *[]); 54327952Sdimvoid printstat(const char *, ino_t, union dinode *); 55239313Sdimint checkactive(void); 56239313Sdimint checkactivedir(void); 57341825Sdimint printactive(void); 58239313Sdim