otafault: Fix setting of have_eio_error.

There was one case (ota_fsync, under TARGET_SYNC_FAULT, when the
filename was cached) where we were not setting have_eio_error
prior to returning.  We fix that.

Change-Id: I2b0aa61fb1e821f0e77881aba04db95cd8396812
This commit is contained in:
Greg Kaiser
2016-03-14 12:15:24 -07:00
parent 0ba21cff07
commit f4300bc126
+1 -1
View File
@@ -189,8 +189,8 @@ int ota_fsync(int fd) {
&& FilenameCache[fd] == FaultFileName) {
FaultFileName = "";
errno = EIO;
return -1;
have_eio_error = true;
return -1;
} else {
int status = fsync(fd);
if (status == -1 && errno == EIO) {