summaryrefslogtreecommitdiff
path: root/sbin/fsck_ffs/pass1.c
diff options
context:
space:
mode:
authorDavid Leonard <d@cvs.openbsd.org>1999-03-01 07:45:19 +0000
committerDavid Leonard <d@cvs.openbsd.org>1999-03-01 07:45:19 +0000
commitb49f418ba660f4a5e53a938510851a21454f0335 (patch)
tree774fcfaf0f1886a41b15811b93b092acb49baa0a /sbin/fsck_ffs/pass1.c
parenta77a300b0493552bdceff598f141c91679002dd7 (diff)
SIGINFO support
Diffstat (limited to 'sbin/fsck_ffs/pass1.c')
-rw-r--r--sbin/fsck_ffs/pass1.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/sbin/fsck_ffs/pass1.c b/sbin/fsck_ffs/pass1.c
index 181006e8b82..27faa9ee01a 100644
--- a/sbin/fsck_ffs/pass1.c
+++ b/sbin/fsck_ffs/pass1.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pass1.c,v 1.6 1997/10/06 20:22:34 deraadt Exp $ */
+/* $OpenBSD: pass1.c,v 1.7 1999/03/01 07:45:17 d Exp $ */
/* $NetBSD: pass1.c,v 1.16 1996/09/27 22:45:15 christos Exp $ */
/*
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)pass1.c 8.1 (Berkeley) 6/5/93";
#else
-static char rcsid[] = "$OpenBSD: pass1.c,v 1.6 1997/10/06 20:22:34 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: pass1.c,v 1.7 1999/03/01 07:45:17 d Exp $";
#endif
#endif /* not lint */
@@ -60,12 +60,23 @@ static daddr_t badblk;
static daddr_t dupblk;
static void checkinode __P((ino_t, struct inodesc *));
+static ino_t info_inumber;
+
+static int
+pass1_info(buf, buflen)
+ char * buf;
+ int buflen;
+{
+ return snprintf(buf, buflen, "phase 1, inode %d/%d",
+ info_inumber, sblock.fs_ipg * sblock.fs_ncg);
+}
+
void
pass1()
{
+ struct inodesc idesc;
ino_t inumber;
int c, i, cgd;
- struct inodesc idesc;
/*
* Set file system reserved blocks in used block map.
@@ -92,13 +103,17 @@ pass1()
inumber = 0;
n_files = n_blks = 0;
resetinodebuf();
+ info_inumber = 0;
+ info_fn = pass1_info;
for (c = 0; c < sblock.fs_ncg; c++) {
for (i = 0; i < sblock.fs_ipg; i++, inumber++) {
+ info_inumber = inumber;
if (inumber < ROOTINO)
continue;
checkinode(inumber, &idesc);
}
}
+ info_fn = NULL;
freeinodebuf();
}