Ramirez Luna, Omar had written, on 01/08/2010 11:19 AM, the following:
From: Menon, Nishanth
Apologies on the spam, but a few points below for preventing a future
ioctl change:
Menon, Nishanth had written, on 01/07/2010 08:59 PM, the following:
Ramirez Luna, Omar had written, on 01/07/2010 07:01 PM, the following:
- Use standard convention to define ioctls.
please warn in the commit message that this will break compatibility.
Will do
Thanks.
- Removed runtime check for ioctl matching table number.
- Added __deprectaed marker to functions that are not used anymore.
generic idea:
if (cmd < ARRAY_SIZE(WCD_cmdTable)) {
/* make the fxn call via the cmd table */
*pResult = (*WCD_cmdTable[cmd].fxn) (args, pr_ctxt);
if you convert this into:
if (!WCD_cmdTable[cmd].fxn)
return -EINVAL;
/* make the fxn call via the cmd table */
*pResult = (*WCD_cmdTable[cmd].fxn) (args, pr_ctxt);
you'd make deprecation of a previously defined ioctl easy -> just NULL
and remove the function in the array and remove it and it's unused
helper functions.. :)..
Problem comes if you are expecting some status value from that function
-EINVAL is an error value. are there status values that match it?
Actually looking at
include/asm-generic/errno.h
-ENOSYS seems more apt :D.
if there are functions that are sending error values as valid return
values, heh heh.. I guess we can expect more patches ;).
one generic question - I did not see an features/ioctls supported around
- having not dug enough, how does the userspace know if the bridge uses
the new ioctls/old ioctls?
Patch will be sent to userspace repository on dev.omapzoom.org...
>the idea is to support this set of ioctls from now on... overall I don't
>think I got your question
Try 2:
lets say I want to write an gst-dsp which will run accross bridge that
was there before and now - how do i do it? I need to know if I should
use the new ioctl numbers OR the old ioctl numbers to dspbridge
something like DSPBRIDGE_GET_REV or DSPBRIDGE_GET_CAPS
result of this tells userspace "aah here is a bridge rev "x" or bridge
has capabilities "abc" - do I support it? hmm.. let me check.. well :( I
dont.. print "sorry dude.. i dont support this rev of bridge.. tata"..
[snip]
- omar
--
Regards,
Nishanth Menon
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html