Add a helper module to parse /shared2/sys/SYSCONF#23
Draft
linkmauve wants to merge 6 commits intorust-wii:mainfrom
Draft
Add a helper module to parse /shared2/sys/SYSCONF#23linkmauve wants to merge 6 commits intorust-wii:mainfrom
linkmauve wants to merge 6 commits intorust-wii:mainfrom
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
Comment on lines
+13
to
+14
| BigArray(Vec<u8>), | ||
| SmallArray(Vec<u8>), |
Collaborator
There was a problem hiding this comment.
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>); |
Collaborator
There was a problem hiding this comment.
I don't think we need something like this. We can make something similar without relying on allocations,
Collaborator
|
Maybe something like this to reduce allocations gist |
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.
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.