Tags: pbatard/uefi-ntfs
Tags
Fix unloading of drivers for some platforms/medias * Depending on the platform/media, the file system handle may have additional "phantom" disk instances with no drivers attached. * As a result our assertion that OpenInfoCount will always be 1 is wrong and we must ensure that we process all the open disk protocols until we find one with a driver we can unload.
Replace potentially dodgy native file system drivers instead of attem… …pting to use them * Because of the AMI NTFS driver bug (https://github.com/pbatard/AmiNtfsBug) as well as reports of issues when using NTFS drivers different from ours, we now unconditionally try to unload any native file system driver that is servicing our target partition, so that we can replace it with one we trust. * Also make sure we reference SupportedLanguages in GetDriverName() rather than the empty string, as not all drivers produce a name when using the empty string.
check that the loaded driver is of EFI subsystem 'Boot System Driver' * This is needed for HP UEFI firmwares, who apparently won't start drivers that are of a different type, such as 'Runtime Driver' * Also avoid using HandleProtocol() as advised by the UEFI specs and improve the output of DisconnectBlockingDrivers()
PreviousNext