fix fs_os_get_disk_info

This commit is contained in:
xianjimli 2018-11-15 10:58:42 +08:00
parent ed3eca5d26
commit 67dc88cae6
3 changed files with 5 additions and 5 deletions

View File

@ -125,10 +125,10 @@ int32_t fs_get_file_size(fs_t* fs, const char* name) {
return fs->get_file_size(fs, name);
}
ret_t fs_get_disk_info(fs_t* fs, int32_t* free_kb, int32_t* total_kb) {
ret_t fs_get_disk_info(fs_t* fs, const char* volume, int32_t* free_kb, int32_t* total_kb) {
return_value_if_fail(fs != NULL && free_kb != NULL && total_kb != NULL, RET_BAD_PARAMS);
return fs->get_disk_info(fs, free_kb, total_kb);
return fs->get_disk_info(fs, volume, free_kb, total_kb);
}
ret_t fs_get_exe(fs_t* fs, char path[MAX_PATH + 1]) {

View File

@ -88,7 +88,7 @@ typedef bool_t (*fs_dir_exist_t)(fs_t* fs, const char* name);
typedef bool_t (*fs_dir_rename_t)(fs_t* fs, const char* name, const char* new_name);
typedef int32_t (*fs_get_file_size_t)(fs_t* fs, const char* name);
typedef ret_t (*fs_get_disk_info_t)(fs_t* fs, int32_t* free_kb, int32_t* total_kb);
typedef ret_t (*fs_get_disk_info_t)(fs_t* fs, const char* volume, int32_t* free_kb, int32_t* total_kb);
typedef ret_t (*fs_get_exe_t)(fs_t* fs, char path[MAX_PATH + 1]);
typedef ret_t (*fs_get_cwd_t)(fs_t* fs, char path[MAX_PATH + 1]);
@ -120,7 +120,7 @@ bool_t fs_dir_exist(fs_t* fs, const char* name);
bool_t fs_dir_rename(fs_t* fs, const char* name, const char* new_name);
int32_t fs_get_file_size(fs_t* fs, const char* name);
ret_t fs_get_disk_info(fs_t* fs, int32_t* free_kb, int32_t* total_kb);
ret_t fs_get_disk_info(fs_t* fs, const char* volume, int32_t* free_kb, int32_t* total_kb);
ret_t fs_get_exe(fs_t* fs, char path[MAX_PATH + 1]);
ret_t fs_get_cwd(fs_t* fs, char path[MAX_PATH + 1]);

View File

@ -178,7 +178,7 @@ int32_t fs_os_get_file_size(fs_t* fs, const char* name) {
return st.st_size;
}
ret_t fs_os_get_disk_info(fs_t* fs, int32_t* free_kb, int32_t* total_kb) {
ret_t fs_os_get_disk_info(fs_t* fs, const char* volume, int32_t* free_kb, int32_t* total_kb) {
/*TODO*/
*free_kb = 0;
*total_kb = 0;