You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/05/27 05:40:47 UTC

[GitHub] [incubator-nuttx] jlaitine edited a comment on pull request #3785: FAT32 fix skipping sectors at computing the number of free clusters

jlaitine edited a comment on pull request #3785:
URL: https://github.com/apache/incubator-nuttx/pull/3785#issuecomment-849337616


   > Free cluster summary wrong (131702 vs. really 131704)
   >   Auto-correcting.
   
   Just quickly browsing through the code again; this also *may* be wrong:
   
   ---
         /* Examine each cluster in the fat */
   
         for (cluster = fs->fs_nclusters; cluster > 0; cluster--)
   ---
   It looks to me that fs->fs_nclusters counts for all the clusters, including the reserved 2 ones, but those two first ones should not be counted to the free clusters. Maybe this should just read "for (cluster = fs->fs_nclusters; cluster > 2; cluster--)"
   
   But I think the orginal patch was right.
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org