diff options
author | Michael I. Bushnell <mib@gnu.org> | 1994-10-25 03:37:12 +0000 |
---|---|---|
committer | Michael I. Bushnell <mib@gnu.org> | 1994-10-25 03:37:12 +0000 |
commit | 33406468d829d2075bc998acebec1f13c67b09a5 (patch) | |
tree | 232517fa205ff987e5bb7284c94807f034b4552b /ufs-fsck | |
parent | 0b3c259a64c6ae0130a81e7a682024b21baf1bba (diff) |
entered into RCS
Diffstat (limited to 'ufs-fsck')
-rw-r--r-- | ufs-fsck/inode.c | 3 | ||||
-rw-r--r-- | ufs-fsck/setup.c | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/ufs-fsck/inode.c b/ufs-fsck/inode.c index c10906ff..afb8b1a4 100644 --- a/ufs-fsck/inode.c +++ b/ufs-fsck/inode.c @@ -50,6 +50,9 @@ inode_iterate (struct dinode *dp, readblock (fsbtodb (sblock, iblock), ptrs, sblock->fs_bsize); for (i = 0; i < NINDIR (sblock); i++) { + if (!ptrs[i]) + continue; + if (level == 0) { cont = (*fn)(ptrs[i], sblock->fs_frag, totaloffset); diff --git a/ufs-fsck/setup.c b/ufs-fsck/setup.c index a4c65bc0..f3faf07d 100644 --- a/ufs-fsck/setup.c +++ b/ufs-fsck/setup.c @@ -49,9 +49,9 @@ setup (char *dev) } if (preen == 0) printf ("** %s", dev); - if (!nflag) + if (!nowrite) readfd = open (dev, O_RDWR); - if (nflag || readfd == -1) + if (nowrite || readfd == -1) { readfd = open (dev, O_RDONLY); if (readfd == -1) @@ -60,7 +60,7 @@ setup (char *dev) return 0; } writefd = -1; - nflag = 1; + nowrite = 1; if (preen) pfatal ("NO WRITE ACCESS"); printf (" (NO WRITE)"); |