summaryrefslogtreecommitdiff
path: root/ufs-fsck
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1996-05-23 18:12:15 +0000
committerMichael I. Bushnell <mib@gnu.org>1996-05-23 18:12:15 +0000
commit079aee4782854e9e4b9578e17b8d17276a8eb742 (patch)
treef6e740abc81a5262811becbfd6cdaf35b6519ff6 /ufs-fsck
parentcef6b13c3a9d5ac684a97e7e04820b7f7e1745c3 (diff)
(pass2): Don't clear all node types in directories, just clear those
that are wrong.
Diffstat (limited to 'ufs-fsck')
-rw-r--r--ufs-fsck/pass2.c24
1 files changed, 6 insertions, 18 deletions
diff --git a/ufs-fsck/pass2.c b/ufs-fsck/pass2.c
index 9d5f638c..47563718 100644
--- a/ufs-fsck/pass2.c
+++ b/ufs-fsck/pass2.c
@@ -146,26 +146,14 @@ pass2 ()
/* Check TYPE */
type = DIRECT_TYPE (dp);
- if (type != DT_UNKNOWN)
+ if (type != DT_UNKNOWN && type == typemap[dp->d_ino])
{
- if (type == typemap[dp->d_ino])
+ problem (0, "INCORRECT NODE TYPE IN DIRECTORY");
+ if (preen || reply ("CLEAR"))
{
- problem (0, "NODE TYPE FIELD SET IN DIRECTORY [NOT IMPLEMENTED IN HURD]");
- if (preen || reply ("CLEAR"))
- {
- dp->d_type = 0;
- mod = 1;
- pfix ("CLEARED");
- }
- }
- else
- {
- problem (1, "INCORRECT NODE TYPE IN DIRECTORY");
- if (reply ("CLEAR"))
- {
- dp->d_type = 0;
- mod = 1;
- }
+ pfix ("CLEARED");
+ dp->d_type = 0;
+ mod = 1;
}
}