[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2025090821-saturate-phoney-3f53@gregkh>
Date: Mon, 8 Sep 2025 15:04:25 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Matthew Maurer <mmaurer@...gle.com>
Cc: Miguel Ojeda <ojeda@...nel.org>, Alex Gaynor <alex.gaynor@...il.com>,
Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>,
Björn Roy Baron <bjorn3_gh@...tonmail.com>,
Andreas Hindborg <a.hindborg@...nel.org>,
Alice Ryhl <aliceryhl@...gle.com>, Trevor Gross <tmgross@...ch.edu>,
Danilo Krummrich <dakr@...nel.org>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Sami Tolvanen <samitolvanen@...gle.com>,
Timur Tabi <ttabi@...dia.com>, Benno Lossin <lossin@...nel.org>,
Dirk Beheme <dirk.behme@...bosch.com>, linux-kernel@...r.kernel.org,
rust-for-linux@...r.kernel.org
Subject: Re: [PATCH v11 7/7] samples: rust: Add scoped debugfs sample driver
On Thu, Sep 04, 2025 at 09:13:58PM +0000, Matthew Maurer wrote:
> Adds a new sample driver `rust_scoped_debugfs` that demonstrates the
> use of the scoped debugfs APIs.
>
> The driver creates a `control` directory with two write-only files,
> `create` and `remove`. Writing a name and a series of numbers to
> `create` will create a new subdirectory under a `dynamic` directory.
> This new subdirectory will contain files that expose the numbers as
> atomic values.
>
> Writing a name to `remove` will remove the corresponding subdirectory
> from the `dynamic` directory.
>
> This sample serves as an example of how to use the `debugfs::Scope`
> and `debugfs::ScopedDir` APIs to create and manage debugfs entries
> that are tied to the lifetime of a data structure.
>
> Signed-off-by: Matthew Maurer <mmaurer@...gle.com>
> ---
> MAINTAINERS | 1 +
> samples/rust/Kconfig | 11 +++
> samples/rust/Makefile | 1 +
> samples/rust/rust_scoped_debugfs.rs | 134 ++++++++++++++++++++++++++++++++++++
Nit, should be called "rust_debugfs_scoped.rs" to make it more obvious
this is a debugfs thing (noun-verb).
thanks,
greg k-h
Powered by blists - more mailing lists