tools: acrn-crashlog: add more functions to file system utils

More file system operations for acrn-crashlog.

Signed-off-by: Liu Xinwu <xinwu.liu@intel.com>
Signed-off-by: CHEN Gang <gang.c.chen@intel.com>
Reviewed-by: Zhang Yanmin <yanmin.zhang@intel.com>
Reviewed-by: Liu Chuansheng <chuansheng.liu@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
Acked-by: Eddie Dong <Eddie.dong@intel.com>
This commit is contained in:
Liu Xinwu
2018-05-08 11:05:40 +08:00
committed by lijinxia
parent 87b8968314
commit 543cdce6c6
2 changed files with 543 additions and 0 deletions

View File

@@ -88,5 +88,17 @@ void file_reset_init(const char *filename);
int file_read_int(const char *filename, unsigned int *pcurrent);
int file_update_int(const char *filename, unsigned int current,
unsigned int max);
int do_copy_eof(const char *src, const char *des);
int space_available(char *path, int quota);
int count_lines_in_file(const char *filename);
int read_full_binary_file(const char *path, unsigned long *size,
void **data);
int file_read_key_value(char *path, char *key, char *value);
int file_read_key_value_r(char *path, char *key, char *value);
int dir_contains(const char *dir, const char *filename, int exact,
char *fullname);
int lsdir(const char *dir, char *fullname[], int limit);
int find_file(char *dir, char *target_file, int depth, char *path[], int limit);
int read_file(const char *path, unsigned long *size, void **data);
#endif