|
@@ -453,6 +453,7 @@ static int flash_close(netio_t *io)
|
|
|
ret = -1;
|
|
|
goto out;
|
|
|
}
|
|
|
+ fflush(fp);
|
|
|
fsync(fileno(fp));
|
|
|
|
|
|
total_size = priv->head_size;
|
|
@@ -553,6 +554,7 @@ static int download_img_info_init(netio_t *io, uint8_t *buffer, int length, int
|
|
|
fclose(headerfp);
|
|
|
return -1;
|
|
|
}
|
|
|
+ fflush(headerfp);
|
|
|
fsync(fileno(headerfp));
|
|
|
fclose(headerfp);
|
|
|
}
|
|
@@ -587,6 +589,7 @@ static int download_img_info_init(netio_t *io, uint8_t *buffer, int length, int
|
|
|
fclose(imginfofp);
|
|
|
return -1;
|
|
|
}
|
|
|
+ fflush(imginfofp);
|
|
|
fsync(fileno(imginfofp));
|
|
|
fclose(imginfofp);
|
|
|
|