Implement basic VFS#32
Conversation
107b5c0 to
01752a2
Compare
de20a16 to
5272c2f
Compare
|
Good protocol very nice, good documentation 🫶🏻 |
…istent with its declaration in .h file
…istent with its declaration in .h file
| Inx - Index | ||
|
|
||
| ## K | ||
| Kompot - VFS FS Server Communication Protocoll |
There was a problem hiding this comment.
I'm not sure whether a panic, even a debug one, should be in this pr.
There was a problem hiding this comment.
We needed a way to panic (for unwraps, etc.)
We kind-of assume such functionality will be on master when we merge (if so, then in a future rebase we will remove our solution)
| [[nodiscard]] | ||
| size_or_err_t pstring_concat(pstring_t* dest, const pstring_t* first, const pstring_t* second); | ||
|
|
||
| #define PSTRING_WRITE(type) \ |
There was a problem hiding this comment.
Is there a reason for using this instead of _Generic ?
There was a problem hiding this comment.
ummmmm
Probably not...
If I were to make one up I would say that this way we could create 'private' definitions of pstring write with such macro.
But looking at this again we could just wrap pstring_memmove with with some sizeof inside and get the same features _Generic could provide without type switching
We would lose some performance that
inlineallows, but we do not care about that now.
| } | ||
| } | ||
|
|
||
| static void vfs_test_pipes() { |
There was a problem hiding this comment.
In my opinion test functionalities should be somewhat separated from the actually functional stuff
There was a problem hiding this comment.
There are plans to create some unit-testing solution, will see how it goes
Also we do not currently implement public api (no syscalls etc) so this is the only place to sanity-check our code
in summary: this will not be here in future
| while (*s) dputc(*s++); | ||
| } | ||
|
|
||
| void dputps(const pstring_t* ps) { |
There was a problem hiding this comment.
This was done to death in other pr's and even the current main repo. Please pull the existing stuff to avoid future merge conflicts
There was a problem hiding this comment.
Current main does not implement pedantic-strings – this type originated in vfs
but there would be some reason in merging it into main in different pr
|
I'm not sure if this is a |

fddata structureopen/closesyscallsstatalongside some file info structureread/writesyscalls/dev/randomas a simple demo of vfs driverprocfsas a complete demo of vfs driver