mirror of
https://github.com/reactos/reactos.git
synced 2024-08-17 08:58:30 +00:00
[FREELDR] PXE: support backward seeking
svn path=/trunk/; revision=66035
This commit is contained in:
parent
cf89d4fdea
commit
f5ab68a2c6
|
@ -263,8 +263,13 @@ static ARC_STATUS PxeSeek(ULONG FileId, LARGE_INTEGER* Position, SEEKMODE SeekMo
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
|
|
||||||
if (!_CachedFile && Position->LowPart < _FilePosition)
|
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));
|
RtlZeroMemory(&readData, sizeof(readData));
|
||||||
readData.Buffer.segment = ((UINT32)_Packet & 0xf0000) / 16;
|
readData.Buffer.segment = ((UINT32)_Packet & 0xf0000) / 16;
|
||||||
|
|
Loading…
Reference in a new issue