From 458f6c79d0af51b1c21b94bb28910ae66cd678f0 Mon Sep 17 00:00:00 2001 From: Artur Grabowski Date: Fri, 19 Feb 1999 17:26:18 +0000 Subject: 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). --- sys/msdosfs/msdosfs_lookup.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sys/msdosfs/msdosfs_lookup.c') 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) -- cgit v1.2.3