diff options
author | Michael I. Bushnell <mib@gnu.org> | 1996-05-14 19:29:31 +0000 |
---|---|---|
committer | Michael I. Bushnell <mib@gnu.org> | 1996-05-14 19:29:31 +0000 |
commit | 020ca05f725c103608974465e96d9cc61b2f9ff1 (patch) | |
tree | 6e5b78cacb7018358669c399fd8828a526710fbb /ufs-fsck | |
parent | df69ea2ae3c277f183840e85aefcc3a09db2fbd4 (diff) |
(pass2): Handle directory entry type fields better for Hurd.
Diffstat (limited to 'ufs-fsck')
-rw-r--r-- | ufs-fsck/pass2.c | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/ufs-fsck/pass2.c b/ufs-fsck/pass2.c index 3c70170e..4519db6e 100644 --- a/ufs-fsck/pass2.c +++ b/ufs-fsck/pass2.c @@ -145,17 +145,29 @@ pass2 () /* Check TYPE */ type = DIRECT_TYPE (dp); - if (type != DT_UNKNOWN && type != typemap[dp->d_ino]) + if (type != DT_UNKNOWN) { - problem (1, "INCORRECT NODE TYPE IN DIRECTORY"); - if (reply ("FIX")) + if (type == typemap[dp->d_ino]) { - errexit ("NODE TYPE FOUND WHEN NOT SUPPORTED"); - dp->d_type = typemap[dp->d_ino]; - mod = 1; + problem (0, "NODE TYPE FIELD SET IN DIRECTORY (I=%d) [NOT IMPLEMENTED IN HURD]"); + if (preen || reply ("CLEAR")) + { + dp->d_type = 0; + mod = 1; + pfix ("CLEARED"); + } + } + else + { + problem (1, "INCORRECT NODE TYPE IN DIRECTORY (I=%d)"); + if (reply ("FIX")) + { + dp->d_type = typemap[dp->d_ino]; + mod = 1; + } } } - + /* Here we should check for duplicate directory entries; that's too much trouble right now. */ |