<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/libevdev.git/libevdev/libevdev-uinput.c, branch libevdev-1.2</title>
<subtitle>gitlab.freedesktop.org: libevdev/libevdev.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libevdev.git/'/>
<entry>
<title>uinput: check for asprintf failure</title>
<updated>2014-03-18T23:36:41+00:00</updated>
<author>
<name>Peter Hutterer</name>
<email>peter.hutterer@who-t.net</email>
</author>
<published>2014-03-18T03:55:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libevdev.git/commit/?id=f29008b758e82f9ba2d2f9627a680c952d44668b'/>
<id>f29008b758e82f9ba2d2f9627a680c952d44668b</id>
<content type='text'>
This doesn't really do much here, but strictly speaking: if asprintf returns
-1, devnode is undefined. So reset it to NULL to avoid weird pointers. And
also free the rest of the names if we ever have more than one device - which
also shouldn't happen.

Signed-off-by: Peter Hutterer &lt;peter.hutterer@who-t.net&gt;
Reviewed-by: Benjamin Tissoires &lt;benjamin.tissoires@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This doesn't really do much here, but strictly speaking: if asprintf returns
-1, devnode is undefined. So reset it to NULL to avoid weird pointers. And
also free the rest of the names if we ever have more than one device - which
also shouldn't happen.

Signed-off-by: Peter Hutterer &lt;peter.hutterer@who-t.net&gt;
Reviewed-by: Benjamin Tissoires &lt;benjamin.tissoires@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix memory leaks when failing to create a uinput device</title>
<updated>2014-02-27T03:22:50+00:00</updated>
<author>
<name>Peter Hutterer</name>
<email>peter.hutterer@who-t.net</email>
</author>
<published>2014-02-27T01:29:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libevdev.git/commit/?id=fdf737494ed940d68ce68c52ee029417bb68c8ff'/>
<id>fdf737494ed940d68ce68c52ee029417bb68c8ff</id>
<content type='text'>
For an invalid fd, or a failure to open the device, the pre-allocated uinput
device struct would leak.

We can drop the open_uinput() function now, since skipping to the error
handling means we'll return -errno anyway.

Signed-off-by: Peter Hutterer &lt;peter.hutterer@who-t.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For an invalid fd, or a failure to open the device, the pre-allocated uinput
device struct would leak.

We can drop the open_uinput() function now, since skipping to the error
handling means we'll return -errno anyway.

Signed-off-by: Peter Hutterer &lt;peter.hutterer@who-t.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Make uinput-code backwards-compatible to missing UI_SET_PROPBIT ioctl</title>
<updated>2013-10-22T23:04:41+00:00</updated>
<author>
<name>Peter Hutterer</name>
<email>peter.hutterer@who-t.net</email>
</author>
<published>2013-10-08T03:43:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libevdev.git/commit/?id=ae738d29ea651cecaf7fec616d5750b69d63649a'/>
<id>ae738d29ea651cecaf7fec616d5750b69d63649a</id>
<content type='text'>
Signed-off-by: Peter Hutterer &lt;peter.hutterer@who-t.net&gt;
Reviewed-by: David Herrmann &lt;dh.herrmann@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Peter Hutterer &lt;peter.hutterer@who-t.net&gt;
Reviewed-by: David Herrmann &lt;dh.herrmann@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Revamp the API once again</title>
<updated>2013-09-10T01:25:09+00:00</updated>
<author>
<name>Peter Hutterer</name>
<email>peter.hutterer@who-t.net</email>
</author>
<published>2013-08-27T03:33:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libevdev.git/commit/?id=ab2f20bfd6ad632b1ab5c41a0aac54d8bf2e0bc3'/>
<id>ab2f20bfd6ad632b1ab5c41a0aac54d8bf2e0bc3</id>
<content type='text'>
Another look at the current API showed some inconsistencies, rectified
in this commit:

libevdev_kernel_*: modify the underlying kernel device
libevdev_event_type_*: something with an event type
libevdev_event_code_*: something with an event code
libevdev_event_*: struct input_event-related functions (i.e. not device-related)
libevdev_property_*: something with a property
libevdev_*: anything applying to a device

Hopefully that's the last API change. Current symbols deprecated and aliased.

Signed-off-by: Peter Hutterer &lt;peter.hutterer@who-t.net&gt;
Acked-by: Benjamin Tissoires &lt;benjamin.tissoires@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Another look at the current API showed some inconsistencies, rectified
in this commit:

libevdev_kernel_*: modify the underlying kernel device
libevdev_event_type_*: something with an event type
libevdev_event_code_*: something with an event code
libevdev_event_*: struct input_event-related functions (i.e. not device-related)
libevdev_property_*: something with a property
libevdev_*: anything applying to a device

Hopefully that's the last API change. Current symbols deprecated and aliased.

Signed-off-by: Peter Hutterer &lt;peter.hutterer@who-t.net&gt;
Acked-by: Benjamin Tissoires &lt;benjamin.tissoires@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Warn if there are multiple devices with the same syspath</title>
<updated>2013-09-03T07:01:42+00:00</updated>
<author>
<name>Peter Hutterer</name>
<email>peter.hutterer@who-t.net</email>
</author>
<published>2013-08-31T03:03:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libevdev.git/commit/?id=4b5ffa6bea0d4ac92d567fdb3579baf0fe3ab80d'/>
<id>4b5ffa6bea0d4ac92d567fdb3579baf0fe3ab80d</id>
<content type='text'>
Change to the previous code in that we continue looking at devices
even after we've found one. However, this way we can warn
the user when we can't guarantee syspath correctness.

Signed-off-by: Peter Hutterer &lt;peter.hutterer@who-t.net&gt;
Reviewed-by: Benjamin Tissoires &lt;benjamin.tissoires@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change to the previous code in that we continue looking at devices
even after we've found one. However, this way we can warn
the user when we can't guarantee syspath correctness.

Signed-off-by: Peter Hutterer &lt;peter.hutterer@who-t.net&gt;
Reviewed-by: Benjamin Tissoires &lt;benjamin.tissoires@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Log a few errors, specifically application bugs</title>
<updated>2013-09-03T07:01:40+00:00</updated>
<author>
<name>Peter Hutterer</name>
<email>peter.hutterer@who-t.net</email>
</author>
<published>2013-08-31T02:53:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libevdev.git/commit/?id=a6e25fab76949c5d7ffbaee676ad380b33d78cdb'/>
<id>a6e25fab76949c5d7ffbaee676ad380b33d78cdb</id>
<content type='text'>
Signed-off-by: Peter Hutterer &lt;peter.hutterer@who-t.net&gt;
Reviewed-by: Benjamin Tissoires &lt;benjamin.tissoires@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Peter Hutterer &lt;peter.hutterer@who-t.net&gt;
Reviewed-by: Benjamin Tissoires &lt;benjamin.tissoires@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>uinput: don't try to set the syspath twice</title>
<updated>2013-08-31T03:17:58+00:00</updated>
<author>
<name>Peter Hutterer</name>
<email>peter.hutterer@who-t.net</email>
</author>
<published>2013-08-31T02:59:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libevdev.git/commit/?id=37d37cdaea9c010c5f7f0ab878617c8239d14d15'/>
<id>37d37cdaea9c010c5f7f0ab878617c8239d14d15</id>
<content type='text'>
If we have it, stop searching for it. Otherwise a second device with the
same name would overwrite the first, causing a leak.

Signed-off-by: Peter Hutterer &lt;peter.hutterer@who-t.net&gt;
Reviewed-by: Benjamin Tissoires &lt;benjamin.tissoires@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If we have it, stop searching for it. Otherwise a second device with the
same name would overwrite the first, causing a leak.

Signed-off-by: Peter Hutterer &lt;peter.hutterer@who-t.net&gt;
Reviewed-by: Benjamin Tissoires &lt;benjamin.tissoires@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix off-by-one errors when dealing with *_MAX values.</title>
<updated>2013-08-30T07:40:54+00:00</updated>
<author>
<name>Peter Hutterer</name>
<email>peter.hutterer@who-t.net</email>
</author>
<published>2013-08-29T05:38:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libevdev.git/commit/?id=b77fea9c8943fd77893a68ec66028edfbe8a7654'/>
<id>b77fea9c8943fd77893a68ec66028edfbe8a7654</id>
<content type='text'>
LED_MAX, KEY_MAX, ABS_MT_MAX, etc. are all valid event codes

Signed-off-by: Peter Hutterer &lt;peter.hutterer@who-t.net&gt;
Reviewed-by: Benjamin Tissoires &lt;benjamin.tissoires@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
LED_MAX, KEY_MAX, ABS_MT_MAX, etc. are all valid event codes

Signed-off-by: Peter Hutterer &lt;peter.hutterer@who-t.net&gt;
Reviewed-by: Benjamin Tissoires &lt;benjamin.tissoires@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Use AC_USE_SYSTEM_EXTENSIONS</title>
<updated>2013-08-29T03:54:50+00:00</updated>
<author>
<name>Peter Hutterer</name>
<email>peter.hutterer@who-t.net</email>
</author>
<published>2013-08-26T03:08:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libevdev.git/commit/?id=a8871e7aea98ec9fd0b148259a2a3543cdd27118'/>
<id>a8871e7aea98ec9fd0b148259a2a3543cdd27118</id>
<content type='text'>
Defines _GNU_SOURCE for us.
http://www.gnu.org/software/autoconf/manual/autoconf-2.67/html_node/Posix-Variants.html

Signed-off-by: Peter Hutterer &lt;peter.hutterer@who-t.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Defines _GNU_SOURCE for us.
http://www.gnu.org/software/autoconf/manual/autoconf-2.67/html_node/Posix-Variants.html

Signed-off-by: Peter Hutterer &lt;peter.hutterer@who-t.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add support for uinput device creation</title>
<updated>2013-08-29T03:54:46+00:00</updated>
<author>
<name>Peter Hutterer</name>
<email>peter.hutterer@who-t.net</email>
</author>
<published>2013-07-25T05:56:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libevdev.git/commit/?id=1acbfb35799485326f5d76280282f320828aec38'/>
<id>1acbfb35799485326f5d76280282f320828aec38</id>
<content type='text'>
This lets libevdev provide a relatively generic interface for the
creation of uinput devices so we don't need to duplicate this across
multiple projects.

Most of this is lifted from the current test implementation, with a
couple of minor changes.

EV_REP needs special handling:
   Kernel allows to set the EV_REP bit, it doesn't set REP_* bits (which we
   wrap anyway) but it will also set the default values (500, 33).

Device node is guessed based on the sysfs path:
   The sysfs path contains a eventN file, that corresponds to our
   /dev/input/eventN number. Use it so clients can quickly get the device
   node, without a libudev dependency.

Signed-off-by: Peter Hutterer &lt;peter.hutterer@who-t.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This lets libevdev provide a relatively generic interface for the
creation of uinput devices so we don't need to duplicate this across
multiple projects.

Most of this is lifted from the current test implementation, with a
couple of minor changes.

EV_REP needs special handling:
   Kernel allows to set the EV_REP bit, it doesn't set REP_* bits (which we
   wrap anyway) but it will also set the default values (500, 33).

Device node is guessed based on the sysfs path:
   The sysfs path contains a eventN file, that corresponds to our
   /dev/input/eventN number. Use it so clients can quickly get the device
   node, without a libudev dependency.

Signed-off-by: Peter Hutterer &lt;peter.hutterer@who-t.net&gt;
</pre>
</div>
</content>
</entry>
</feed>
