summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2017-04-12 13:07:25 +0800
committerGitHub <[email protected]>2017-04-12 13:07:25 +0800
commit47a185bba1a09090b6f1410e90c6233a6b4e7fbd (patch)
treeb46bf2bc2ed8dd545478b5082664f59d13a60013 /components
parent5502558df94f2636c0e7a4449ec0bc572efc3e1a (diff)
parent3e6f64fe7a89d0a2d2f9fe31bff01d954b9b41ac (diff)
Merge pull request #714 from MoonwalkerLee/master
[BSP] 增加bsp:stm32f429-apollo
Diffstat (limited to 'components')
-rw-r--r--components/dfs/src/dfs_file.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/components/dfs/src/dfs_file.c b/components/dfs/src/dfs_file.c
index 752933b66f..1085a3635a 100644
--- a/components/dfs/src/dfs_file.c
+++ b/components/dfs/src/dfs_file.c
@@ -568,7 +568,6 @@ void rm(const char *filename)
}
}
FINSH_FUNCTION_EXPORT(rm, remove files or directories);
-
void cat(const char* filename)
{
rt_uint32_t length;
@@ -655,8 +654,8 @@ static void copydir(const char * src, const char * dst)
struct dirent dirent;
struct stat stat;
int length;
-
- if (dfs_file_open(&fd, src, DFS_O_DIRECTORY) < 0)
+ struct dfs_fd cpfd;
+ if (dfs_file_open(&cpfd, src, DFS_O_DIRECTORY) < 0)
{
rt_kprintf("open %s failed\n", src);
return ;
@@ -665,7 +664,7 @@ static void copydir(const char * src, const char * dst)
do
{
rt_memset(&dirent, 0, sizeof(struct dirent));
- length = dfs_file_getdents(&fd, &dirent, sizeof(struct dirent));
+ length = dfs_file_getdents(&cpfd, &dirent, sizeof(struct dirent));
if (length > 0)
{
char * src_entry_full = RT_NULL;
@@ -708,7 +707,7 @@ static void copydir(const char * src, const char * dst)
}
}while(length > 0);
- dfs_file_close(&fd);
+ dfs_file_close(&cpfd);
}
static const char *_get_path_lastname(const char *path)