summaryrefslogtreecommitdiffstats
path: root/otafault
diff options
context:
space:
mode:
Diffstat (limited to 'otafault')
-rw-r--r--otafault/Android.mk2
-rw-r--r--otafault/ota_io.cpp1
2 files changed, 3 insertions, 0 deletions
diff --git a/otafault/Android.mk b/otafault/Android.mk
index 7468de6c4..33308c76e 100644
--- a/otafault/Android.mk
+++ b/otafault/Android.mk
@@ -31,6 +31,8 @@ LOCAL_WHOLE_STATIC_LIBRARIES := $(otafault_static_libs)
include $(BUILD_STATIC_LIBRARY)
+# otafault_test (static executable)
+# ===============================
include $(CLEAR_VARS)
LOCAL_SRC_FILES := config.cpp ota_io.cpp test.cpp
diff --git a/otafault/ota_io.cpp b/otafault/ota_io.cpp
index 04458537b..94be8155a 100644
--- a/otafault/ota_io.cpp
+++ b/otafault/ota_io.cpp
@@ -92,6 +92,7 @@ size_t ota_fread(void* ptr, size_t size, size_t nitems, FILE* stream) {
}
}
size_t status = fread(ptr, size, nitems, stream);
+ // If I/O error occurs, set the retry-update flag.
if (status != nitems && errno == EIO) {
have_eio_error = true;
}