summaryrefslogtreecommitdiffstats
path: root/uevent
diff options
context:
space:
mode:
authorErik Gilling <konkers@android.com>2011-09-08 16:30:33 -0700
committerErik Gilling <konkers@android.com>2011-09-08 16:30:33 -0700
commit020418ec646f989ca14f26e3abd8f23208e9cd4d (patch)
tree1433c8f8f1674b5df3db22bc127a98b91a9babcf /uevent
parent67ba2276b9a5232685e14d416fea0b1250515594 (diff)
downloadhardware_libhardware_legacy-020418ec646f989ca14f26e3abd8f23208e9cd4d.zip
hardware_libhardware_legacy-020418ec646f989ca14f26e3abd8f23208e9cd4d.tar.gz
hardware_libhardware_legacy-020418ec646f989ca14f26e3abd8f23208e9cd4d.tar.bz2
uevent: add helper to get uevent FD
This allows users of the library to handle thier own poll loop. Change-Id: Id3fe2be442c0ca29c74253f9f36e9377278780e4 Signed-off-by: Erik Gilling <konkers@android.com>
Diffstat (limited to 'uevent')
-rw-r--r--uevent/uevent.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/uevent/uevent.c b/uevent/uevent.c
index 396bad4..ef8ce84 100644
--- a/uevent/uevent.c
+++ b/uevent/uevent.c
@@ -65,6 +65,11 @@ int uevent_init()
return (fd > 0);
}
+int uevent_get_fd()
+{
+ return fd;
+}
+
int uevent_next_event(char* buffer, int buffer_length)
{
while (1) {