[PATCH] weston-launch: Protect KDGKBMODE K_OFF ioctl by KERNEL_VERSION check

Daniel Stone daniel at fooishbar.org
Wed Nov 16 16:48:29 UTC 2016

Hi Krzysztof,

On 27 September 2016 at 22:44, Dima Ryazanov <dima at gmail.com> wrote:
> The kernel version used to build Weston isn't necessarily the same as the
> version that will be used to run it. Weston should already work fine on
> older versions: the second ioctl will return an error - but it's ok as long
> as the first one succeeds.
> Also, a compile-time check would prevent Weston built on an old kernel from
> taking advantage of new features when running on a new kernel.

I agree with Dima here. I think it would be better to use the approach
we use elsewhere, which is an #ifdef/#define/#endif. This lets us
build on older kernels, without needing #ifdefs in the main codepath.
As Dima says, the ioctl will just fail anyway.


More information about the wayland-devel mailing list