Merge branch 'improve-node-mode-docstrings' into 'master'
Improve node mode docstrings See merge request redox-os/redoxfs!90
This commit is contained in:
+8
-8
@@ -89,10 +89,10 @@ type BlockListL4 = BlockList<BlockListL3>;
|
||||
#[repr(C, packed)]
|
||||
pub struct Node {
|
||||
/// This node's type & permissions.
|
||||
/// - first four bits are permissions
|
||||
/// - next four bits are permissions for the file's user
|
||||
/// - next four bits are permissions for the file's group
|
||||
/// - last four bits are permissions for everyone else
|
||||
/// - four most significant bits are the node's type
|
||||
/// - next four bits are permissions for the node's user
|
||||
/// - next four bits are permissions for the node's group
|
||||
/// - four least significant bits are permissions for everyone else
|
||||
pub mode: Le<u16>,
|
||||
|
||||
/// The uid that owns this file
|
||||
@@ -223,10 +223,10 @@ impl Node {
|
||||
}
|
||||
|
||||
/// This node's type & permissions.
|
||||
/// - first four bits are permissions
|
||||
/// - next four bits are permissions for the file's user
|
||||
/// - next four bits are permissions for the file's group
|
||||
/// - last four bits are permissions for everyone else
|
||||
/// - four most significant bits are the node's type
|
||||
/// - next four bits are permissions for the node's user
|
||||
/// - next four bits are permissions for the node's group
|
||||
/// - four least significant bits are permissions for everyone else
|
||||
pub fn mode(&self) -> u16 {
|
||||
self.mode.to_ne()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user