vfs/stdio: cleanup STDIO mapping for vfs#9790
Merged
jnohlgard merged 1 commit intoRIOT-OS:masterfrom Aug 31, 2018
Merged
Conversation
This was referenced Aug 16, 2018
Member
|
I think this one needs a rebase. |
c171722 to
aabf34d
Compare
Contributor
Author
|
rebased as #9503 is now merged. |
jnohlgard
approved these changes
Aug 30, 2018
Member
jnohlgard
left a comment
There was a problem hiding this comment.
Looks good, tested on frdm-k64f. Please fix the typos before merging
sys/vfs/vfs_stdio.c
Outdated
| #include "stdio_base.h" | ||
| #include "vfs.h" | ||
|
|
||
| static ssize_t _stio_read(vfs_file_t *filp, void *dest, size_t nbytes) |
sys/vfs/vfs_stdio.c
Outdated
| * @brief VFS file operation table for stdin/stdout/stderr | ||
| */ | ||
| static vfs_file_ops_t _stdio_ops = { | ||
| .read = _stio_read, |
Contributor
Author
|
fixed typo |
aabf34d to
e09c7ae
Compare
e09c7ae to
b837e65
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contribution description
The STDIO code for the
vfsmodule was basically duplicated forstdio_uartandstdio_rtt. This PR unifies this shared code into thevfsmodule and hooks it into the STDIO intialization for rtt and uart.IMHO this is not the perfect solution w.r.t. to the duplicated 3 line 'ifdefs' in the stdio implementations, but it improves the situation a bit. So I think this is a good intermediate step, until we find a more elegant structure for some of the STDIO code in general (e.g. separate
ethosandstdio_uarteven more, integrate slip, etc).Issues/PRs references
based on #9503