qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] Fix block-vvfat for DOS 6.22


From: Johannes Schindelin
Subject: [Qemu-devel] [PATCH] Fix block-vvfat for DOS 6.22
Date: Sat, 19 Nov 2005 15:16:17 +0100 (CET)

DOS 6.22 ignores the number_of_sectors_per_fat entry in the boot block, but
insists on the minimal amount. Since I miscalculated that value, it did
not match the expectations of DOS.

Signed-off-by: Johannes Schindelin <address@hidden>

---

        > If you will find the solution to the MS-DOS problem, i'd be
        > very greatful if you will share the patch/workaround.

        Well, here you are. It was not the second FAT which was missing,
        but DOS looking for direntries where VVFAT put some sectors
        of the second FAT...

 block-vvfat.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

applies-to: 883ade6f323513393835edeb321b52a98cf56430
80721ce5b55e71e5ae15145e4ca91faa00b70001
diff --git a/block-vvfat.c b/block-vvfat.c
index a7ad868..4d33095 100644
--- a/block-vvfat.c
+++ b/block-vvfat.c
@@ -710,7 +710,7 @@ static int init_directory(BDRVVVFATState
     memset(&(s->first_sectors[0]),0,0x40*0x200);
 
     /* TODO: if FAT32, this is probably wrong */
-    s->sectors_per_fat=0xfc;
+    s->sectors_per_fat=0xec;
     s->sectors_per_cluster=0x10;
     s->cluster_size=s->sectors_per_cluster*0x200;
     s->cluster=malloc(s->cluster_size);
---
0.99.9.GIT




reply via email to

[Prev in Thread] Current Thread [Next in Thread]