Re: [PATCH 2/3] rust: miscdevice: Implemented `read` and `write`
From: gregkh@xxxxxxxxxxxxxxxxxxx
Date: Thu Sep 18 2025 - 11:06:40 EST
On Thu, Sep 18, 2025 at 04:59:01PM +0200, gregkh@xxxxxxxxxxxxxxxxxxx wrote:
> On Thu, Sep 18, 2025 at 02:45:36PM +0000, ManeraKai wrote:
> > Added the general declaration in `FileOperations`. And implemented the
> > safe wrapping for misc.
>
> While read/write is "traditional", perhaps instead you should just
> export read_iter and write_iter as that is the proper way forward for
> drivers to be using.
Wait, maybe not. The _iter stuff is "hard" for misc devices, and I
don't think that any of the current ones use that, so nevermind, a
simple read/write should be all that we need here.
What type of real misc driver do you want to write in rust that you need
a read/write callback and not just an ioctl one?
thanks,
greg k-h