-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add a helper module to parse /shared2/sys/SYSCONF #23
base: main
Are you sure you want to change the base?
Conversation
libstd’s runtime changed the prototype of lang = "start" in ddee45e1d7fd34563c13513d974f792fae41a2f7 to support changing the SIGPIPE behaviour on Linux, so this function now takes a third argument on every platform. Additionally, it now supports user_main() returning any Termination, so we don’t need a transmute() any longer. :)
412dcfb
to
a49503f
Compare
This fixes the build on current nightly (since 2023-04-22).
This lets us open file descriptors and perform actions on them. MINI uses a different protocol, so this can’t currently be used to talk with this Starlet firmware, see https://wiibrew.org/wiki/MINI TODO: Figure out why it only works on Dolphin and not on a real Wii.
This is done using the /dev/stm/immediate device, see https://wiibrew.org/wiki//dev/stm/immediate
This parsing is quite brittle, but should work as long as the Wii hasn’t been tempered with. See https://wiibrew.org/wiki//shared2/sys/SYSCONF
BigArray(Vec<u8>), | ||
SmallArray(Vec<u8>), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think allocations are needed here, maybe use 'a [u8]
for both instead.
} | ||
|
||
/// Parsed structure containing the system settings. | ||
pub struct Sysconf(BTreeMap<String, Item>); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need something like this. We can make something similar without relying on allocations,
Maybe something like this to reduce allocations gist |
This parsing is quite brittle, but should work as long as the Wii hasn’t been tempered with.
See https://wiibrew.org/wiki//shared2/sys/SYSCONF
This is based on #21 and #22, and thus doesn’t work on the real hardware yet.