Files
linux/rust/kernel
Matthew Maurer 40ecc49466 rust: debugfs: Add support for callback-based files
Extends the `debugfs` API to support creating files with content
generated and updated by callbacks. This is done via the
`read_callback_file`, `write_callback_file`, and
`read_write_callback_file` methods.

These methods allow for more flexible file definition, either because
the type already has a `Writer` or `Reader` method that doesn't
do what you'd like, or because you cannot implement it (e.g. because
it's a type defined in another crate or a primitive type).

Signed-off-by: Matthew Maurer <mmaurer@google.com>
Tested-by: Dirk Behme <dirk.behme@de.bosch.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20250904-debugfs-rust-v11-4-7d12a165685a@google.com
[ Fix up Result<(), Error> -> Result. - Danilo ]
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
2025-09-10 18:58:21 +02:00
..
2025-06-22 23:09:32 +02:00
2025-08-21 21:09:48 +02:00
2025-07-23 02:05:58 +02:00
2025-07-23 02:05:58 +02:00
2025-08-25 09:18:23 +02:00
2025-08-25 09:18:23 +02:00
2025-08-13 17:40:28 +02:00
2025-07-21 01:16:35 +02:00
2025-08-21 21:09:48 +02:00
2025-07-19 23:18:18 +02:00
2024-10-08 15:44:36 +02:00
2025-07-21 01:16:35 +02:00
2025-08-21 16:58:07 +02:00
2024-11-04 16:21:44 -05:00