I am trying to write a file with sys_write()
from inside the kernel but every time the file descriptor value is -2.I have tried many different paths for the file but every single one of them failed.Any idea why that happens?
fd = sys_open( "test.txt" , 0, O_RDWR | O_CREAT);sys_write(fd, "test\n", strlen("test\n"));