diff options
Diffstat (limited to '')
-rw-r--r-- | common.h | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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(); |