This is the mail archive of the ecos-patches@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Bug in FAT32 filesystem


--- ./ecos/packages/fs/fat/current/src/fatfs_supp.c
2005-08-04 04:40:48.000000000 +0800
+++ fatfs_supp.c	2007-01-31 13:21:06.000000000 +0800
@@ -2166,7 +2166,10 @@ fatfs_delete_file(fatfs_disk_t
*disk, fa
     }    
     
     // Free file clusters
-    free_cluster_chain(disk, raw_dentry.cluster);
+    //free_cluster_chain(disk, raw_dentry.cluster);
+    //Fix bug in FAT32. 
+    //In FAT32, the entry's start cluster is 32bit
and it's composed of cluster_HI and cluster
+    free_cluster_chain(disk, raw_dentry.cluster |
raw_dentry.cluster_HI << 16);
     raw_dentry_set_deleted(disk, &raw_dentry);
     err = write_raw_dentry(disk, &file->disk_pos,
&raw_dentry);
     return err;


___________________________________________________ 
 您的生活即時通 - 溝通、娛樂、生活、工作一次搞定! 
 http://messenger.yahoo.com.tw/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]