summaryrefslogtreecommitdiffstats
path: root/ui.cpp
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2015-04-29 02:24:24 +0200
committerElliott Hughes <enh@google.com>2015-04-30 02:46:43 +0200
commit7bad7c4646ee8fd8d6e6ed0ffd3ddbb0c1b41a2f (patch)
treee2c357667b0e76e6fa5a43c7a7951c872c373e9c /ui.cpp
parentMerge "Stop using adb_strtok, and check argument validity." (diff)
downloadandroid_bootable_recovery-7bad7c4646ee8fd8d6e6ed0ffd3ddbb0c1b41a2f.tar
android_bootable_recovery-7bad7c4646ee8fd8d6e6ed0ffd3ddbb0c1b41a2f.tar.gz
android_bootable_recovery-7bad7c4646ee8fd8d6e6ed0ffd3ddbb0c1b41a2f.tar.bz2
android_bootable_recovery-7bad7c4646ee8fd8d6e6ed0ffd3ddbb0c1b41a2f.tar.lz
android_bootable_recovery-7bad7c4646ee8fd8d6e6ed0ffd3ddbb0c1b41a2f.tar.xz
android_bootable_recovery-7bad7c4646ee8fd8d6e6ed0ffd3ddbb0c1b41a2f.tar.zst
android_bootable_recovery-7bad7c4646ee8fd8d6e6ed0ffd3ddbb0c1b41a2f.zip
Diffstat (limited to '')
-rw-r--r--ui.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui.cpp b/ui.cpp
index dca325fea..1a0b079cc 100644
--- a/ui.cpp
+++ b/ui.cpp
@@ -251,7 +251,7 @@ bool RecoveryUI::IsUsbConnected() {
char buf;
// USB is connected if android_usb state is CONNECTED or CONFIGURED.
- int connected = (read(fd, &buf, 1) == 1) && (buf == 'C');
+ int connected = (TEMP_FAILURE_RETRY(read(fd, &buf, 1)) == 1) && (buf == 'C');
if (close(fd) < 0) {
printf("failed to close /sys/class/android_usb/android0/state: %s\n",
strerror(errno));