Error with the file handling in camkes tutorial
Hi all, I am trying to understand how the camkes system works. I get stuck up on a problem where I tried to change the code of camkes 1 tutorial ( https://docs.sel4.systems/Tutorials/hello-camkes-1.html) a bit. In a simple sender receiver code, I tried to write the contents, received by the receiver, in a file. But, while doing it I got the following error message. The error message was not letting me to create a file in any mode. When using read mode with FILE *fptr = fopen("xxxyyyzzz", "r"); I encountered the following message: sys_open_impl@sys_io.c:205 Failed to open file xxxyyyzzz FAULT HANDLER: data fault from client1.control (ID 0x1) on address 0, pc = 0x411754, fsr = 0x4 FAULT HANDLER: rip = 0x411754 FAULT HANDLER: rsp = 0x528ae8 When using write mode with FILE *fptr = fopen("xxxyyyzzz", "w"); I encountered the following message: sys_open_impl@sys_io.c:191 Open only supports O_RDONLY, not 0x241 on xxxyyyzzz Assertion failed: flags == O_RDONLY (../projects/seL4_libs/libsel4muslcsys/src/sys_io.c: sys_open_impl: 192) Kindly, suggest me a way out or let me know the reason if not possible. -Akshat
"Akshat" == Akshat Garg
writes:
Akshat> I am trying to understand how the camkes system works. I get Akshat> stuck up on a problem where I tried to change the code of Akshat> camkes 1 tutorial ( Akshat> https://docs.sel4.systems/Tutorials/hello-camkes-1.html) a Akshat> bit. In a simple sender receiver code, I tried to write the Akshat> contents, received by the receiver, in a file. But, while Akshat> doing it I got the following error message. The error message Akshat> was not letting me to create a file in any mode. Akshat> When using read mode with FILE *fptr = fopen("xxxyyyzzz", Akshat> "r"); seL4 doesn't have a file system or a disc device to talk to, so the stdio mechanisms for fopen() etc., are not implemented. If you want to save things to a file, you'll need to implement a file system and a disc device. Peter C -- Dr Peter Chubb Tel: +61 2 9490 5852 http://ts.data61.csiro.au/ Trustworthy Systems Group CSIRO's Data61
participants (2)
-
Akshat Garg
-
Chubb, Peter (Data61, Kensington NSW)