aboutsummaryrefslogtreecommitdiff
path: root/sbin/fsck_ifs/pass4.c
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>1997-03-11 12:20:21 +0000
committerPeter Wemm <peter@FreeBSD.org>1997-03-11 12:20:21 +0000
commit780a5c1ec16f889d55914a09fbcde7ff7b2cfcca (patch)
tree1eaf4d253b6a6dc9330595ee6ef3e9b9aba85422 /sbin/fsck_ifs/pass4.c
parent82b49328cdd209c28fbd5b289ce1987f9d3f7c71 (diff)
Merge from Lite2. Note that Lite2 has it's own filesystem clean check
skipping code that overrides ours sooner. One should be eliminated, but for now it works.
Notes
Notes: svn path=/head/; revision=23675
Diffstat (limited to 'sbin/fsck_ifs/pass4.c')
-rw-r--r--sbin/fsck_ifs/pass4.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/sbin/fsck_ifs/pass4.c b/sbin/fsck_ifs/pass4.c
index df8f72247186..e20f6fa30372 100644
--- a/sbin/fsck_ifs/pass4.c
+++ b/sbin/fsck_ifs/pass4.c
@@ -32,18 +32,19 @@
*/
#ifndef lint
-static const char sccsid[] = "@(#)pass4.c 8.1 (Berkeley) 6/5/93";
+static const char sccsid[] = "@(#)pass4.c 8.4 (Berkeley) 4/28/95";
#endif /* not lint */
#include <sys/param.h>
#include <sys/time.h>
+
#include <ufs/ufs/dinode.h>
#include <ufs/ffs/fs.h>
-#include <stdlib.h>
+
+#include <err.h>
#include <string.h>
-#include "fsck.h"
-int pass4check();
+#include "fsck.h"
void
pass4()
@@ -54,7 +55,7 @@ pass4()
struct inodesc idesc;
int n;
- bzero((char *)&idesc, sizeof(struct inodesc));
+ memset(&idesc, 0, sizeof(struct inodesc));
idesc.id_type = ADDR;
idesc.id_func = pass4check;
for (inumber = ROOTINO; inumber <= lastino; inumber++) {
@@ -98,7 +99,7 @@ pass4()
break;
default:
- errexit("BAD STATE %d FOR INODE I=%d",
+ errx(EEXIT, "BAD STATE %d FOR INODE I=%d",
statemap[inumber], inumber);
}
}
@@ -110,7 +111,7 @@ pass4check(idesc)
{
register struct dups *dlp;
int nfrags, res = KEEPON;
- daddr_t blkno = idesc->id_blkno;
+ ufs_daddr_t blkno = idesc->id_blkno;
for (nfrags = idesc->id_numfrags; nfrags > 0; blkno++, nfrags--) {
if (chkrange(blkno, 1)) {