diff options
| author | qiuyiuestc <[email protected]> | 2010-01-25 16:44:49 +0000 |
|---|---|---|
| committer | qiuyiuestc <[email protected]> | 2010-01-25 16:44:49 +0000 |
| commit | 9fb4908710ea9ddca5fd7d6cdd4cf656e98b8bbb (patch) | |
| tree | 3b93fc2f207ea4fcb844c86aa13aac232461a1fe /filesystem/dfs/filesystems | |
| parent | 45a9c5f258ca502663b71cca6246aedb5aeb1051 (diff) | |
support for mini2440 emulator
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@336 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'filesystem/dfs/filesystems')
| -rw-r--r-- | filesystem/dfs/filesystems/efsl/src/fs/vfat/ui.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/filesystem/dfs/filesystems/efsl/src/fs/vfat/ui.c b/filesystem/dfs/filesystems/efsl/src/fs/vfat/ui.c index b37e0397e2..c8e1027219 100644 --- a/filesystem/dfs/filesystems/efsl/src/fs/vfat/ui.c +++ b/filesystem/dfs/filesystems/efsl/src/fs/vfat/ui.c @@ -35,7 +35,7 @@ /*****************************************************************************/ #include "ui.h" #include "ls.h" -#include "efs.h"
+#include "efs.h" /*****************************************************************************/ /* **************************************************************************** @@ -65,12 +65,13 @@ esint16 un_link(FileSystem *fs,euint8* filename) firstCluster <<= 16; firstCluster += ex_getb16(buf+loc.Offset*32+26); attr = ex_getb16(buf+loc.Offset*32+11); + part_relSect(fs->part,buf); + if(attr == ATTR_DIRECTORY) { dlist = (DirList *)rt_malloc(sizeof(DirList)); if(dlist == RT_NULL) { - part_relSect(fs->part,buf); dfs_log(DFS_DEBUG_INFO, ("Memory alloc failed")); return -DFS_STATUS_ENOMEM; @@ -91,9 +92,7 @@ esint16 un_link(FileSystem *fs,euint8* filename) { /* '.' and '..' */ if(dlist->currentEntry.FileName[0] == '.') continue; - - part_relSect(fs->part,buf); - + dfs_log(DFS_DEBUG_INFO, ("Directory not empty")); return -DFS_STATUS_ENOTEMPTY; } @@ -101,7 +100,8 @@ esint16 un_link(FileSystem *fs,euint8* filename) } } } - + + buf = part_getSect(fs->part,loc.Sector,IOM_MODE_READWRITE); memClr(buf+(loc.Offset*32),32); part_relSect(fs->part,buf); cache.DiscCluster = cache.LastCluster = cache.Linear = cache.LogicCluster = 0; |
