Re: [PATCH] Multi protocol support (stage #1)

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

 



On Thu, Apr 27, 2006, Manu Abraham wrote:
> Johannes Stezenbach wrote:
> >>+struct dvb_frontend_params {
> >>+       __u32                           frequency;
> >>+       enum fe_delsys                  delivery;
> >>+       enum fe_inversion               inversion;
> >>+
> >>+       union {
> >>+               struct dvbs_params      dvbs;
> >>+               struct dvbs2_params     dvbs2;
> >>+               struct dss_params       dss;
> >>+               struct dvbc_params      dvbc;
> >>+               struct dvbt_params      dvbt;
> >>+               struct dvbh_params      dvbh;
> >>+               struct atsc_params      atsc;
> >>+       } delsys;
> >>    
> >
> >The kernel now requires gcc-3.x, so you could use anonymous unions if
> >you want.
> >But you repeat the same mistake which we already made: No room
> >for future binary compitable extension :-(
> 
> What's your thought on removing the size field in the IOCTL, so that the 
> size won't be an issue ?
> That way it will be binary compatible. :-) Or any other thoughts you 
> have ? We can retain the size for now, but we can remove it as and when 
> need arises ..

- old binaries would have less memory allocated than the
  kernel wants to read -> boom
- dvb_usercopy wouldn't work

It's far better to add "u8 pad[256];" to the union.
(or some other arbitrary number instead of 256)

Johannes

_______________________________________________

linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux