]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EmbeddedPkg/Library/EfiFileLib/EfiFileLib.c
Fix issue with making a seek to zero on an FV file legal.
[mirror_edk2.git] / EmbeddedPkg / Library / EfiFileLib / EfiFileLib.c
index 2d53368c9f03eb91c8fa1185151e11cbaa021f4c..a68fbf099847da578c9517c377b7d6dbc77962e6 100644 (file)
@@ -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;
+      }
     }
   }