Module Name: src
Committed By: dholland
Date: Sat Oct 3 08:30:13 UTC 2015
Modified Files:
src/sbin/fsck_lfs: fsck.h pass1.c
Log Message:
The per-inode state 'id_entryno' is used by pass1 for a block count,
so widen it to 'long long'. pass2 uses it for the number of entries in
a directory (IIUC) which does not need to be wider than int, but for
now let's not try to split into two fields. FUTURE...
To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sbin/fsck_lfs/fsck.h
cvs rdiff -u -r1.44 -r1.45 src/sbin/fsck_lfs/pass1.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sbin/fsck_lfs/fsck.h
diff -u src/sbin/fsck_lfs/fsck.h:1.25 src/sbin/fsck_lfs/fsck.h:1.26
--- src/sbin/fsck_lfs/fsck.h:1.25 Sat Oct 3 08:30:02 2015
+++ src/sbin/fsck_lfs/fsck.h Sat Oct 3 08:30:13 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: fsck.h,v 1.25 2015/10/03 08:30:02 dholland Exp $ */
+/* $NetBSD: fsck.h,v 1.26 2015/10/03 08:30:13 dholland Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -98,7 +98,7 @@ struct inodesc {
int id_numfrags; /* number of frags contained in block */
off_t id_filesize; /* for DATA nodes, the size of the directory */
int id_loc; /* for DATA nodes, current location in dir */
- int id_entryno; /* for DATA nodes, current entry number */
+ long long id_entryno; /* for DATA nodes, current entry number */
LFS_DIRHEADER *id_dirp; /* for DATA nodes, ptr to current entry */
const char *id_name; /* for DATA nodes, name to find or enter */
char id_type; /* type of descriptor, DATA or ADDR */
Index: src/sbin/fsck_lfs/pass1.c
diff -u src/sbin/fsck_lfs/pass1.c:1.44 src/sbin/fsck_lfs/pass1.c:1.45
--- src/sbin/fsck_lfs/pass1.c:1.44 Tue Sep 1 06:15:02 2015
+++ src/sbin/fsck_lfs/pass1.c Sat Oct 3 08:30:13 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: pass1.c,v 1.44 2015/09/01 06:15:02 dholland Exp $ */
+/* $NetBSD: pass1.c,v 1.45 2015/10/03 08:30:13 dholland Exp $ */
/*
* Copyright (c) 1980, 1986, 1993
@@ -325,7 +325,7 @@ checkinode(ino_t inumber, struct inodesc
idesc->id_number = inumber;
(void) ckinode(VTOD(vp), idesc);
if (lfs_dino_getblocks(fs, dp) != idesc->id_entryno) {
- pwarn("INCORRECT BLOCK COUNT I=%llu (%ju SHOULD BE %d)",
+ pwarn("INCORRECT BLOCK COUNT I=%llu (%ju SHOULD BE %lld)",
(unsigned long long)inumber, lfs_dino_getblocks(fs, dp),
idesc->id_entryno);
if (preen)