summaryrefslogtreecommitdiffstats
path: root/toolbox
diff options
context:
space:
mode:
authorDaniel Rosenberg <drosen@google.com>2014-10-10 23:38:45 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-10-10 23:38:45 +0000
commit8bdcc99d60a5e8f6a7b66446030d23c2158ef2cd (patch)
treeb720efd930dcf8f47e0dde061a0cb40c32c7a3a5 /toolbox
parentee80cf87553be3f21223b12d2118a252e75acf02 (diff)
parent8218b6aae9cd4a19fa074a8a8203fe9275b35447 (diff)
downloadsystem_core-8bdcc99d60a5e8f6a7b66446030d23c2158ef2cd.zip
system_core-8bdcc99d60a5e8f6a7b66446030d23c2158ef2cd.tar.gz
system_core-8bdcc99d60a5e8f6a7b66446030d23c2158ef2cd.tar.bz2
am 8218b6aa: newfs_msdos: Set sectors per fat once
* commit '8218b6aae9cd4a19fa074a8a8203fe9275b35447': newfs_msdos: Set sectors per fat once
Diffstat (limited to 'toolbox')
-rw-r--r--toolbox/newfs_msdos.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/toolbox/newfs_msdos.c b/toolbox/newfs_msdos.c
index f69987c..01517fd 100644
--- a/toolbox/newfs_msdos.c
+++ b/toolbox/newfs_msdos.c
@@ -590,7 +590,9 @@ int newfs_msdos_main(int argc, char *argv[])
(bpb.spc * bpb.bps * NPB + fat / BPN * bpb.nft);
x2 = howmany((RESFTE + MIN(x, maxcls(fat))) * (fat / BPN), bpb.bps * NPB);
if (set_spf) {
- bpb.bspf = x2;
+ if (!bpb.bspf) {
+ bpb.bspf = x2;
+ }
x1 += (bpb.bspf - 1) * bpb.nft;
}
if(set_res) {