summaryrefslogtreecommitdiffstats
path: root/applypatch/applypatch.cpp
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2016-02-10 20:46:57 +0100
committerTao Bao <tbao@google.com>2016-02-10 20:46:57 +0100
commit4f0eb3e23a8f13d782a79bf76f95869d403b46e5 (patch)
tree1a14d63ad6963d8987195f1e308a06361cd6e361 /applypatch/applypatch.cpp
parentMerge "applypatch: Add a Makefile to build imgdiff in Chrome OS." (diff)
parentMerge "IO fault injection for OTA packages" (diff)
downloadandroid_bootable_recovery-4f0eb3e23a8f13d782a79bf76f95869d403b46e5.tar
android_bootable_recovery-4f0eb3e23a8f13d782a79bf76f95869d403b46e5.tar.gz
android_bootable_recovery-4f0eb3e23a8f13d782a79bf76f95869d403b46e5.tar.bz2
android_bootable_recovery-4f0eb3e23a8f13d782a79bf76f95869d403b46e5.tar.lz
android_bootable_recovery-4f0eb3e23a8f13d782a79bf76f95869d403b46e5.tar.xz
android_bootable_recovery-4f0eb3e23a8f13d782a79bf76f95869d403b46e5.tar.zst
android_bootable_recovery-4f0eb3e23a8f13d782a79bf76f95869d403b46e5.zip
Diffstat (limited to 'applypatch/applypatch.cpp')
-rw-r--r--applypatch/applypatch.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/applypatch/applypatch.cpp b/applypatch/applypatch.cpp
index 9f5e2f200..4eec33256 100644
--- a/applypatch/applypatch.cpp
+++ b/applypatch/applypatch.cpp
@@ -89,7 +89,7 @@ int LoadFileContents(const char* filename, FileContents* file) {
size_t bytes_read = ota_fread(data.get(), 1, file->size, f);
if (bytes_read != static_cast<size_t>(file->size)) {
printf("short read of \"%s\" (%zu bytes of %zd)\n", filename, bytes_read, file->size);
- fclose(f);
+ ota_fclose(f);
return -1;
}
ota_fclose(f);
@@ -936,7 +936,7 @@ static int GenerateTarget(FileContents* source_file,
} else {
// We write the decoded output to "<tgt-file>.patch".
output_fd = ota_open(tmp_target_filename.c_str(), O_WRONLY | O_CREAT | O_TRUNC | O_SYNC,
- S_IRUSR | S_IWUSR);
+ S_IRUSR | S_IWUSR);
if (output_fd < 0) {
printf("failed to open output file %s: %s\n", tmp_target_filename.c_str(),
strerror(errno));