summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Baptiste Queru <jbq@google.com>2009-10-15 01:02:08 +0200
committerJean-Baptiste Queru <jbq@google.com>2009-10-15 01:02:08 +0200
commit4011770f2d06fcb743abc91a01a531c7ae2d9175 (patch)
tree85fbf84faee0d164617d2eab10e2f9c805271cf0
parentsimplify construction of the recovery progress bar (diff)
parentam 54ec81fe: Merge change I1c8ca2e4 into eclair (diff)
downloadandroid_bootable_recovery-4011770f2d06fcb743abc91a01a531c7ae2d9175.tar
android_bootable_recovery-4011770f2d06fcb743abc91a01a531c7ae2d9175.tar.gz
android_bootable_recovery-4011770f2d06fcb743abc91a01a531c7ae2d9175.tar.bz2
android_bootable_recovery-4011770f2d06fcb743abc91a01a531c7ae2d9175.tar.lz
android_bootable_recovery-4011770f2d06fcb743abc91a01a531c7ae2d9175.tar.xz
android_bootable_recovery-4011770f2d06fcb743abc91a01a531c7ae2d9175.tar.zst
android_bootable_recovery-4011770f2d06fcb743abc91a01a531c7ae2d9175.zip
Diffstat (limited to '')
-rw-r--r--recovery.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/recovery.c b/recovery.c
index 5b3f6e5fc..438530710 100644
--- a/recovery.c
+++ b/recovery.c
@@ -131,7 +131,6 @@ fopen_root_path(const char *root_path, const char *mode) {
if (strchr("wa", mode[0])) dirCreateHierarchy(path, 0777, NULL, 1);
FILE *fp = fopen(path, mode);
- if (fp == NULL) LOGE("Can't open %s\n", path);
return fp;
}
@@ -229,7 +228,9 @@ finish_recovery(const char *send_intent)
// By this point, we're ready to return to the main system...
if (send_intent != NULL) {
FILE *fp = fopen_root_path(INTENT_FILE, "w");
- if (fp != NULL) {
+ if (fp == NULL) {
+ LOGE("Can't open %s\n", INTENT_FILE);
+ } else {
fputs(send_intent, fp);
check_and_fclose(fp, INTENT_FILE);
}
@@ -237,7 +238,9 @@ finish_recovery(const char *send_intent)
// Copy logs to cache so the system can find out what happened.
FILE *log = fopen_root_path(LOG_FILE, "a");
- if (log != NULL) {
+ if (log == NULL) {
+ LOGE("Can't open %s\n", LOG_FILE);
+ } else {
FILE *tmplog = fopen(TEMPORARY_LOG_FILE, "r");
if (tmplog == NULL) {
LOGE("Can't open %s\n", TEMPORARY_LOG_FILE);