summaryrefslogtreecommitdiffstats
path: root/sbin/fsck_ifs
diff options
context:
space:
mode:
authordg <dg@FreeBSD.org>1994-08-02 12:54:27 +0000
committerdg <dg@FreeBSD.org>1994-08-02 12:54:27 +0000
commitbd5cd438f270c38b4d2e706ee4fdf8bc45458121 (patch)
tree915609de5863c34a6313dd6db7fe6dc6dad01624 /sbin/fsck_ifs
parentb0756e8093925874b4bd89aa2e043bb63dffc7fc (diff)
downloadFreeBSD-src-bd5cd438f270c38b4d2e706ee4fdf8bc45458121.zip
FreeBSD-src-bd5cd438f270c38b4d2e706ee4fdf8bc45458121.tar.gz
Fixed so that it can grok old style "fastlinks".
Diffstat (limited to 'sbin/fsck_ifs')
-rw-r--r--sbin/fsck_ifs/inode.c2
-rw-r--r--sbin/fsck_ifs/pass1.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/sbin/fsck_ifs/inode.c b/sbin/fsck_ifs/inode.c
index f1c1758..381bfc0 100644
--- a/sbin/fsck_ifs/inode.c
+++ b/sbin/fsck_ifs/inode.c
@@ -63,7 +63,7 @@ ckinode(dp, idesc)
idesc->id_filesize = dp->di_size;
mode = dp->di_mode & IFMT;
if (mode == IFBLK || mode == IFCHR || (mode == IFLNK &&
- dp->di_size < sblock.fs_maxsymlinklen))
+ (dp->di_size < sblock.fs_maxsymlinklen || dp->di_blocks == 0)))
return (KEEPON);
dino = *dp;
ndb = howmany(dino.di_size, sblock.fs_bsize);
diff --git a/sbin/fsck_ifs/pass1.c b/sbin/fsck_ifs/pass1.c
index ca255fe..a3ab2f9 100644
--- a/sbin/fsck_ifs/pass1.c
+++ b/sbin/fsck_ifs/pass1.c
@@ -160,7 +160,7 @@ checkinode(inumber, idesc)
* Fake ndb value so direct/indirect block checks below
* will detect any garbage after symlink string.
*/
- if (dp->di_size < sblock.fs_maxsymlinklen) {
+ if ((dp->di_size < sblock.fs_maxsymlinklen) || dp->di_blocks == 0) {
ndb = howmany(dp->di_size, sizeof(daddr_t));
if (ndb > NDADDR) {
j = ndb - NDADDR;
OpenPOWER on IntegriCloud