[USETUP]: Improve the bootsector validity check performed in IsThereAValidBootSector:
authorHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Tue, 9 May 2017 15:31:53 +0000 (15:31 +0000)
committerHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Tue, 9 May 2017 15:31:53 +0000 (15:31 +0000)
commitf06734e55df48d896438e08cc283e3806bcca521
tree66f6ae4d4025dab6bce534228898ec8a9317e24b
parent16e06b89aafc560e95edd28e298cdf07966f41fe
[USETUP]: Improve the bootsector validity check performed in IsThereAValidBootSector:
- Check for the first 3 bytes (and not 4) of the bootsector to not be zero (that's our criterium for a "valid instruction"). Therefore, a bootsector starting with "00 00 00 xx" (with xx the first byte of a volume identifier) is detected as invalid (because the BIOS won't be able to run it anyways) and therefore, needs to be overwritten.
- Check that its last 2 bytes are the valid 0xAA55 signature.
These improvements were suggested by Serge Gautherie and Peter Hater.
CORE-4870 CORE-12672 CORE-13188
- Move a DPRINT1 around.

svn path=/trunk/; revision=74512
reactos/base/setup/usetup/bootsup.c
reactos/base/setup/usetup/interface/usetup.c