mirror of
https://github.com/reactos/reactos.git
synced 2025-05-22 18:45:00 +00:00
[FREELDR] PXE: support backward seeking
svn path=/trunk/; revision=66035
This commit is contained in:
parent
cf89d4fdea
commit
f5ab68a2c6
1 changed files with 7 additions and 2 deletions
|
@ -263,8 +263,13 @@ static ARC_STATUS PxeSeek(ULONG FileId, LARGE_INTEGER* Position, SEEKMODE SeekMo
|
|||
return EINVAL;
|
||||
|
||||
if (!_CachedFile && Position->LowPart < _FilePosition)
|
||||
// We don't support backward seek without caching
|
||||
return EINVAL;
|
||||
{
|
||||
// Close and reopen the file to go to position 0
|
||||
if (PxeClose(FileId) != ESUCCESS)
|
||||
return EIO;
|
||||
if (PxeOpen(_OpenFileName, OpenReadOnly, &FileId) != ESUCCESS)
|
||||
return EIO;
|
||||
}
|
||||
|
||||
RtlZeroMemory(&readData, sizeof(readData));
|
||||
readData.Buffer.segment = ((UINT32)_Packet & 0xf0000) / 16;
|
||||
|
|
Loading…
Reference in a new issue