Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

LittleFS: add overrides for Stream::send #8386

Merged
merged 3 commits into from
Nov 29, 2021

Conversation

d-a-v
Copy link
Collaborator

@d-a-v d-a-v commented Nov 26, 2021

fixes #8384

::availableForWrite() could unconditionnally return a full sector as free space like proposed in #8384.

This proposal aims at returning a non-0 size fitting the current file block.
If the block is full and the filesystem is not full, it returns a full-FS-block size.
This way, the API allows users to take proper actions without losing data from the input stream when the filesystem is full, even if there is generally little to do in such case.

Copy link
Collaborator

@earlephilhower earlephilhower left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. I didn't know about the lfs_file_t.off but it does seem to be what you're looking for. Nice!

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

Successfully merging this pull request may close these issues.

LittleFS missing availableForWrite()
2 participants