Closed damianloew closed 1 year ago
According to POSIX it should return 0 instead of -1 in the following case:
int main(void) { int fd; fd = open("testfile", O_RDWR | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR); printf("ret = %d\n", write(fd, NULL, 0)); return 0; }
https://pubs.opengroup.org/onlinepubs//9699919799.2018edition/ -> pwrite, write - write on a file
Line of code that causes issue: https://github.com/phoenix-rtos/phoenix-rtos-filesystems/blob/b699b05c6d8d7f97944771cdb57bb1659cd87696/dummyfs/dummyfs.c#L755-L756
Needed for running all libc unit tests on dummyfs targets
According to POSIX it should return 0 instead of -1 in the following case:
https://pubs.opengroup.org/onlinepubs//9699919799.2018edition/ -> pwrite, write - write on a file
Line of code that causes issue: https://github.com/phoenix-rtos/phoenix-rtos-filesystems/blob/b699b05c6d8d7f97944771cdb57bb1659cd87696/dummyfs/dummyfs.c#L755-L756