if(Cluster) *Cluster = cluster;\r
cluster = FAT_int_GetFatValue(disk, cluster);\r
// Check for end of cluster chain\r
- if(cluster == 0xFFFFFFFF) { LEAVE('i', 1); return 1;}\r
+ if(cluster == GETFATVALUE_EOC) { LEAVE('i', 1); return 1; }\r
}\r
if(Cluster) *Cluster = cluster;\r
}\r
for(i = preSkip; i--; )\r
{\r
cluster = FAT_int_GetFatValue(disk, cluster);\r
- if(cluster == -1) {\r
+ if(cluster == GETFATVALUE_EOC) {\r
Log_Warning("FAT", "Offset is past end of cluster chain mark");\r
LEAVE('i', 0);\r
return 0;\r
LOG("pos = %i, Reading the rest of the clusters");\r
// Get next cluster in the chain\r
cluster = FAT_int_GetFatValue(disk, cluster);\r
- if(cluster == -1) {\r
+ if(cluster == GETFATVALUE_EOC) {\r
Log_Warning("FAT", "Read past End of Cluster Chain (Align)");\r
LEAVE('X', pos);\r
return pos;\r
// Read the rest of the cluster data\r
for( ; count; count -- )\r
{\r
- if(cluster == -1) {\r
+ if(cluster == GETFATVALUE_EOC) {\r
Log_Warning("FAT", "Read past End of Cluster Chain (Bulk)");\r
LEAVE('X', pos);\r
return pos;\r
while( Offset > disk->BytesPerCluster )\r
{\r
cluster = FAT_int_GetFatValue( disk, cluster );\r
- if(cluster == -1) {\r
+ if(cluster == GETFATVALUE_EOC) {\r
Log_Warning("FAT", "EOC Unexpectedly Reached");\r
LEAVE('i', 0);\r
return 0;\r
\r
// Get next cluster (allocating if needed)\r
tmpCluster = FAT_int_GetFatValue(disk, cluster);\r
- if(tmpCluster == -1) {\r
+ if(tmpCluster == GETFATVALUE_EOC) {\r
tmpCluster = FAT_int_AllocateCluster(disk, cluster);\r
if( tmpCluster == 0 )\r
goto ret_incomplete;\r
\r
// Get next cluster (allocating if needed)\r
tmpCluster = FAT_int_GetFatValue(disk, cluster);\r
- if(tmpCluster == -1) {\r
+ if(tmpCluster == GETFATVALUE_EOC) {\r
bNewCluster = 1;\r
tmpCluster = FAT_int_AllocateCluster(disk, cluster);\r
if( tmpCluster == 0 )\r