Re: Bug in S2 API...

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

 



Hi Markus,

Am Montag, den 21.09.2009, 12:02 +0200 schrieb Markus Rechberger:
> ----
> in dvb-frontend.c:
>  ----
>          if(cmd == FE_GET_PROPERTY) {
> 
>                  tvps = (struct dtv_properties __user *)parg;
>                  dprintk("%s() properties.num = %d\n", __func__, tvps->num);
>                  dprintk("%s() properties.props = %p\n", __func__, tvps->props);
>                  ...
>                  if (copy_from_user(tvp, tvps->props, tvps->num *
>  sizeof(struct dtv_property)))
>  ----
> 
> 
> > OK,
> >
> > thought I'll have never to care for it again.
> >
> > ENUM calls should never be W.
> >
> > Hit me for all I missed.
> >
> > Cheers,
> > Hermann
> 
> you are not seeing the point of it it seems

you are right, I do not see your point at all, but I was wrong for the
get calls.

We had such discussions on v4l ioctls previously.

The result was to keep them as is and not to change IOR to IOWR to keep
compatibility.

This is six years back.

If you point me to a bug ever caused by it, I'll happily try to look it
up again.

Cheers,
Hermann

> Documentation/ioctl-number.txt
> 
> ----
> If you are adding new ioctl's to the kernel, you should use the _IO
> macros defined in <linux/ioctl.h>:
> 
>     _IO    an ioctl with no parameters
>     _IOW   an ioctl with write parameters (copy_from_user)
>     _IOR   an ioctl with read parameters  (copy_to_user)
>     _IOWR  an ioctl with both write and read parameters.
> ----
> copy from user is required in order to copy the keys for the requested
> elements into the kernel.
> copy to user is finally used to play them back.
> 
> Markus

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux