diff options
author | Michael I. Bushnell <mib@gnu.org> | 1996-05-23 18:12:15 +0000 |
---|---|---|
committer | Michael I. Bushnell <mib@gnu.org> | 1996-05-23 18:12:15 +0000 |
commit | 079aee4782854e9e4b9578e17b8d17276a8eb742 (patch) | |
tree | f6e740abc81a5262811becbfd6cdaf35b6519ff6 | |
parent | cef6b13c3a9d5ac684a97e7e04820b7f7e1745c3 (diff) |
(pass2): Don't clear all node types in directories, just clear those
that are wrong.
-rw-r--r-- | ufs-fsck/pass2.c | 24 |
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; } } |