On Sun, Jan 21, 2018 at 04:02:10PM +0100, C. Masloch wrote: > The definition of bpb's num_total_sectors_16 and num_total_sectors_32 > is that either the 16-bit field is non-zero and is used (in which case > eg mkfs.fat sets the 32-bit field to zero), or it is zero and the > 32-bit field is used. Therefore, a BPB is invalid only if *both* > fields are zero; having one field as zero and the other as non-zero is > the case to be expected.
Could you provide reference to the spec which says that? > This affects all users of grub_chainloader_patch_bpb which are in > chainloader.c, freedos.c, and ntldr.c I am happy that you fix that issue but https://en.wikipedia.org/wiki/Design_of_the_FAT_file_system#BPB331_OFS_15h shows that life is more complicated. Could you take that into account? > Tested with lDebug booted in qemu via grub2's > FreeDOS direct loading support, refer to > https://bitbucket.org/ecm/ldosboot + https://bitbucket.org/ecm/ldebug Could you put your SOB here? Daniel _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel