HomeFreeBSD

stand: Unbreak FAT32 in loader

Description

stand: Unbreak FAT32 in loader

This corrects an issue introduced in b4cb3fe0e39a3, where a freshly
allocated DOS_FS structure would not be initialized properly before
use in dos_open.

In case of FAT32 file systems, this would leave fs->dirents
uninitialized and - depending on its content and due to checks in
parsebs - prevent mounting the file system successfully.

This particularily impacted the EFI loader, as it was sometimes not
able to read files from a FAT32-formatted EFI partition, including
LoaderEnv (/efi/freebsd/loader.env).

Accepted by: imp
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D36482

(cherry picked from commit 0eb736c0f673d2804a0c8c14fa1e4eae228ab6d2)

Details

Provenance
gremboAuthored on Sep 7 2022, 4:56 PM
Differential Revision
D36482: stand: Unbreak FAT32 in loader
Parents
rGbf7ec3f9a9fc: stand: Parse all arguments passed by UEFI
Branches
Unknown
Tags
Unknown