summaryrefslogtreecommitdiffstats
path: root/minui/events.cpp
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2015-04-30 06:33:57 +0200
committerAndroid Git Automerger <android-git-automerger@android.com>2015-04-30 06:33:57 +0200
commitf6c7af289c2990bd16d422ae689317a938f77fdc (patch)
treee2c357667b0e76e6fa5a43c7a7951c872c373e9c /minui/events.cpp
parentam f7466f9f: Stop using adb_strtok, and check argument validity. (diff)
parentam 34c7731a: Merge "Check all lseek calls succeed." (diff)
downloadandroid_bootable_recovery-f6c7af289c2990bd16d422ae689317a938f77fdc.tar
android_bootable_recovery-f6c7af289c2990bd16d422ae689317a938f77fdc.tar.gz
android_bootable_recovery-f6c7af289c2990bd16d422ae689317a938f77fdc.tar.bz2
android_bootable_recovery-f6c7af289c2990bd16d422ae689317a938f77fdc.tar.lz
android_bootable_recovery-f6c7af289c2990bd16d422ae689317a938f77fdc.tar.xz
android_bootable_recovery-f6c7af289c2990bd16d422ae689317a938f77fdc.tar.zst
android_bootable_recovery-f6c7af289c2990bd16d422ae689317a938f77fdc.zip
Diffstat (limited to 'minui/events.cpp')
-rw-r--r--minui/events.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/minui/events.cpp b/minui/events.cpp
index 2d47a587f..3b2262a4b 100644
--- a/minui/events.cpp
+++ b/minui/events.cpp
@@ -15,6 +15,7 @@
*/
#include <dirent.h>
+#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
@@ -165,7 +166,7 @@ void ev_dispatch(void) {
int ev_get_input(int fd, uint32_t epevents, input_event* ev) {
if (epevents & EPOLLIN) {
- ssize_t r = read(fd, ev, sizeof(*ev));
+ ssize_t r = TEMP_FAILURE_RETRY(read(fd, ev, sizeof(*ev)));
if (r == sizeof(*ev)) {
return 0;
}