pbatard / EfiFs

EFI FileSystem drivers
https://efi.akeo.ie
GNU General Public License v3.0
506 stars 77 forks source link

support SetPosition value 0xFFFFFFFFFFFFFFFF meaning SEEK_END #31

Closed sergeystepanovx closed 3 years ago

sergeystepanovx commented 3 years ago

Hi!

I'd like to propose the following fix:

I understand the motivation for forbidding seeks past the end of the file in read-only drivers, but this value has a special meaning and it is already possible to set the position to the end of file by explicitly specifying its size or reading the entire file.

pbatard commented 3 years ago

You are correct.

This is actually something I added in the other UEFI NTFS driver I have (which was written from the get go to be a lot more specs compliant than EfiFs), and that I was planning to retrofit into EfiFs, so thanks for sending a patch.