提交 2a858f93 编写于 作者: G goprife@gmail.com

add an option to jump relatvie dir '.' and '..' in jffs2

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1943 bbd45198-f89e-11dd-88c7-29a3b14d5316
上级 29df97e5
......@@ -287,8 +287,12 @@ static int dfs_jffs2_open(struct dfs_fd* file)
/* open dir */
result = jffs2_opendir(mte, mte->root, name, jffs2_file);
if (result)
{
return jffs2_result_to_dfs(result);
}
#ifdef CONFIG_JFFS2_NO_RELATIVEDIR
jffs2_file->f_offset = 2;
#endif
/* save this pointer, it will be used by dfs_jffs2_getdents*/
file->data = jffs2_file;
return 0;
......
......@@ -7,6 +7,18 @@
#define DEVICE_PART_MAX 1 /* the max partions on a nand deivce*/
/* jffs2 support relative dir, command "ls" will get
* +-------------------------------+
* | finsh>>ls("/") |
* | Directory /: |
* | . <DIR> |
* | .. <DIR> |
* | dir1 <DIR> |
* +-------------------------------+
*/
#define CONFIG_JFFS2_NO_RELATIVEDIR
#define CYGPKG_FS_JFFS2_RET_DIRENT_DTYPE /* should be enabled */
#if defined(CYGPKG_FS_JFFS2_RET_DIRENT_DTYPE)
#define CYGPKG_FILEIO_DIRENT_DTYPE
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册