[PATCH evemu 2/3] py: remove uinput reference

Peter Hutterer peter.hutterer at who-t.net
Mon Jan 13 15:53:02 PST 2014


On Mon, Jan 13, 2014 at 06:30:31PM -0500, Benjamin Tissoires wrote:
> now that evemu manages uinput by itself, remove uinput from the python
> binding where there is no use.
> 
> Signed-off-by: Benjamin Tissoires <benjamin.tissoires at gmail.com>

Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>

Cheers,
   Peter

> ---
>  python/evemu/__init__.py | 6 ++----
>  python/evemu/const.py    | 1 -
>  2 files changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/python/evemu/__init__.py b/python/evemu/__init__.py
> index 8e725c7..4f64204 100644
> --- a/python/evemu/__init__.py
> +++ b/python/evemu/__init__.py
> @@ -55,14 +55,12 @@ class Device(object):
>          self._is_propfile = self._check_is_propfile(self._file)
>          self._libc = evemu.base.LibC()
>          self._libevemu = evemu.base.LibEvemu()
> -        self._uinput = None
>  
>          self._evemu_device = self._libevemu.evemu_new(b"")
>  
>          if self._is_propfile:
>              fs = self._libc.fdopen(self._file.fileno(), b"r")
>              self._libevemu.evemu_read(self._evemu_device, fs)
> -            self._uinput = os.open(evemu.const.UINPUT_NODE, os.O_WRONLY)
>              self._file = self._create_devnode()
>          else:
>              self._libevemu.evemu_extract(self._evemu_device,
> @@ -71,10 +69,10 @@ class Device(object):
>      def __del__(self):
>          if hasattr(self, "_is_propfile") and self._is_propfile:
>              self._file.close()
> -            self._libevemu.evemu_destroy(self._evemu_device, self._uinput)
> +            self._libevemu.evemu_destroy(self._evemu_device)
>  
>      def _create_devnode(self):
> -        self._libevemu.evemu_create(self._evemu_device, self._uinput)
> +        self._libevemu.evemu_create_managed(self._evemu_device)
>          return open(self._find_newest_devnode(self.name), 'r+b', buffering=0)
>  
>      def _find_newest_devnode(self, target_name):
> diff --git a/python/evemu/const.py b/python/evemu/const.py
> index 19c507a..42eb22c 100644
> --- a/python/evemu/const.py
> +++ b/python/evemu/const.py
> @@ -1,6 +1,5 @@
>  LIB = "libevemu.so"
>  ENCODING="iso8859-1"
> -UINPUT_NODE = "/dev/uinput"
>  
>  event_types = {
>      "EV_SYN": 0x00,
> -- 
> 1.8.4.2
> 
> _______________________________________________
> Input-tools mailing list
> Input-tools at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/input-tools


More information about the Input-tools mailing list