Re: FW: wrapper device driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I guess a userspace library approach won't be transparent to the applications.

On Mon, Feb 2, 2015 at 3:44 PM, Malte Vesper
<malte.vesper@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
>
> ________________________________________
> From: Malte Vesper
> Sent: 02 February 2015 21:43
> To: riya khanna
> Subject: RE: wrapper device driver
>
> Why don't you implement your wrapper as a userspace library?
> ________________________________________
> From: kernelnewbies-bounces@xxxxxxxxxxxxxxxxx [kernelnewbies-bounces@xxxxxxxxxxxxxxxxx] on behalf of riya khanna [riyakhanna1983@xxxxxxxxx]
> Sent: 02 February 2015 21:24
> To: kernelnewbies
> Subject: wrapper device driver
>
> Hi,
>
> I'm writing a device driver to to provide a wrapper device around a
> real device. Is it acceptable to do the following:
>
> wrapper_dev_open(flags) {
>    // do additional bookkeeping
>    real_dev_filp = filp_open(real_device_node_path, flags);
> }
>
> wrapper_dev_mmap(mmap_parameters) {
>    // do additional checks
>    return real_dev_filp->f_op->mmap(mmap_parameters);
> }
>
> wrapper_dev_ioctl(ioctl_parameters) {
>    // do additional checks
>    return real_dev_filp->f_op->ioctl(ioctl_parameters);
> }
>
> Is it safe to do something like this? what would be the caveats? Given
> a good use case, would the maintainers be willing to mainstream
> something like this? Thanks!
>
> -Riya
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies@xxxxxxxxxxxxxxxxx
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies@xxxxxxxxxxxxxxxxx
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies




[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux