Permalink
Browse files

Make sure FAT32 filesystems contain a minimum of 65527 clusters

Some versions of windows cannot handle FAT32 filesystems with less
than 65527 clusters, so make sure we don't create such beasts.

Change-Id: Id00fb02c4f8476f7dcc0ef137bd9e4975d740591
  • Loading branch information...
Ken Sumrall
Ken Sumrall committed Dec 15, 2011
1 parent b012679 commit ec3b164524fda0beb30354627f3e3f9d0c45126a
Showing with 2 additions and 1 deletion.
  1. +2 −1 toolbox/newfs_msdos.c
View
@@ -431,7 +431,8 @@ newfs_msdos_main(int argc, char *argv[])
bpb.spc = 8;
else if (bpb.bsec <= (1<<19)) /* 256M -> 8k */
bpb.spc = 16;
- else if (bpb.bsec <= (1<<21)) /* 1G -> 16k */
+ else if (bpb.bsec <= (1<<22)) /* 2G -> 16k, some versions of windows
+ require a minimum of 65527 clusters */
bpb.spc = 32;
else
bpb.spc = 64; /* otherwise 32k */

0 comments on commit ec3b164

Please sign in to comment.