aboutsummaryrefslogtreecommitdiffstats
path: root/toolbox
diff options
context:
space:
mode:
authorKen Sumrall <ksumrall@android.com>2011-12-14 21:28:27 -0800
committerKen Sumrall <ksumrall@android.com>2012-03-29 21:05:46 -0700
commitec3b164524fda0beb30354627f3e3f9d0c45126a (patch)
tree68f8e24017c6f2c7b8a82535d8677365a22ceb80 /toolbox
parentb012679f9730908aa8e7fa6909a401fab47aaefb (diff)
downloadsystem_core-ec3b164524fda0beb30354627f3e3f9d0c45126a.zip
system_core-ec3b164524fda0beb30354627f3e3f9d0c45126a.tar.gz
system_core-ec3b164524fda0beb30354627f3e3f9d0c45126a.tar.bz2
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
Diffstat (limited to 'toolbox')
-rw-r--r--toolbox/newfs_msdos.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/toolbox/newfs_msdos.c b/toolbox/newfs_msdos.c
index ff9e844..6d78eb6 100644
--- a/toolbox/newfs_msdos.c
+++ b/toolbox/newfs_msdos.c
@@ -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 */