diff options
author | Laszlo Ersek <lersek@redhat.com> | 2018-08-17 14:55:23 +0200 |
---|---|---|
committer | Laszlo Ersek <lersek@redhat.com> | 2018-08-22 10:31:47 +0200 |
commit | 5dbc768f1cd988b87932ba2f176caa006064018d (patch) | |
tree | c3a82e3703e6bc0d96766f16905123cabe79505c /BaseTools/Source/Python/sitecustomize.py | |
parent | e0c93c9b76153bc5a95bf174dab9805ec2f2942c (diff) | |
download | edk2-5dbc768f1cd988b87932ba2f176caa006064018d.tar.gz edk2-5dbc768f1cd988b87932ba2f176caa006064018d.tar.bz2 edk2-5dbc768f1cd988b87932ba2f176caa006064018d.zip |
MdePkg/UefiLib: don't special-case EFI_FILE_MODE_CREATE in OpenMode
While reviewing the patch that would land as 768b611136d0
("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>
Diffstat (limited to 'BaseTools/Source/Python/sitecustomize.py')
0 files changed, 0 insertions, 0 deletions