diff options
author | Michael I. Bushnell <mib@gnu.org> | 1994-08-23 20:15:16 +0000 |
---|---|---|
committer | Michael I. Bushnell <mib@gnu.org> | 1994-08-23 20:15:16 +0000 |
commit | 29416391d928294f00ce6bf92474e4ce213f9589 (patch) | |
tree | c52f64620b8fef047878175fd2045d42facc8273 | |
parent | 86b23df2df09b24dbad57ebab8f9e4561ace5ec5 (diff) |
Formerly pass1.c.~2~
-rw-r--r-- | bsdfsck/pass1.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/bsdfsck/pass1.c b/bsdfsck/pass1.c index cc15c199..44a35fe8 100644 --- a/bsdfsck/pass1.c +++ b/bsdfsck/pass1.c @@ -33,14 +33,14 @@ #ifndef lint /*static char sccsid[] = "from: @(#)pass1.c 8.1 (Berkeley) 6/5/93";*/ -static char *rcsid = "$Id: pass1.c,v 1.1 1994/08/23 19:29:23 mib Exp $"; +static char *rcsid = "$Id: pass1.c,v 1.2 1994/08/23 20:15:16 mib Exp $"; #endif /* not lint */ #include <sys/param.h> #include <sys/time.h> -#include <ufs/ufs/dinode.h> -#include <ufs/ufs/dir.h> -#include <ufs/ffs/fs.h> +#include "../ufs/dinode.h" +#include "../ufs/dir.h" +#include "../ufs/fs.h" #include <stdlib.h> #include <string.h> #include "fsck.h" @@ -99,13 +99,13 @@ checkinode(inumber, idesc) char *symbuf; dp = getnextinode(inumber); - mode = dp->di_mode & IFMT; + mode = DI_MODE(dp) & IFMT; if (mode == 0) { if (bcmp((char *)dp->di_db, (char *)zino.di_db, NDADDR * sizeof(daddr_t)) || bcmp((char *)dp->di_ib, (char *)zino.di_ib, NIADDR * sizeof(daddr_t)) || - dp->di_mode || dp->di_size) { + DI_MODE(dp) || dp->di_size) { pfatal("PARTIALLY ALLOCATED INODE I=%lu", inumber); if (reply("CLEAR") == 1) { dp = ginode(inumber); @@ -126,7 +126,12 @@ checkinode(inumber, idesc) if (!preen && mode == IFMT && reply("HOLD BAD BLOCK") == 1) { dp = ginode(inumber); dp->di_size = sblock.fs_fsize; +#if 0 dp->di_mode = IFREG|0600; +#else + dp->di_modeh = 0; + dp->di_model = IFREG|0600; +#endif inodirty(); } ndb = howmany(dp->di_size, sblock.fs_bsize); |