Re: [PATCH 4/7] rust: fs: add iminor() helper
From: Daniel Almeida
Date: Fri Oct 09 2026 - 13:46:28 EST
> On 14 Aug 2026, at 20:09, Danilo Krummrich <dakr@xxxxxxxxxx> wrote:
>
> 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
>
>
Reviewed-by: Daniel Almeida <daniel.almeida@xxxxxxxxxxxxx>