Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

littlefs returns EINVAL on writing to RDONLY file #19

Closed
geky opened this issue Jan 29, 2018 · 1 comment
Closed

littlefs returns EINVAL on writing to RDONLY file #19

geky opened this issue Jan 29, 2018 · 1 comment

Comments

@geky
Copy link
Member

geky commented Jan 29, 2018

For writing to RDONLY file, littlefs currently returns EINVAL, and for reading a WRONLY file, littlefs return EINVAL. According to the open group standard, this should be EBADF:
http://pubs.opengroup.org/onlinepubs/9699919799/functions/write.html

See lines:
https://github.com/geky/littlefs/blob/master/lfs.c#L1546
https://github.com/geky/littlefs/blob/master/lfs.c#L1490

@geky
Copy link
Member Author

geky commented Feb 4, 2018

fixed in a25743a

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant