From 13642ab159eb6b7ecc7682f1861d994d612f0c2b Mon Sep 17 00:00:00 2001 From: Yousef Moazzam Date: Sat, 24 May 2025 21:29:14 +0100 Subject: [PATCH] Clarify bit position using most/least significant bit terminology --- src/node.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/node.rs b/src/node.rs index 2963ab2d3a..0449557bc1 100644 --- a/src/node.rs +++ b/src/node.rs @@ -89,10 +89,10 @@ type BlockListL4 = BlockList; #[repr(C, packed)] pub struct Node { /// This node's type & permissions. - /// - first four bits are the node's type + /// - four most significant bits are the node's type /// - 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 least significant bits are permissions for everyone else pub mode: Le, /// The uid that owns this file @@ -223,10 +223,10 @@ impl Node { } /// This node's type & permissions. - /// - first four bits are the node's type + /// - four most significant bits are the node's type /// - 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 least significant bits are permissions for everyone else pub fn mode(&self) -> u16 { self.mode.to_ne() }