summaryrefslogtreecommitdiff
path: root/sys/msdosfs/msdosfs_lookup.c
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>1999-02-19 17:26:18 +0000
committerArtur Grabowski <art@cvs.openbsd.org>1999-02-19 17:26:18 +0000
commit458f6c79d0af51b1c21b94bb28910ae66cd678f0 (patch)
tree3b47b6c50ba2c4836d799fb279f2204e060d35c4 /sys/msdosfs/msdosfs_lookup.c
parent0aede0d0779649c084e186943dfab96629d9a115 (diff)
Fix a bug where the root directory could look corrupted on FAT12.
I'm not sure if this fix is correct but: some comments in the code say that it should be done this way, it fixes the particular problem, it doesn't break anything else, noone who got the diff complained (in two months).
Diffstat (limited to 'sys/msdosfs/msdosfs_lookup.c')
-rw-r--r--sys/msdosfs/msdosfs_lookup.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/msdosfs/msdosfs_lookup.c b/sys/msdosfs/msdosfs_lookup.c
index f36f051057e..1a6baa0233b 100644
--- a/sys/msdosfs/msdosfs_lookup.c
+++ b/sys/msdosfs/msdosfs_lookup.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: msdosfs_lookup.c,v 1.10 1998/01/11 20:39:09 provos Exp $ */
+/* $OpenBSD: msdosfs_lookup.c,v 1.11 1999/02/19 17:26:17 art Exp $ */
/* $NetBSD: msdosfs_lookup.c,v 1.34 1997/10/18 22:12:27 ws Exp $ */
/*-
@@ -444,6 +444,9 @@ found:;
}
}
+ if (cluster == MSDOSFSROOT)
+ blkoff = diroff;
+
if (isadir) {
cluster = scn;
if (cluster == MSDOSFSROOT)