audk/MdePkg/Library
Marvin Haeuser 6407186db9 MdePkg/UefiFileHandleLib: Tolerate more Root handle FileNames
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2295

The current implementation of the FileHandleGetFileName() function
assumes that the Root directory always has the FileName '\0'.
However, the only requirement the UEFI specification defines is that
a prepended '\\' must be supported to access files and folders
relative to the Root directory.
This patch removes this assumption and supports constructing valid
paths for any value of FileName for the Root Directory.

In practice, this fixes compatibility issues with File System drivers
that report '\\' as the FileName of the Root directory, which
currently is both generating an invalid path ("\\\\") and resulting
in an EFI_NOT_FOUND result from the CurrentHandle->Open() call.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Marvin Haeuser <mhaeuser@outlook.de>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
2019-11-04 08:52:57 +08:00
..
BaseCacheMaintenanceLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BaseCpuLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BaseDebugLibNull MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BaseDebugLibSerialPort MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BaseDebugPrintErrorLevelLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BaseExtractGuidedSectionLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BaseIoLibIntrinsic MdePkg BaseIoLibIntrinsic: Remove __inline__ attribute for IO functions 2019-10-24 09:41:32 +08:00
BaseLib MdePkg/BaseLib: Base64Decode(): don't declare variables in nested blocks 2019-07-17 16:36:57 +02:00
BaseMemoryLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BaseMemoryLibMmx MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BaseMemoryLibOptDxe MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BaseMemoryLibOptPei MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BaseMemoryLibRepStr MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BaseMemoryLibSse2 MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BaseOrderedCollectionRedBlackTreeLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BasePcdLibNull MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BasePciCf8Lib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BasePciExpressLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BasePciLibCf8 MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BasePciLibPciExpress MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BasePciSegmentInfoLibNull MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BasePciSegmentLibPci MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BasePeCoffExtraActionLibNull MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BasePeCoffGetEntryPointLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BasePeCoffLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BasePerformanceLibNull MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BasePostCodeLibDebug MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BasePostCodeLibPort80 MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BasePrintLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BaseReportStatusCodeLibNull MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BaseRngLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BaseS3BootScriptLibNull MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BaseS3IoLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BaseS3PciLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BaseS3PciSegmentLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BaseS3SmbusLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BaseS3StallLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BaseSafeIntLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BaseSerialPortLibNull MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BaseSmbusLibNull MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BaseStackCheckLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BaseSynchronizationLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BaseTimerLibNullTemplate MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
BaseUefiDecompressLib MdePkg/BaseUefiDecompressLib: Add missing description for parameter 2019-08-13 17:16:14 +08:00
DxeCoreEntryPoint MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
DxeCoreHobLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
DxeExtractGuidedSectionLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
DxeHobLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
DxeHstiLib MdePkg/DxeHstiLib: Added checks to improve error handling. 2019-09-02 12:17:56 +08:00
DxeIoLibCpuIo2 MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
DxePcdLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
DxeRuntimeDebugLibSerialPort MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
DxeRuntimePciExpressLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
DxeServicesLib MdePkg/DxeServicesLib: remove bogus cast 2019-10-09 09:40:10 +02:00
DxeServicesTableLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
DxeSmbusLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
MmServicesTableLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
PciSegmentLibSegmentInfo MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
PeiCoreEntryPoint MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
PeiDxePostCodeLibReportStatusCode MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
PeiExtractGuidedSectionLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
PeiHobLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
PeiIoLibCpuIo MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
PeiMemoryAllocationLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
PeiMemoryLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
PeiPcdLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
PeiPciLibPciCfg2 MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
PeiPciSegmentLibPciCfg2 MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
PeiResourcePublicationLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
PeiServicesLib MdePkg/PeiServicesLib.c: Change comments of PeiServicesResetSystem2 2019-04-28 09:40:12 +08:00
PeiServicesTablePointerLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
PeiServicesTablePointerLibIdt MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
PeiSmbusLibSmbus2Ppi MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
PeimEntryPoint MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
SecPeiDxeTimerLibCpu MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
SmiHandlerProfileLibNull MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
SmmIoLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
SmmIoLibSmmCpuIo2 MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
SmmLibNull MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
SmmMemLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
SmmMemoryAllocationLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
SmmPciExpressLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
SmmPciLibPciRootBridgeIo MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
SmmPeriodicSmiLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
SmmServicesTableLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
StandaloneMmDriverEntryPoint MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
StandaloneMmServicesTableLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
UefiApplicationEntryPoint MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
UefiBootServicesTableLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
UefiDebugLibConOut MdePkg/UefiDebugLibConOut: Pass the correct buffer size 2019-11-04 08:52:01 +08:00
UefiDebugLibDebugPortProtocol MdePkg/UefiDebugLibDebugPortProtocol: Add destructor to CloseEvent 2019-07-29 11:01:40 +08:00
UefiDebugLibStdErr MdePkg/UefiDebugLibStdErr: Pass the correct buffer size 2019-11-04 08:52:04 +08:00
UefiDevicePathLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
UefiDevicePathLibDevicePathProtocol MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
UefiDriverEntryPoint MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
UefiFileHandleLib MdePkg/UefiFileHandleLib: Tolerate more Root handle FileNames 2019-11-04 08:52:57 +08:00
UefiLib MdePkg: UefiLib: Add a function to check if a language is supported 2019-09-17 09:39:04 +08:00
UefiMemoryAllocationLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
UefiMemoryLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
UefiPciLibPciRootBridgeIo MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
UefiPciSegmentLibPciRootBridgeIo MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
UefiRuntimeLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
UefiRuntimeServicesTableLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00
UefiScsiLib MdePkg: Implement SCSI commands for Security Protocol In/Out 2019-09-29 16:43:45 +08:00
UefiUsbLib MdePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:13 -07:00