summaryrefslogtreecommitdiffstats
path: root/common.h
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2018-05-01 19:54:40 +0200
committerGerrit Code Review <noreply-gerritcodereview@google.com>2018-05-01 19:54:40 +0200
commit0204e880730fc58eb09f86af0a55a768ca0b068d (patch)
tree3fedcc8cfb126580ef1e7fa771f97ba10ec8dacb /common.h
parentMerge "Drop '#include "ui.h"' from device.h." (diff)
parentrecovery: Split main() into recovery_main.cpp. (diff)
downloadandroid_bootable_recovery-0204e880730fc58eb09f86af0a55a768ca0b068d.tar
android_bootable_recovery-0204e880730fc58eb09f86af0a55a768ca0b068d.tar.gz
android_bootable_recovery-0204e880730fc58eb09f86af0a55a768ca0b068d.tar.bz2
android_bootable_recovery-0204e880730fc58eb09f86af0a55a768ca0b068d.tar.lz
android_bootable_recovery-0204e880730fc58eb09f86af0a55a768ca0b068d.tar.xz
android_bootable_recovery-0204e880730fc58eb09f86af0a55a768ca0b068d.tar.zst
android_bootable_recovery-0204e880730fc58eb09f86af0a55a768ca0b068d.zip
Diffstat (limited to 'common.h')
-rw-r--r--common.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/common.h b/common.h
index 4228e71de..33c5ba08f 100644
--- a/common.h
+++ b/common.h
@@ -37,9 +37,13 @@ extern std::string stage;
// The reason argument provided in "--reason=".
extern const char* reason;
-// fopen a file, mounting volumes and making parent dirs as necessary.
+// fopen(3)'s the given file, by mounting volumes and making parent dirs as necessary. Returns the
+// file pointer, or nullptr on error.
FILE* fopen_path(const std::string& path, const char* mode);
+// In turn fflush(3)'s, fsync(3)'s and fclose(3)'s the given stream.
+void check_and_fclose(FILE* fp, const std::string& name);
+
void ui_print(const char* format, ...) __printflike(1, 2);
bool is_ro_debuggable();