Add support for fast symlinks.
This commit is contained in:
parent
64f27b118b
commit
90c92bff60
|
@ -33,7 +33,7 @@
|
|||
|
||||
#ifndef lint
|
||||
static char sccsid[] = "@(#)dumptraverse.c 5.11 (Berkeley) 3/7/91";
|
||||
static char rcsid[] = "$Header: /cvsroot/src/sbin/dump/Attic/dumptraverse.c,v 1.4 1993/04/09 12:29:06 cgd Exp $";
|
||||
static char rcsid[] = "$Header: /cvsroot/src/sbin/dump/Attic/dumptraverse.c,v 1.5 1993/06/13 21:08:27 mycroft Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/param.h>
|
||||
|
@ -309,6 +309,13 @@ dumpino(dp, ino)
|
|||
writeheader(ino);
|
||||
return;
|
||||
}
|
||||
if (DFASTLINK(*dp)) {
|
||||
spcl.c_addr[0] = 1;
|
||||
spcl.c_count = 1;
|
||||
writeheader(ino);
|
||||
writerec(dp->di_symlink);
|
||||
return;
|
||||
}
|
||||
if (dp->di_size > NDADDR * sblock->fs_bsize)
|
||||
cnt = NDADDR * sblock->fs_frag;
|
||||
else
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
|
||||
#ifndef lint
|
||||
static char sccsid[] = "@(#)inode.c 5.18 (Berkeley) 3/19/91";
|
||||
static char rcsid[] = "$Header: /cvsroot/src/sbin/fsck/Attic/inode.c,v 1.3 1993/03/23 00:27:53 cgd Exp $";
|
||||
static char rcsid[] = "$Header: /cvsroot/src/sbin/fsck/Attic/inode.c,v 1.4 1993/06/13 21:09:16 mycroft Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/param.h>
|
||||
|
@ -59,7 +59,8 @@ ckinode(dp, idesc)
|
|||
idesc->id_fix = DONTKNOW;
|
||||
idesc->id_entryno = 0;
|
||||
idesc->id_filesize = dp->di_size;
|
||||
if ((dp->di_mode & IFMT) == IFBLK || (dp->di_mode & IFMT) == IFCHR)
|
||||
if ((dp->di_mode & IFMT) == IFBLK || (dp->di_mode & IFMT) == IFCHR ||
|
||||
DFASTLINK(*dp))
|
||||
return (KEEPON);
|
||||
dino = *dp;
|
||||
ndb = howmany(dino.di_size, sblock.fs_bsize);
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
|
||||
#ifndef lint
|
||||
static char sccsid[] = "@(#)pass1.c 5.16 (Berkeley) 3/19/91";
|
||||
static char rcsid[] = "$Header: /cvsroot/src/sbin/fsck/Attic/pass1.c,v 1.3 1993/03/23 00:27:58 cgd Exp $";
|
||||
static char rcsid[] = "$Header: /cvsroot/src/sbin/fsck/Attic/pass1.c,v 1.4 1993/06/13 21:10:50 mycroft Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/param.h>
|
||||
|
@ -102,6 +102,13 @@ pass1()
|
|||
continue;
|
||||
}
|
||||
lastino = inumber;
|
||||
/* is fast symlink? */
|
||||
if (DFASTLINK(*dp)) {
|
||||
lncntp[inumber] = dp->di_nlink;
|
||||
statemap[inumber] = FSTATE;
|
||||
n_files++;
|
||||
continue;
|
||||
}
|
||||
if (/* dp->di_size < 0 || */
|
||||
dp->di_size + sblock.fs_bsize - 1 < dp->di_size) {
|
||||
if (debug)
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
|
||||
#ifndef lint
|
||||
static char sccsid[] = "@(#)inode.c 5.18 (Berkeley) 3/19/91";
|
||||
static char rcsid[] = "$Header: /cvsroot/src/sbin/fsck_ffs/inode.c,v 1.3 1993/03/23 00:27:53 cgd Exp $";
|
||||
static char rcsid[] = "$Header: /cvsroot/src/sbin/fsck_ffs/inode.c,v 1.4 1993/06/13 21:09:16 mycroft Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/param.h>
|
||||
|
@ -59,7 +59,8 @@ ckinode(dp, idesc)
|
|||
idesc->id_fix = DONTKNOW;
|
||||
idesc->id_entryno = 0;
|
||||
idesc->id_filesize = dp->di_size;
|
||||
if ((dp->di_mode & IFMT) == IFBLK || (dp->di_mode & IFMT) == IFCHR)
|
||||
if ((dp->di_mode & IFMT) == IFBLK || (dp->di_mode & IFMT) == IFCHR ||
|
||||
DFASTLINK(*dp))
|
||||
return (KEEPON);
|
||||
dino = *dp;
|
||||
ndb = howmany(dino.di_size, sblock.fs_bsize);
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
|
||||
#ifndef lint
|
||||
static char sccsid[] = "@(#)pass1.c 5.16 (Berkeley) 3/19/91";
|
||||
static char rcsid[] = "$Header: /cvsroot/src/sbin/fsck_ffs/pass1.c,v 1.3 1993/03/23 00:27:58 cgd Exp $";
|
||||
static char rcsid[] = "$Header: /cvsroot/src/sbin/fsck_ffs/pass1.c,v 1.4 1993/06/13 21:10:50 mycroft Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/param.h>
|
||||
|
@ -102,6 +102,13 @@ pass1()
|
|||
continue;
|
||||
}
|
||||
lastino = inumber;
|
||||
/* is fast symlink? */
|
||||
if (DFASTLINK(*dp)) {
|
||||
lncntp[inumber] = dp->di_nlink;
|
||||
statemap[inumber] = FSTATE;
|
||||
n_files++;
|
||||
continue;
|
||||
}
|
||||
if (/* dp->di_size < 0 || */
|
||||
dp->di_size + sblock.fs_bsize - 1 < dp->di_size) {
|
||||
if (debug)
|
||||
|
|
Loading…
Reference in New Issue