lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4CFFEC71.8060103@euromail.se>
Date:	Wed, 08 Dec 2010 21:37:05 +0100
From:	Henrik Rydberg <rydberg@...omail.se>
To:	Valdis.Kletnieks@...edu
CC:	Dmitry Torokhov <dmitry.torokhov@...il.com>,
	Jiri Kosina <jkosina@...e.cz>, linux-input@...r.kernel.org,
	linux-kernel@...r.kernel.org, Ping Cheng <pingc@...om.com>,
	Chris Bagwell <chris@...bagwell.com>
Subject: Re: [RFC][PATCH] input: Introduce device information ioctl

>

>>  /*
>> + * Device types
>> + */
>> +
>> +#define DEVTYPE_KEYBOARD	0
>> +#define DEVTYPE_MOUSE		1
>> +#define DEVTYPE_JOYSTICK	2
>> +#define DEVTYPE_TOUCHPAD	3
>> +#define DEVTYPE_TABLET		4
>> +#define DEVTYPE_TOUCHSCREEN	5
> 
> Add a #define DEVTYPE_UNKNOWN 0 and push everybody else down one. That way,
> an uninitialized 'struct input_devinfo' won't claim to be a keyboard.


Since types is a bitmask, the initial value will actually be unclaimed already.
To be explicit, for a keyboard, types = 1 << 0 = 1.

Thanks,
Henrik
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ