-
-
Notifications
You must be signed in to change notification settings - Fork 65
Fix errors in the C code #129
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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.
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.
Although in theory the mountpoint_t structure should point somehow to the device, we are not covering it in the book yet (and is not even mentioend) so for the purpose of the chapter is not really needed. And also in case we add it in the future, I don't think it should be a
char *but probably a a new kerneld data structure, containing the device information. So for now is not really necessary to add it.Uh oh!
There was an error while loading. Please reload this page.
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 added this because there is a part where the device is initialized in a
mountpoint_t:Uh oh!
There was an error while loading. Please reload this page.
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 assumed it was a
char *, since the device from vfs_mount() is also one: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.
Ahaha you are right!
I forgot about it, and I probably should have checked.
I kind of understand maybe why I did it, but I think I overlooked at that part. Probably was more to explain the idea behind the function, so It was kept as a char. Probably this part should be improved because what I think will most likely happen under the hood is that using the string
device, thevfs_mountfunction will search for the device that has that name (or mountpoint or whatever it is) and return a pointer to it. And that should be the one stored into thenew_mountpointstruct.@oito8bits if you want you can try to fix this part (of course feele free to ask here or on discord if you have any question) , otherwise if you don't have time, or not sure how to improve it, let me know and I'll merge this PR as it is and hopefully I'll fix it myself (or @DeanoBurrito ) in the future.
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 haven’t implemented this in my kernel yet, so I can’t say for sure how this structure will look. You can go ahead and merge it, and maybe in the future I’ll add it if you guys haven’t done it already.