diff options
author | Thorsten Lockert <tholo@cvs.openbsd.org> | 1996-10-20 08:36:48 +0000 |
---|---|---|
committer | Thorsten Lockert <tholo@cvs.openbsd.org> | 1996-10-20 08:36:48 +0000 |
commit | 3f0fcab7e50711e90c15674cc26c70f9ed746e06 (patch) | |
tree | 0abf82fa13a11db2d499c8ac5a6ae37a124ba0ad /sbin/fsck_ffs/utilities.c | |
parent | 75d897a28c3d903af664acfcfd7cb28a499cb2a7 (diff) |
Sync with NetBSD 961019
Diffstat (limited to 'sbin/fsck_ffs/utilities.c')
-rw-r--r-- | sbin/fsck_ffs/utilities.c | 80 |
1 files changed, 14 insertions, 66 deletions
diff --git a/sbin/fsck_ffs/utilities.c b/sbin/fsck_ffs/utilities.c index b1071eaa86d..36dda840ee8 100644 --- a/sbin/fsck_ffs/utilities.c +++ b/sbin/fsck_ffs/utilities.c @@ -1,5 +1,5 @@ -/* $OpenBSD: utilities.c,v 1.2 1996/06/23 14:30:35 deraadt Exp $ */ -/* $NetBSD: utilities.c,v 1.15 1995/04/23 10:33:09 cgd Exp $ */ +/* $OpenBSD: utilities.c,v 1.3 1996/10/20 08:36:42 tholo Exp $ */ +/* $NetBSD: utilities.c,v 1.18 1996/09/27 22:45:20 christos Exp $ */ /* * Copyright (c) 1980, 1986, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)utilities.c 8.1 (Berkeley) 6/5/93"; #else -static char rcsid[] = "$OpenBSD: utilities.c,v 1.2 1996/06/23 14:30:35 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: utilities.c,v 1.3 1996/10/20 08:36:42 tholo Exp $"; #endif #endif /* not lint */ @@ -53,11 +53,14 @@ static char rcsid[] = "$OpenBSD: utilities.c,v 1.2 1996/06/23 14:30:35 deraadt E #include <ctype.h> #include <unistd.h> +#include "fsutil.h" #include "fsck.h" #include "extern.h" long diskreads, totalreads; /* Disk cache statistics */ +static void rwerror __P((char *, daddr_t)); + int ftypeok(dp) struct dinode *dp; @@ -227,7 +230,7 @@ flush(fd, bp) } } -void +static void rwerror(mesg, blk) char *mesg; daddr_t blk; @@ -235,7 +238,7 @@ rwerror(mesg, blk) if (preen == 0) printf("\n"); - pfatal("CANNOT %s: BLK %ld", mesg, blk); + pfatal("CANNOT %s: BLK %d", mesg, blk); if (reply("CONTINUE") == 0) errexit("Program terminated\n"); } @@ -470,7 +473,8 @@ getpathname(namebuf, curdir, ino) } void -catch() +catch(n) + int n; { if (!doinglevel2) ckfini(0); @@ -483,7 +487,8 @@ catch() * so that reboot sequence may be interrupted. */ void -catchquit() +catchquit(n) + int n; { extern returntosingle; @@ -497,7 +502,8 @@ catchquit() * Used by child processes in preen. */ void -voidquit() +voidquit(n) + int n; { sleep(1); @@ -545,61 +551,3 @@ dofix(idesc, msg) } /* NOTREACHED */ } - -/* VARARGS1 */ -errexit(s1, s2, s3, s4) - char *s1; - long s2, s3, s4; -{ - printf(s1, s2, s3, s4); - exit(8); -} - -/* - * An unexpected inconsistency occured. - * Die if preening, otherwise just print message and continue. - */ -/* VARARGS1 */ -pfatal(s, a1, a2, a3) - char *s; - long a1, a2, a3; -{ - - if (preen) { - printf("%s: ", cdevname); - printf(s, a1, a2, a3); - printf("\n"); - printf("%s: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.\n", - cdevname); - exit(8); - } - printf(s, a1, a2, a3); -} - -/* - * Pwarn just prints a message when not preening, - * or a warning (preceded by filename) when preening. - */ -/* VARARGS1 */ -pwarn(s, a1, a2, a3, a4, a5, a6) - char *s; - long a1, a2, a3, a4, a5, a6; -{ - - if (preen) - printf("%s: ", cdevname); - printf(s, a1, a2, a3, a4, a5, a6); -} - -#ifndef lint -/* - * Stub for routines from kernel. - */ -panic(s) - char *s; -{ - - pfatal("INTERNAL INCONSISTENCY:"); - errexit(s); -} -#endif |