diff options
Diffstat (limited to '')
-rw-r--r-- | otautil/include/otautil/logging.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/otautil/include/otautil/logging.h b/otautil/include/otautil/logging.h index c4f13292b..608349785 100644 --- a/otautil/include/otautil/logging.h +++ b/otautil/include/otautil/logging.h @@ -18,9 +18,11 @@ #define _LOGGING_H #include <stddef.h> +#include <sys/stat.h> #include <sys/types.h> #include <string> +#include <vector> #include <log/log_id.h> @@ -28,6 +30,14 @@ static constexpr int KEEP_LOG_COUNT = 10; struct selabel_handle; +struct saved_log_file { + std::string name; + struct stat sb; + std::string data; +}; + +void SetLoggingSehandle(selabel_handle* handle); + ssize_t logbasename(log_id_t id, char prio, const char* filename, const char* buf, size_t len, void* arg); @@ -48,4 +58,8 @@ void reset_tmplog_offset(); void save_kernel_log(const char* destination); +std::vector<saved_log_file> ReadLogFilesToMemory(); + +bool RestoreLogFilesAfterFormat(const std::vector<saved_log_file>& log_files); + #endif //_LOGGING_H |