[PATCH 4/7] rust: fs: add iminor() helper

From: Danilo Krummrich

Date: Fri Aug 14 2026 - 19:09:54 EST


Add a Rust helper for iminor(), which extracts the minor number from a
struct inode. This is a static inline function in the C headers, so
bindgen does not generate a binding for it.

Signed-off-by: Danilo Krummrich <dakr@xxxxxxxxxx>
---
rust/helpers/fs.c | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/rust/helpers/fs.c b/rust/helpers/fs.c
index 789d60fb8908..d6f9782db178 100644
--- a/rust/helpers/fs.c
+++ b/rust/helpers/fs.c
@@ -10,3 +10,8 @@ __rust_helper struct file *rust_helper_get_file(struct file *f)
{
return get_file(f);
}
+
+__rust_helper unsigned int rust_helper_iminor(const struct inode *inode)
+{
+ return iminor(inode);
+}
--
2.55.0