summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Runge <mrunge@google.com>2013-12-27 00:33:28 +0100
committerAndroid Git Automerger <android-git-automerger@android.com>2013-12-27 00:33:28 +0100
commit15f5fe1bcd2bf18b07f89d0cc58dcffb5bc1f932 (patch)
tree6fde5ea05804ee8b672c3a874279dd1e3ef587cc
parentam 168724c3: fix unnecessarily slow writing of EMMC partitions (diff)
parentMerge "Don't abort on read_file if the file is missing." into klp-dev (diff)
downloadandroid_bootable_recovery-15f5fe1bcd2bf18b07f89d0cc58dcffb5bc1f932.tar
android_bootable_recovery-15f5fe1bcd2bf18b07f89d0cc58dcffb5bc1f932.tar.gz
android_bootable_recovery-15f5fe1bcd2bf18b07f89d0cc58dcffb5bc1f932.tar.bz2
android_bootable_recovery-15f5fe1bcd2bf18b07f89d0cc58dcffb5bc1f932.tar.lz
android_bootable_recovery-15f5fe1bcd2bf18b07f89d0cc58dcffb5bc1f932.tar.xz
android_bootable_recovery-15f5fe1bcd2bf18b07f89d0cc58dcffb5bc1f932.tar.zst
android_bootable_recovery-15f5fe1bcd2bf18b07f89d0cc58dcffb5bc1f932.zip
-rw-r--r--updater/install.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/updater/install.c b/updater/install.c
index 75bf4e1a0..aebd4f34b 100644
--- a/updater/install.c
+++ b/updater/install.c
@@ -1271,7 +1271,6 @@ Value* Sha1CheckFn(const char* name, State* state, int argc, Expr* argv[]) {
}
if (args[0]->size < 0) {
- printf("%s(): no file contents received", name);
return StringValue(strdup(""));
}
uint8_t digest[SHA_DIGEST_SIZE];
@@ -1324,12 +1323,11 @@ Value* ReadFileFn(const char* name, State* state, int argc, Expr* argv[]) {
FileContents fc;
if (LoadFileContents(filename, &fc, RETOUCH_DONT_MASK) != 0) {
- ErrorAbort(state, "%s() loading \"%s\" failed: %s",
- name, filename, strerror(errno));
free(filename);
- free(v);
+ v->size = -1;
+ v->data = NULL;
free(fc.data);
- return NULL;
+ return v;
}
v->size = fc.size;