M2libc icon indicating copy to clipboard operation
M2libc copied to clipboard

`fopen` with "a" doesn't work for UEFI

Open gtker opened this issue 10 months ago • 2 comments

M2-Mesoplanet has functionality that requires append mode. This wasn't implemented for UEFI since there wasn't a straightforward way to implement it.

As far as I can tell UEFI doesn't natively support appending to files. An alternative could be seeking to the end of the file when it is opened to effectively append.

gtker avatar Apr 30 '25 13:04 gtker

Is it not just updating this line https://github.com/oriansj/M2libc/blob/8964ae6adb22fc5e89189bc34bc9b18c48c057c5/uefi/fcntl.c#L71 ?

At least I can see that I had to do some extra work for truncating file, so presumably it appends by default.

stikonas avatar May 14 '25 17:05 stikonas

It might be, I couldn't find any sort of EFI_FILE_MODE_APPEND so I wasn't sure if it was supported.

gtker avatar May 16 '25 12:05 gtker

Not needed anymore I guess...

stikonas avatar Jun 19 '25 00:06 stikonas