summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sbin/clri/clri.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/sbin/clri/clri.c b/sbin/clri/clri.c
index 28df2238c45..b95209bb43b 100644
--- a/sbin/clri/clri.c
+++ b/sbin/clri/clri.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clri.c,v 1.2 1996/06/23 14:30:01 deraadt Exp $ */
+/* $OpenBSD: clri.c,v 1.3 1997/10/12 19:58:33 mickey Exp $ */
/* $NetBSD: clri.c,v 1.9 1995/03/18 14:54:33 cgd Exp $ */
/*
@@ -47,7 +47,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)clri.c 8.2 (Berkeley) 9/23/93";
#else
-static char rcsid[] = "$OpenBSD: clri.c,v 1.2 1996/06/23 14:30:01 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: clri.c,v 1.3 1997/10/12 19:58:33 mickey Exp $";
#endif
#endif /* not lint */
@@ -133,6 +133,16 @@ main(argc, argv)
if (write(fd, ibuf, bsize) != bsize)
err(1, "%s", fs);
(void)fsync(fd);
+
+ if (sbp->fs_inodefmt >= FS_44INODEFMT)
+ {
+ /* update after each inode cleared */
+ sbp->fs_clean = 0;
+ if (lseek(fd, (off_t)(SBLOCK * DEV_BSIZE), SEEK_SET) < 0)
+ err(1, "%s", fs);
+ if (write(fd, sblock, sizeof(sblock)) != sizeof(sblock))
+ errx(1, "%s: can't update superblock", fs);
+ }
}
(void)close(fd);
exit(0);