summaryrefslogtreecommitdiffstats
path: root/adb_install.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--adb_install.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/adb_install.cpp b/adb_install.cpp
index ebd4cac00..e3b94ea59 100644
--- a/adb_install.cpp
+++ b/adb_install.cpp
@@ -42,7 +42,7 @@ set_usb_driver(bool enabled) {
ui->Print("failed to open driver control: %s\n", strerror(errno));
return;
}
- if (write(fd, enabled ? "1" : "0", 1) < 0) {
+ if (TEMP_FAILURE_RETRY(write(fd, enabled ? "1" : "0", 1)) == -1) {
ui->Print("failed to set driver control: %s\n", strerror(errno));
}
if (close(fd) < 0) {