Skip to content
This repository has been archived by the owner on Jun 19, 2024. It is now read-only.

Implement wrapper over kernel VFS APIs. #103

Open
Tropix126 opened this issue Mar 9, 2024 · 0 comments
Open

Implement wrapper over kernel VFS APIs. #103

Tropix126 opened this issue Mar 9, 2024 · 0 comments
Labels
type:enhancement New feature or request

Comments

@Tropix126
Copy link
Member

What's the motivation for this feature?

The PROS kernel maintains a virtual filesystem (VFS) that stubs newlib's filesystem API calls. This allows access to:

  • The microsd card's filesystem (if available).
  • UNIX-style device access at /dev/.
  • The PROS serial driver at /ser/ that manages stdout and stdin.

Describe the solution you'd like

Add an std::fs-style API for accessing vfs-related things.

Describe the drawbacks, if any

std::fs is a relatively large API surface to re-implement, since it'd also require polyfilling std::path as well. It's certainly doable though.

Describe the alternative solutions, if any

Not sure. Guess you could provide individual implementations for the serial driver and microsd card rather than a filesystem-type approach for everything, but it's probably best to go with that the kernel provides us.

Additional context

https://github.com/purduesigbots/pros/blob/master/src/system/dev/vfs.c

@Tropix126 Tropix126 added the type:enhancement New feature or request label Mar 9, 2024
@Tropix126 Tropix126 changed the title Implement wrapper over PROS' VFS APIs. Implement wrapper over kernel VFS APIs. Mar 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type:enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant