Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8218b6aa authored by Daniel Rosenberg's avatar Daniel Rosenberg
Browse files

newfs_msdos: Set sectors per fat once



There was an issue causing the fat size to shrink too small, causing
a fsck check to fail.

Bug: 17949028
Bug: 17761281
Change-Id: Id0207f2ab44e57ff81f5a53494b45344822a6495
Signed-off-by: default avatarDaniel Rosenberg <drosen@google.com>
parent 3fe9adc9
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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) {
            if (!bpb.bspf) {
                bpb.bspf = x2;
            }
            x1 += (bpb.bspf - 1) * bpb.nft;
        }
        if(set_res) {