summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1994-10-25 03:37:12 +0000
committerMichael I. Bushnell <mib@gnu.org>1994-10-25 03:37:12 +0000
commit7f9033632b20aa8b0fd17dca3cbf74a52b6b287e (patch)
treed93e9595ab34833eca4a6660553d1c5c49422bed
parent436101b13c694b042a7b751278c7325790160db4 (diff)
entered into RCS
-rw-r--r--ufs-fsck/inode.c3
-rw-r--r--ufs-fsck/setup.c6
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)");