aboutsummaryrefslogtreecommitdiffstats
path: root/applypatch
diff options
context:
space:
mode:
authorDoug Zongker <dougz@android.com>2013-07-11 14:23:44 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-07-11 14:23:44 -0700
commit51c84694b0198a90b8eed635b46a3712c44db7a5 (patch)
tree01338c51bd2c2fcb57804e80428fd124298a293e /applypatch
parentbce44d8b550d898ab1893cc0125b18f29534a0ec (diff)
parenta69b50c567d46afad73c4d6ab9e57f078ee73327 (diff)
downloadbootable_recovery-51c84694b0198a90b8eed635b46a3712c44db7a5.zip
bootable_recovery-51c84694b0198a90b8eed635b46a3712c44db7a5.tar.gz
bootable_recovery-51c84694b0198a90b8eed635b46a3712c44db7a5.tar.bz2
am a69b50c5: am 901b898d: recovery: remove O_DIRECT, use O_SYNC only
* commit 'a69b50c567d46afad73c4d6ab9e57f078ee73327': recovery: remove O_DIRECT, use O_SYNC only
Diffstat (limited to 'applypatch')
-rw-r--r--applypatch/applypatch.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/applypatch/applypatch.c b/applypatch/applypatch.c
index a668a5e..6b8da2a 100644
--- a/applypatch/applypatch.c
+++ b/applypatch/applypatch.c
@@ -424,7 +424,7 @@ int WriteToPartition(unsigned char* data, size_t len,
{
size_t start = 0;
int success = 0;
- int fd = open(partition, O_RDWR | O_DIRECT | O_SYNC);
+ int fd = open(partition, O_RDWR | O_SYNC);
if (fd < 0) {
printf("failed to open %s: %s\n", partition, strerror(errno));
return -1;
@@ -433,7 +433,7 @@ int WriteToPartition(unsigned char* data, size_t len,
for (attempt = 0; attempt < 10; ++attempt) {
size_t next_sync = start + (1<<20);
- printf("raw O_DIRECT write %s attempt %d start at %d\n", partition, attempt+1, start);
+ printf("raw O_SYNC write %s attempt %d start at %d\n", partition, attempt+1, start);
lseek(fd, start, SEEK_SET);
while (start < len) {
size_t to_write = len - start;