diff options
author | Doug Zongker <dougz@android.com> | 2013-07-11 14:23:36 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-07-11 14:23:36 -0700 |
commit | bce44d8b550d898ab1893cc0125b18f29534a0ec (patch) | |
tree | 9eb710ee16955473f69c074be49d6f10ee4f912c | |
parent | 1bdd5b7e744d20854d90cfead752eebcf9cde023 (diff) | |
parent | 660637f3fc6fe20e8b7f47b98152138c2c92b7ec (diff) | |
download | bootable_recovery-bce44d8b550d898ab1893cc0125b18f29534a0ec.zip bootable_recovery-bce44d8b550d898ab1893cc0125b18f29534a0ec.tar.gz bootable_recovery-bce44d8b550d898ab1893cc0125b18f29534a0ec.tar.bz2 |
am 660637f3: am e8d953aa: recovery: more cargo-cult programming
* commit '660637f3fc6fe20e8b7f47b98152138c2c92b7ec':
recovery: more cargo-cult programming
-rw-r--r-- | applypatch/applypatch.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/applypatch/applypatch.c b/applypatch/applypatch.c index 5d469ad..a668a5e 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); + int fd = open(partition, O_RDWR | O_DIRECT | 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 write %s attempt %d start at %d\n", partition, attempt+1, start); + printf("raw O_DIRECT 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; |