diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 1997-10-12 19:58:34 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 1997-10-12 19:58:34 +0000 |
commit | 63bc988c89e35fa7e4c3afe2cb1889b3b828806b (patch) | |
tree | d703eb167e98cb3a78adb8e1341bad11cd52d14b /sbin/clri/clri.c | |
parent | 41c2bd0f81acf2566cd8e7e7d6951f48e3a3ae39 (diff) |
mark filesystem dirty
Diffstat (limited to 'sbin/clri/clri.c')
-rw-r--r-- | sbin/clri/clri.c | 14 |
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); |