audk/MdePkg/Library/UefiLib
Laszlo Ersek 5dbc768f1c MdePkg/UefiLib: don't special-case EFI_FILE_MODE_CREATE in OpenMode
While reviewing the patch that would land as 768b611136
("MdePkg/UefiLib: introduce EfiOpenFileByDevicePath()", 2018-08-16), Ray
pointed out that distinguishing EFI_FILE_MODE_CREATE was wasteful. Per
spec, if the file to create exists, then EFI_FILE_MODE_CREATE is ignored
by EFI_FILE_PROTOCOL.Open(), and the existent file is opened.

Therefore we don't need an attempt to "open-but-not-create" first, and a
fallback to "open-and-create-too" second -- that behavior is internal to
EFI_FILE_PROTOCOL.Open(). Remove the special-casing of
EFI_FILE_MODE_CREATE.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Suggested-by: Ruiyu Ni <ruiyu.ni@intel.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1074
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2018-08-22 10:31:47 +02:00
..
Console.c MdePkg: Clean up source files 2018-06-28 11:19:47 +08:00
UefiDriverModel.c MdePkg: Clean up source files 2018-06-28 11:19:47 +08:00
UefiLib.c MdePkg/UefiLib: don't special-case EFI_FILE_MODE_CREATE in OpenMode 2018-08-22 10:31:47 +02:00
UefiLib.inf MdePkg/UefiLib: introduce EfiOpenFileByDevicePath() 2018-08-16 20:02:39 +02:00
UefiLib.uni MdePkg: Convert all .uni files to utf-8 2015-12-15 04:53:50 +00:00
UefiLibInternal.h MdePkg UefiLib: Make the event empty function public 2017-01-20 15:51:16 +08:00
UefiLibPrint.c MdePkg: Clean up source files 2018-06-28 11:19:47 +08:00
UefiNotTiano.c MdePkg: Clean up source files 2018-06-28 11:19:47 +08:00