diff options
| author | bernard <[email protected]> | 2013-07-24 07:33:48 +0800 |
|---|---|---|
| committer | bernard <[email protected]> | 2013-07-24 07:33:48 +0800 |
| commit | a124e7bd22445ce90fc39419268d1b27e74ffd45 (patch) | |
| tree | 6e10260ee04b990bf021b93b87aa2f7e04f1bb12 /components/dfs | |
| parent | b96b35613f2cdc8118f083a3e2795788915319d7 (diff) | |
add initialization debug code
Diffstat (limited to 'components/dfs')
| -rw-r--r-- | components/dfs/filesystems/elmfat/option/ccfile.c | 3 | ||||
| -rw-r--r-- | components/dfs/src/dfs_fs.c | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/components/dfs/filesystems/elmfat/option/ccfile.c b/components/dfs/filesystems/elmfat/option/ccfile.c index e91db8c702..594cbe71a1 100644 --- a/components/dfs/filesystems/elmfat/option/ccfile.c +++ b/components/dfs/filesystems/elmfat/option/ccfile.c @@ -13,7 +13,7 @@ #ifdef RT_DFS_ELM_USE_LFN static int gbk2uni_fd = -1; static int uni2gbk_fd = -1; -void ff_convert_init() +int ff_convert_init() { gbk2uni_fd = open(GBK2UNI_FILE, O_RDONLY, 0); if (gbk2uni_fd < 0) @@ -22,6 +22,7 @@ void ff_convert_init() uni2gbk_fd = open(UNI2GBK_FILE, O_RDONLY, 0); if (uni2gbk_fd < 0) rt_kprintf("Unable to open Unicode to GBK look up table.\r\n"); + return 0; } INIT_APP_EXPORT(ff_convert_init); diff --git a/components/dfs/src/dfs_fs.c b/components/dfs/src/dfs_fs.c index 8b77aa978b..0b2dea8866 100644 --- a/components/dfs/src/dfs_fs.c +++ b/components/dfs/src/dfs_fs.c @@ -500,12 +500,12 @@ int dfs_statfs(const char *path, struct statfs *buffer) #ifdef RT_USING_DFS_MNTTABLE int dfs_mount_table(void) { - int index; + int index = 0; while (1) { if (mount_table[index].path == RT_NULL) break; - + if (dfs_mount(mount_table[index].device_name, mount_table[index].path, mount_table[index].filesystemtype, |
