-
Notifications
You must be signed in to change notification settings - Fork 0
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
Fix constants fs #98
Fix constants fs #98
Conversation
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.
Awesome! Minor suggestions
src/constants/mod.rs
Outdated
|
||
// ===== Memory Protection Flags ===== | ||
// Source: include/uapi/asm-generic/mman-common.h | ||
// These flags control memory segment permissions for mmap and mprotect |
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.
Would it be better to move those to vmmap_constant.rs?
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.
removed them from mod.rs
src/constants/mod.rs
Outdated
pub const O_TRUNC: i32 = 0o1000; // Truncate file to zero length | ||
pub const O_APPEND: i32 = 0o2000; // Append mode - writes always at end | ||
|
||
// ===== File Types ===== |
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'm a bit confused why we keep those here instead of moving to corresponding files?
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.
removed them from mod.rs
src/safeposix/cage.rs
Outdated
|
||
// Remove these old imports since we're using the central constants module now | ||
// pub use super::syscalls::fs_constants::*; |
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.
Would be better to delete directly
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.
Removed commtented code
src/safeposix/syscalls/mod.rs
Outdated
pub use sys_calls::*; | ||
pub use sys_constants::*; | ||
|
||
// Removed constants after centralisation |
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.
Same as before
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.
Removed commtented code
@@ -0,0 +1,55 @@ | |||
//! Virtual Memory Mapping Constants Module |
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 think we should get rid of this file and move all of this to fs_constants
This is great, love the way you set this up. Can you make the change to combine vmmap constants into fs constants. Then I'd like you to set up this PR to be into the monorepo since we're going to deprecate this repository shortly. |
Closing this PR since changes were ported on the monorepo |
Description
Fixes - Review and document constants in Lind-WASM
(Lind-Project/lind-wasm#46)
(Lind-Project/lind-wasm#30)
This PR reviews and updates the constants defined in the following files:
src/constants/mod.rs
src/constants/fs_constants.rs
src/constants/net_constants.rs
src/constants/sys_constants.rs
src/constants/vmmap_constants.rs
Key changes:
Type of change
How Has This Been Tested?
cargo build
Checklist: