aboutsummaryrefslogtreecommitdiffstats
path: root/applypatch
diff options
context:
space:
mode:
authorDoug Zongker <dougz@android.com>2013-07-11 12:22:22 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-07-11 12:22:22 -0700
commit660637f3fc6fe20e8b7f47b98152138c2c92b7ec (patch)
tree8bbec3f1733879862ff9510015a02d5e64560c82 /applypatch
parent51ffaf54a56441bba053d37a00122761c3a18f16 (diff)
parente8d953aa7ed0c16beb1b03a05d16cb23dd85e198 (diff)
downloadbootable_recovery-660637f3fc6fe20e8b7f47b98152138c2c92b7ec.zip
bootable_recovery-660637f3fc6fe20e8b7f47b98152138c2c92b7ec.tar.gz
bootable_recovery-660637f3fc6fe20e8b7f47b98152138c2c92b7ec.tar.bz2
am e8d953aa: recovery: more cargo-cult programming
* commit 'e8d953aa7ed0c16beb1b03a05d16cb23dd85e198': recovery: more cargo-cult programming
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 2c62a06..60e26ed 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;