diff mbox series

[RFC,v2,08/30] rust: file: move `kernel::file` to `kernel::fs::file`

Message ID 20240514131711.379322-9-wedsonaf@gmail.com (mailing list archive)
State New, archived
Headers show
Series Rust abstractions for VFS | expand

Commit Message

Wedson Almeida Filho May 14, 2024, 1:16 p.m. UTC
From: Wedson Almeida Filho <walmeida@microsoft.com>

This is in preparation for making `File` parametrised on the file system
type, so we can get a typed inode in file system implementations that
have data attached to inodes.

Signed-off-by: Wedson Almeida Filho <walmeida@microsoft.com>
---
 rust/kernel/fs.rs            | 1 +
 rust/kernel/{ => fs}/file.rs | 2 +-
 rust/kernel/lib.rs           | 1 -
 3 files changed, 2 insertions(+), 2 deletions(-)
 rename rust/kernel/{ => fs}/file.rs (99%)
diff mbox series

Patch

diff --git a/rust/kernel/fs.rs b/rust/kernel/fs.rs
index f32c2f89f781..20fb6107eb4b 100644
--- a/rust/kernel/fs.rs
+++ b/rust/kernel/fs.rs
@@ -14,6 +14,7 @@ 
 use sb::SuperBlock;
 
 pub mod dentry;
+pub mod file;
 pub mod inode;
 pub mod sb;
 
diff --git a/rust/kernel/file.rs b/rust/kernel/fs/file.rs
similarity index 99%
rename from rust/kernel/file.rs
rename to rust/kernel/fs/file.rs
index b7ded0cdd063..908e2672676f 100644
--- a/rust/kernel/file.rs
+++ b/rust/kernel/fs/file.rs
@@ -76,7 +76,7 @@  pub mod flags {
     /// # Examples
     ///
     /// ```
-    /// use kernel::file;
+    /// use kernel::fs::file;
     /// # fn do_something() {}
     /// # let flags = 0;
     /// if (flags & file::flags::O_ACCMODE) == file::flags::O_RDONLY {
diff --git a/rust/kernel/lib.rs b/rust/kernel/lib.rs
index e664f80b8141..81065d1bd679 100644
--- a/rust/kernel/lib.rs
+++ b/rust/kernel/lib.rs
@@ -30,7 +30,6 @@ 
 pub mod block;
 mod build_assert;
 pub mod error;
-pub mod file;
 pub mod fs;
 pub mod init;
 pub mod ioctl;