diff options
author | andrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-02-11 03:21:18 +0000 |
---|---|---|
committer | andrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-02-11 03:21:18 +0000 |
commit | 127fd07c83470636318bc4d5fa7cc6188abfd39b (patch) | |
tree | 3b2d5591beac39edc5fdee77263777c50b415741 /EmbeddedPkg/Library/EfiFileLib/EfiFileLib.c | |
parent | ea0210023728e57519584432ac5cb6c11869b93d (diff) | |
download | edk2-127fd07c83470636318bc4d5fa7cc6188abfd39b.tar.gz edk2-127fd07c83470636318bc4d5fa7cc6188abfd39b.tar.bz2 edk2-127fd07c83470636318bc4d5fa7cc6188abfd39b.zip |
Fix issue with making a seek to zero on an FV file legal.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9979 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EmbeddedPkg/Library/EfiFileLib/EfiFileLib.c')
-rw-r--r-- | EmbeddedPkg/Library/EfiFileLib/EfiFileLib.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/EmbeddedPkg/Library/EfiFileLib/EfiFileLib.c b/EmbeddedPkg/Library/EfiFileLib/EfiFileLib.c index 2d53368c9f..a68fbf0998 100644 --- a/EmbeddedPkg/Library/EfiFileLib/EfiFileLib.c +++ b/EmbeddedPkg/Library/EfiFileLib/EfiFileLib.c @@ -1169,9 +1169,11 @@ EfiSeek ( if (File->Type == EfiOpenLoadFile || File->Type == EfiOpenFirmwareVolume) { if (!CompareGuid (&File->FvNameGuid, &gZeroGuid)) { - // LoadFile and FV do not support Seek - // You can seek on a raw FV device - return EFI_UNSUPPORTED; + if ((SeekType != EfiSeekStart) && (Offset != 0)) { + // LoadFile and FV do not support Seek + // You can seek on a raw FV device + return EFI_UNSUPPORTED; + } } } |