Messages in this thread | | | Subject | RE: [PATCH] incorrect use of sizeof() in ioctl definitions | Date | Wed, 8 Oct 2003 19:42:23 +0800 | From | "Tian, Kevin" <> |
| |
> Wrote from Maciej Zenczykowski [mailto:maze@cela.pl] > > So as not to break userspace we must still support old values, at the same > time we want new programs to start using the new correct values - hence > the introduction of _backward compatibility_ values.
Thanks. :) Now I see... but are there any rules to decide which part should be upgraded even breaking the backward compatibility? You know, the latest 2.6 kernel will request many modules recompiled to run on it. IMO, most ioctls defined in this bad manner seems to be not-widely used ones, and... maybe it's worthy of some sacrifice on temporary compatibility, thus to keep a clean and consistent environment.
> the old was bad since it was sizeof(sizeof(...)) - it so happens that by > def sizeof(anything) is a size_t - thus replacing sizeof(sizeof(..)) with > sizeof(size_t) changes nothing - just shortens the code... > Of course what we probably should really have is the above (now) code > defined as "BAD" and the previous (old) define without the sizeof as the > current (no BAD prefix).
Reasonable!
> Yap, both violate. It is a mess and there is no easy fix due to the need > to retain the old invalid ioctl's as well...
If without such need... :(
Thanks, Kevin
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |