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

[Lost] [Patch] Fix für fat_write_cluster



In Fat werden cluster im Moment um ein paar Bytes verschoben
gespeichert. Hier ein Patch dafür.
Index: src/modules/fat/fat.c
===================================================================
--- src/modules/fat/fat.c	(Revision 606)
+++ src/modules/fat/fat.c	(Arbeitskopie)
@@ -212,9 +212,9 @@
                 sizeof(fat_directory_entry_t) / FAT_CUR_RD_HANDLE->bios_parameter_block.bytes_per_sector)
         ) * FAT_CUR_RD_HANDLE->bios_parameter_block.bytes_per_sector;
     
-    fseek(filehandle->source, fat_sector_start + (cluster_id - 2) * 
-        FAT_CUR_RD_HANDLE->bios_parameter_block.bytes_per_sector * 
-        FAT_CUR_RD_HANDLE->bios_parameter_block.sectors_per_cluster, SEEK_SET);
+    fseek(filehandle->source, (fat_sector_start + (cluster_id - 2) * 
+        FAT_CUR_RD_HANDLE->bios_parameter_block.sectors_per_cluster) *
+        FAT_CUR_RD_HANDLE->bios_parameter_block.bytes_per_sector, SEEK_SET);
 
     fwrite(src, 1, FAT_CUR_RD_HANDLE->bios_parameter_block.bytes_per_sector * 
         FAT_CUR_RD_HANDLE->bios_parameter_block.sectors_per_cluster,