[PATCH libevdev 1/2] test: provide wrapper for fetching the devnode from a uinput test device

Peter Hutterer peter.hutterer at who-t.net
Thu Sep 12 16:53:56 PDT 2013


Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 test/test-common-uinput.c | 6 ++++++
 test/test-common-uinput.h | 1 +
 2 files changed, 7 insertions(+)

diff --git a/test/test-common-uinput.c b/test/test-common-uinput.c
index 32ecb89..5f17fad 100644
--- a/test/test-common-uinput.c
+++ b/test/test-common-uinput.c
@@ -128,6 +128,12 @@ uinput_device_get_fd(const struct uinput_device *dev)
 	return dev->dev_fd;
 }
 
+const char*
+uinput_device_get_devnode(const struct uinput_device *dev)
+{
+	return libevdev_uinput_get_devnode(dev->uidev);
+}
+
 int
 uinput_device_create(struct uinput_device* d)
 {
diff --git a/test/test-common-uinput.h b/test/test-common-uinput.h
index c1cd5a0..6273a6d 100644
--- a/test/test-common-uinput.h
+++ b/test/test-common-uinput.h
@@ -44,5 +44,6 @@ int uinput_device_event(const struct uinput_device* dev, unsigned int type, unsi
 int uinput_device_event_multiple(const struct uinput_device* dev, ...);
 int uinput_device_event_multiple_v(const struct uinput_device* dev, va_list args);
 int uinput_device_get_fd(const struct uinput_device *dev);
+const char* uinput_device_get_devnode(const struct uinput_device *dev);
 
 char *uinput_devnode_from_syspath(const char *syspath);
-- 
1.8.3.1



More information about the Input-tools mailing list