Johannes Berg [Wed, 2 Sep 2009 20:13:09 +0000 (22:13 +0200)]
resync rfkill.h with kernel
The kernel rfkill.h got a new license thanks to all
people involved with it -- we can now sync with it
and clean up the little license mess here. The
upstream (kernel) commit was:
This header file is copied into userspace tools that
need not be GPLv2 licensed, make that easier.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Acked-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Acked-by: Iñaky Pérez-González <inaky@linux.intel.com> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Acked-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com> Acked-by: Michael Buesch <mb@bu3sch.de> Acked-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Sun, 5 Jul 2009 12:37:40 +0000 (14:37 +0200)]
check event size for version 1
If we ever increase the event struct size, then we
will need to handle multiple event sizes, so let's
define the current event size and check for that
so we remember to fix it up when (if ever) we need
to change things.
Johannes Berg [Sun, 5 Jul 2009 12:33:25 +0000 (14:33 +0200)]
use right event size for read()
In order to be compatible with future size increases of
the kernel's rfkill structure, userspace should only
read as much as it expects -- the kernel will truncate
the event read if necessary, which is the way we plan
to have compatibility between different versions, should
they ever be necessary.
Thus, the userspace tool needs to use the exact event
size for a read().
If the userspace tool is ever compiled with a newer
kernel then it will need to be adjusted to work with
older kernels, however.