summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrockiec <rockiec@codeaurora.org>2013-01-12 13:13:23 +0800
committerAdnan Begovic <adnan@cyngn.com>2015-10-07 17:39:54 -0700
commita232cbaa1c8671e3b160dc6643c1d2403acedd7e (patch)
treea23ee5f41bd5b4fb5a31bc9ff3b69379f57b21cc
parented2d73cb859b7d7fc6d7cfae57462df6052df7c6 (diff)
downloadandroid_external_fsck_msdos-a232cbaa1c8671e3b160dc6643c1d2403acedd7e.tar.gz
android_external_fsck_msdos-a232cbaa1c8671e3b160dc6643c1d2403acedd7e.tar.bz2
android_external_fsck_msdos-a232cbaa1c8671e3b160dc6643c1d2403acedd7e.zip
Do not return error if searched cluster is before FAT cache head
Clusters are keep unsorted, so this is expected behaviour Change-Id: I9e2feebd7726ab520238c16e4d58f0d2765cf58b
-rw-r--r--fatcache.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/fatcache.c b/fatcache.c
index 2842f83..155a547 100644
--- a/fatcache.c
+++ b/fatcache.c
@@ -203,10 +203,7 @@ struct fatcache* Find_nextclus(struct cluster_chain_descriptor* fat,unsigned int
fsck_warn("Not find the cluster after cluster %d\n",clus);
return (struct fatcache*)0;
}
- if(clus < fat->head){
- fsck_warn("out of range,clus: %d ,fat->head:%d\n",clus,fat->head);
- return (struct fatcache*)0;
- }
+
while(cache){
if(clus >= cache->head && clus <= cache->head + cache->length -2 ){
*cl = clus + 1;