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 | b77bcc19abf5032c6f7fd8aa17622fb895461caf (patch) | |
tree | 5d64273b5e9a05fb612b84f1c477e106d9dd0c0a | |
parent | 77d8043d451e95abf5e3111df1d14a9d4d200b60 (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; } } |