diff options
author | Daniel Rosenberg <drosen@google.com> | 2014-10-10 23:38:45 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-10-10 23:38:45 +0000 |
commit | 8bdcc99d60a5e8f6a7b66446030d23c2158ef2cd (patch) | |
tree | b720efd930dcf8f47e0dde061a0cb40c32c7a3a5 /toolbox | |
parent | ee80cf87553be3f21223b12d2118a252e75acf02 (diff) | |
parent | 8218b6aae9cd4a19fa074a8a8203fe9275b35447 (diff) | |
download | core-8bdcc99d60a5e8f6a7b66446030d23c2158ef2cd.tar.gz core-8bdcc99d60a5e8f6a7b66446030d23c2158ef2cd.tar.bz2 core-8bdcc99d60a5e8f6a7b66446030d23c2158ef2cd.zip |
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.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/toolbox/newfs_msdos.c b/toolbox/newfs_msdos.c index f69987cfd..01517fd2d 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) { |