summaryrefslogtreecommitdiff
path: root/ufs-fsck
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1996-05-14 19:29:31 +0000
committerMichael I. Bushnell <mib@gnu.org>1996-05-14 19:29:31 +0000
commite14202b72dea4891c00bd3bf080f9f6cd8497a33 (patch)
tree30ad3e653ca50afd2a1c61f2d7ebf900cbc42c8e /ufs-fsck
parentd233bdfd39e968e4cffc9af6b21ba2f4ce24df22 (diff)
(pass2): Handle directory entry type fields better for Hurd.
Diffstat (limited to 'ufs-fsck')
-rw-r--r--ufs-fsck/pass2.c26
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. */