On Thu, Nov 07, 2002 at 05:02:16PM +0800, Antonino Daplas wrote: > Pardon me, yes, you are correct that you can pass parameters by value > via ioctl. However, passing a pointer and using the user access macros > will give you defined behavior. If parameter is illegal, exit with an > error, else proceed. If you pass by value and do not utilize the user > access macros, you don't get any protection and you will get undefined > behavior if an old application happen to not pass any.
fb.h isn't exactly consistent in defining the ioctls. FBIOGET_VBLANK is the only one using _IOR while other are just defined as a number. Then there's FBIOBLANK which want's an int value as it's argument so I think the new patch might be more consistent with that behavior. > So (int) or (int *) are both correct depending on your usage. Note that > using the ioctl macros will always default to pointers. Ok. Thanks for clearing this up. -- Ville Syrj�l� [EMAIL PROTECTED] http://www.sci.fi/~syrjala/ -- Info: To unsubscribe send a mail to [EMAIL PROTECTED] with "unsubscribe directfb-dev" as subject.
