In message <[email protected]>
          Christian Helmuth <[email protected]> wrote:

> Hello Michael,

> On Tue, Feb 06, 2024 at 13:08:22 CET, Michael Grunditz wrote:
>> Is open() read() close() supposed to work? For me they doesn‘t. It
>> works sometimes but not all times. It also doesn‘t read the file it
>> just reads the first bytes or kbytes if large file.

> Yes, those functions are supposed to work and also do in quite some
> components, most of them ported applications. Could you be a bit more
> specific about the parameters and results in failing cases?

I basicly do:
open read only
fstat to get file size
malloc a buffer with that size
read from it using that size
close the file

>> fopen fread fclose is ok and stat.

> This hints the libc implementation copes with corner cases of the
> low-level functions your code does not.

I have changed most of my code to use f* functions instead. It works just 
fine so no worries.

Thanks,
Michael

_______________________________________________
Genode users mailing list
[email protected]
https://lists.genode.org/listinfo/users

Reply via email to