Fixed so that it can grok old style "fastlinks".

This commit is contained in:
dg 1994-08-02 12:54:27 +00:00
parent b0756e8093
commit bd5cd438f2
6 changed files with 6 additions and 6 deletions

View File

@ -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);

View File

@ -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;

View File

@ -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);

View File

@ -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;

View File

@ -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);

View File

@ -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;