Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
rt-thread
提交
773990ab
R
rt-thread
项目概览
BaiXuePrincess
/
rt-thread
与 Fork 源项目一致
Fork自
RT-Thread / rt-thread
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rt-thread
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
773990ab
编写于
6月 26, 2013
作者:
Y
yiyue.fang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Embedded GPLv2 license in dfs
上级
cb517cec
变更
27
显示空白变更内容
内联
并排
Showing
27 changed file
with
1935 addition
and
1529 deletion
+1935
-1529
components/dfs/filesystems/devfs/console.c
components/dfs/filesystems/devfs/console.c
+20
-1
components/dfs/filesystems/devfs/devfs.c
components/dfs/filesystems/devfs/devfs.c
+233
-210
components/dfs/filesystems/devfs/devfs.h
components/dfs/filesystems/devfs/devfs.h
+23
-0
components/dfs/filesystems/elmfat/dfs_elm.c
components/dfs/filesystems/elmfat/dfs_elm.c
+13
-3
components/dfs/filesystems/nfs/dfs_nfs.c
components/dfs/filesystems/nfs/dfs_nfs.c
+999
-963
components/dfs/filesystems/nfs/dfs_nfs.h
components/dfs/filesystems/nfs/dfs_nfs.h
+13
-3
components/dfs/filesystems/ramfs/dfs_ramfs.c
components/dfs/filesystems/ramfs/dfs_ramfs.c
+52
-22
components/dfs/filesystems/ramfs/dfs_ramfs.h
components/dfs/filesystems/ramfs/dfs_ramfs.h
+15
-3
components/dfs/filesystems/romfs/dfs_romfs.c
components/dfs/filesystems/romfs/dfs_romfs.c
+13
-3
components/dfs/filesystems/romfs/dfs_romfs.h
components/dfs/filesystems/romfs/dfs_romfs.h
+13
-3
components/dfs/filesystems/romfs/romfs.c
components/dfs/filesystems/romfs/romfs.c
+40
-12
components/dfs/filesystems/skeleton/skeleton.c
components/dfs/filesystems/skeleton/skeleton.c
+49
-29
components/dfs/filesystems/skeleton/skeleton.h
components/dfs/filesystems/skeleton/skeleton.h
+23
-0
components/dfs/filesystems/uffs/dfs_uffs.c
components/dfs/filesystems/uffs/dfs_uffs.c
+18
-7
components/dfs/filesystems/uffs/dfs_uffs.h
components/dfs/filesystems/uffs/dfs_uffs.h
+20
-3
components/dfs/filesystems/uffs/uffs_nandif.c
components/dfs/filesystems/uffs/uffs_nandif.c
+248
-234
components/dfs/include/dfs.h
components/dfs/include/dfs.h
+13
-3
components/dfs/include/dfs_def.h
components/dfs/include/dfs_def.h
+13
-3
components/dfs/include/dfs_elm.h
components/dfs/include/dfs_elm.h
+13
-3
components/dfs/include/dfs_file.h
components/dfs/include/dfs_file.h
+13
-3
components/dfs/include/dfs_fs.h
components/dfs/include/dfs_fs.h
+13
-3
components/dfs/include/dfs_init.h
components/dfs/include/dfs_init.h
+13
-3
components/dfs/include/dfs_posix.h
components/dfs/include/dfs_posix.h
+13
-3
components/dfs/src/dfs.c
components/dfs/src/dfs.c
+13
-3
components/dfs/src/dfs_file.c
components/dfs/src/dfs_file.c
+13
-3
components/dfs/src/dfs_fs.c
components/dfs/src/dfs_fs.c
+13
-3
components/dfs/src/dfs_posix.c
components/dfs/src/dfs_posix.c
+13
-3
未找到文件。
components/dfs/filesystems/devfs/console.c
浏览文件 @
773990ab
/*
* RT-Thread Console Device File
* File : console.c
* This file is part of Device File System in RT-Thread RTOS
* COPYRIGHT (C) 2004-2011, RT-Thread Development Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
*/
#include <rtthread.h>
struct
console_device
...
...
components/dfs/filesystems/devfs/devfs.c
浏览文件 @
773990ab
/*
* File : devfs.c
* This file is part of Device File System in RT-Thread RTOS
* COPYRIGHT (C) 2004-2011, RT-Thread Development Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
*/
#include <rtthread.h>
#include <dfs.h>
#include <dfs_fs.h>
...
...
components/dfs/filesystems/devfs/devfs.h
浏览文件 @
773990ab
/*
* File : devfs.h
* This file is part of Device File System in RT-Thread RTOS
* COPYRIGHT (C) 2004-2011, RT-Thread Development Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
*/
#ifndef __DEVICE_FS_H__
#define __DEVICE_FS_H__
...
...
components/dfs/filesystems/elmfat/dfs_elm.c
浏览文件 @
773990ab
...
...
@@ -3,9 +3,19 @@
* This file is part of Device File System in RT-Thread RTOS
* COPYRIGHT (C) 2008-2011, RT-Thread Development Team
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rt-thread.org/license/LICENSE.
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
...
...
components/dfs/filesystems/nfs/dfs_nfs.c
浏览文件 @
773990ab
...
...
@@ -3,9 +3,19 @@
* This file is part of Device File System in RT-Thread RTOS
* COPYRIGHT (C) 2004-2011, RT-Thread Development Team
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rt-thread.org/license/LICENSE.
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
...
...
@@ -64,8 +74,10 @@ typedef struct nfs_dir nfs_dir;
nfs_dir
*
nfs_opendir
(
struct
nfs_filesystem
*
nfs
,
const
char
*
path
);
static
int
nfs_parse_host_export
(
const
char
*
host_export
,
char
*
host
,
size_t
host_len
,
char
*
export
,
size_t
export_len
)
char
*
host
,
size_t
host_len
,
char
*
export
,
size_t
export_len
)
{
int
index
;
...
...
@@ -98,6 +110,7 @@ static int nfs_parse_host_export(const char *host_export,
if
(
host_export
[
index
]
==
0
)
{
export
[
index
-
host_len
]
=
'\0'
;
return
0
;
}
...
...
@@ -114,6 +127,7 @@ static void copy_handle(nfs_fh3 *dest, const nfs_fh3 *source)
if
(
dest
->
data
.
data_val
==
RT_NULL
)
{
dest
->
data
.
data_len
=
0
;
return
;
}
...
...
@@ -137,6 +151,7 @@ static nfs_fh3 *get_handle(struct nfs_filesystem *nfs, const char *name)
if
(
handle
==
RT_NULL
)
{
rt_free
(
init
);
return
RT_NULL
;
}
...
...
@@ -165,6 +180,7 @@ static nfs_fh3 *get_handle(struct nfs_filesystem *nfs, const char *name)
rt_free
(
init
);
rt_free
(
handle
);
xdr_free
((
xdrproc_t
)
xdr_nfs_fh3
,
(
char
*
)
&
args
.
what
.
dir
);
return
RT_NULL
;
}
else
if
(
res
.
status
!=
NFS3_OK
)
...
...
@@ -174,6 +190,7 @@ static nfs_fh3 *get_handle(struct nfs_filesystem *nfs, const char *name)
rt_free
(
handle
);
xdr_free
((
xdrproc_t
)
xdr_nfs_fh3
,
(
char
*
)
&
args
.
what
.
dir
);
xdr_free
((
xdrproc_t
)
xdr_LOOKUP3res
,
(
char
*
)
&
res
);
return
RT_NULL
;
}
copy_handle
(
handle
,
&
res
.
LOOKUP3res_u
.
resok
.
object
);
...
...
@@ -182,6 +199,7 @@ static nfs_fh3 *get_handle(struct nfs_filesystem *nfs, const char *name)
}
rt_free
(
init
);
return
handle
;
}
...
...
@@ -201,6 +219,7 @@ static nfs_fh3 *get_dir_handle(struct nfs_filesystem *nfs, const char *name)
if
(
handle
==
RT_NULL
)
{
rt_free
(
init
);
return
RT_NULL
;
}
...
...
@@ -229,6 +248,7 @@ static nfs_fh3 *get_dir_handle(struct nfs_filesystem *nfs, const char *name)
rt_free
(
init
);
rt_free
(
handle
);
xdr_free
((
xdrproc_t
)
xdr_nfs_fh3
,
(
char
*
)
&
args
.
what
.
dir
);
return
RT_NULL
;
}
else
if
(
res
.
status
!=
NFS3_OK
)
...
...
@@ -238,6 +258,7 @@ static nfs_fh3 *get_dir_handle(struct nfs_filesystem *nfs, const char *name)
rt_free
(
handle
);
xdr_free
((
xdrproc_t
)
xdr_nfs_fh3
,
(
char
*
)
&
args
.
what
.
dir
);
xdr_free
((
xdrproc_t
)
xdr_LOOKUP3res
,
(
char
*
)
&
res
);
return
RT_NULL
;
}
copy_handle
(
handle
,
&
res
.
LOOKUP3res_u
.
resok
.
object
);
...
...
@@ -246,6 +267,7 @@ static nfs_fh3 *get_dir_handle(struct nfs_filesystem *nfs, const char *name)
}
rt_free
(
init
);
return
handle
;
}
...
...
@@ -264,6 +286,7 @@ static size_t nfs_get_filesize(struct nfs_filesystem *nfs, nfs_fh3 *handle)
res
.
status
!=
NFS3_OK
)
{
rt_kprintf
(
"GetAttr failed: %d
\n
"
,
res
.
status
);
return
0
;
}
...
...
@@ -294,11 +317,13 @@ rt_bool_t nfs_is_directory(struct nfs_filesystem *nfs, const char *name)
if
(
nfsproc3_getattr_3
(
args
,
&
res
,
nfs
->
nfs_client
)
!=
RPC_SUCCESS
)
{
rt_kprintf
(
"GetAttr failed
\n
"
);
return
RT_FALSE
;
}
else
if
(
res
.
status
!=
NFS3_OK
)
{
rt_kprintf
(
"Getattr failed: %d
\n
"
,
res
.
status
);
return
RT_FALSE
;
}
...
...
@@ -495,6 +520,7 @@ int nfs_unmount(struct dfs_filesystem *fs)
mountproc3_umnt_3
((
char
*
)
nfs
->
export
,
RT_NULL
,
nfs
->
mount_client
)
!=
RPC_SUCCESS
)
{
rt_kprintf
(
"umount failed
\n
"
);
return
-
1
;
}
...
...
@@ -596,6 +622,7 @@ int nfs_read(struct dfs_fd *file, void *buf, rt_size_t count)
}
while
(
count
>
0
);
xdr_free
((
xdrproc_t
)
xdr_READ3res
,
(
char
*
)
&
res
);
return
total
;
}
...
...
@@ -657,6 +684,7 @@ int nfs_write(struct dfs_fd *file, const void *buf, rt_size_t count)
}
while
(
count
>
0
);
xdr_free
((
xdrproc_t
)
xdr_WRITE3res
,
(
char
*
)
&
res
);
return
total
;
}
...
...
@@ -673,6 +701,7 @@ int nfs_lseek(struct dfs_fd *file, rt_off_t offset)
if
(
offset
<=
fd
->
size
)
{
fd
->
offset
=
offset
;
return
offset
;
}
...
...
@@ -734,7 +763,8 @@ int nfs_open(struct dfs_fd *file)
/* create file */
if
(
file
->
flags
&
DFS_O_CREAT
)
{
if
(
nfs_create
(
nfs
,
file
->
path
,
0664
)
<
0
)
return
-
1
;
if
(
nfs_create
(
nfs
,
file
->
path
,
0664
)
<
0
)
return
-
1
;
}
/* open file (get file handle ) */
...
...
@@ -746,6 +776,7 @@ int nfs_open(struct dfs_fd *file)
if
(
handle
==
RT_NULL
)
{
rt_free
(
fp
);
return
-
1
;
}
...
...
@@ -839,6 +870,7 @@ nfs_dir *nfs_opendir(struct nfs_filesystem *nfs, const char *path)
if
(
handle
==
RT_NULL
)
{
rt_free
(
dir
);
return
RT_NULL
;
}
...
...
@@ -877,11 +909,13 @@ char *nfs_readdir(struct nfs_filesystem *nfs, nfs_dir *dir)
if
(
nfsproc3_readdir_3
(
args
,
&
dir
->
res
,
nfs
->
nfs_client
)
!=
RPC_SUCCESS
)
{
rt_kprintf
(
"Readdir failed
\n
"
);
return
RT_NULL
;
}
else
if
(
dir
->
res
.
status
!=
NFS3_OK
)
{
rt_kprintf
(
"Readdir failed: %d
\n
"
,
dir
->
res
.
status
);
return
RT_NULL
;
}
...
...
@@ -896,6 +930,7 @@ char *nfs_readdir(struct nfs_filesystem *nfs, nfs_dir *dir)
strncpy
(
name
,
dir
->
entry
->
name
,
NAME_MAX
-
1
);
dir
->
entry
=
dir
->
entry
->
nextentry
;
name
[
NAME_MAX
-
1
]
=
'\0'
;
return
name
;
}
...
...
@@ -1031,6 +1066,7 @@ int nfs_rename(struct dfs_filesystem *fs, const char *src, const char *dest)
xdr_free
((
xdrproc_t
)
xdr_nfs_fh3
,
(
char
*
)
sHandle
);
xdr_free
((
xdrproc_t
)
xdr_nfs_fh3
,
(
char
*
)
dHandle
);
xdr_free
((
xdrproc_t
)
xdr_RENAME3res
,
(
char
*
)
&
res
);
return
ret
;
}
...
...
components/dfs/filesystems/nfs/dfs_nfs.h
浏览文件 @
773990ab
...
...
@@ -3,9 +3,19 @@
* This file is part of Device File System in RT-Thread RTOS
* COPYRIGHT (C) 2004-2011, RT-Thread Development Team
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rt-thread.org/license/LICENSE.
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
...
...
components/dfs/filesystems/ramfs/dfs_ramfs.c
浏览文件 @
773990ab
/*
* File : dfs_ramfs.c
* This file is part of RT-Thread RTOS
* COPYRIGHT (C) 20
11, Shanghai Real-Thread Technology Co., Ltd
* This file is part of
Device File System in
RT-Thread RTOS
* COPYRIGHT (C) 20
04-2013, RT-Thread Development Team
*
* All rights reserved.
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
...
...
@@ -17,11 +29,14 @@
#include <dfs_fs.h>
#include "dfs_ramfs.h"
int
dfs_ramfs_mount
(
struct
dfs_filesystem
*
fs
,
unsigned
long
rwflag
,
const
void
*
data
)
int
dfs_ramfs_mount
(
struct
dfs_filesystem
*
fs
,
unsigned
long
rwflag
,
const
void
*
data
)
{
struct
dfs_ramfs
*
ramfs
;
if
(
data
==
RT_NULL
)
return
-
DFS_STATUS_EIO
;
if
(
data
==
RT_NULL
)
return
-
DFS_STATUS_EIO
;
ramfs
=
(
struct
dfs_ramfs
*
)
data
;
fs
->
data
=
ramfs
;
...
...
@@ -55,7 +70,9 @@ int dfs_ramfs_ioctl(struct dfs_fd *file, int cmd, void *args)
return
-
DFS_STATUS_EIO
;
}
struct
ramfs_dirent
*
dfs_ramfs_lookup
(
struct
dfs_ramfs
*
ramfs
,
const
char
*
path
,
rt_size_t
*
size
)
struct
ramfs_dirent
*
dfs_ramfs_lookup
(
struct
dfs_ramfs
*
ramfs
,
const
char
*
path
,
rt_size_t
*
size
)
{
const
char
*
subpath
;
struct
ramfs_dirent
*
dirent
;
...
...
@@ -65,6 +82,7 @@ struct ramfs_dirent *dfs_ramfs_lookup(struct dfs_ramfs* ramfs, const char *path,
if
(
!
*
subpath
)
/* is root directory */
{
*
size
=
0
;
return
&
(
ramfs
->
root
);
}
...
...
@@ -75,6 +93,7 @@ struct ramfs_dirent *dfs_ramfs_lookup(struct dfs_ramfs* ramfs, const char *path,
if
(
rt_strcmp
(
dirent
->
name
,
subpath
)
==
0
)
{
*
size
=
dirent
->
size
;
return
dirent
;
}
}
...
...
@@ -122,6 +141,7 @@ int dfs_ramfs_write(struct dfs_fd *fd, const void *buf, rt_size_t count)
if
(
ptr
==
RT_NULL
)
{
rt_set_errno
(
-
RT_ENOMEM
);
return
0
;
}
...
...
@@ -145,6 +165,7 @@ int dfs_ramfs_lseek(struct dfs_fd *file, rt_off_t offset)
if
(
offset
<=
(
rt_off_t
)
file
->
size
)
{
file
->
pos
=
offset
;
return
file
->
pos
;
}
...
...
@@ -154,6 +175,7 @@ int dfs_ramfs_lseek(struct dfs_fd *file, rt_off_t offset)
int
dfs_ramfs_close
(
struct
dfs_fd
*
file
)
{
file
->
data
=
RT_NULL
;
return
DFS_STATUS_OK
;
}
...
...
@@ -195,8 +217,7 @@ int dfs_ramfs_open(struct dfs_fd *file)
if
(
dirent
==
RT_NULL
)
{
if
(
file
->
flags
&
DFS_O_CREAT
||
file
->
flags
&
DFS_O_WRONLY
)
if
(
file
->
flags
&
DFS_O_CREAT
||
file
->
flags
&
DFS_O_WRONLY
)
{
char
*
name_ptr
;
...
...
@@ -209,7 +230,8 @@ int dfs_ramfs_open(struct dfs_fd *file)
/* remove '/' separator */
name_ptr
=
file
->
path
;
while
(
*
name_ptr
==
'/'
&&
*
name_ptr
)
name_ptr
++
;
while
(
*
name_ptr
==
'/'
&&
*
name_ptr
)
name_ptr
++
;
strncpy
(
dirent
->
name
,
name_ptr
,
RAMFS_NAME_MAX
);
rt_list_init
(
&
(
dirent
->
list
));
...
...
@@ -218,7 +240,8 @@ int dfs_ramfs_open(struct dfs_fd *file)
/* add to the root directory */
rt_list_insert_after
(
&
(
ramfs
->
root
.
list
),
&
(
dirent
->
list
));
}
else
return
-
DFS_STATUS_ENOENT
;
else
return
-
DFS_STATUS_ENOENT
;
}
/* Creates a new file. If the file is existing, it is truncated and overwritten. */
...
...
@@ -312,7 +335,8 @@ int dfs_ramfs_unlink(struct dfs_filesystem *fs, const char *path)
RT_ASSERT
(
ramfs
!=
RT_NULL
);
dirent
=
dfs_ramfs_lookup
(
ramfs
,
path
,
&
size
);
if
(
dirent
==
RT_NULL
)
return
-
DFS_STATUS_ENOENT
;
if
(
dirent
==
RT_NULL
)
return
-
DFS_STATUS_ENOENT
;
rt_list_remove
(
&
(
dirent
->
list
));
if
(
dirent
->
data
!=
RT_NULL
)
...
...
@@ -322,7 +346,9 @@ int dfs_ramfs_unlink(struct dfs_filesystem *fs, const char *path)
return
DFS_STATUS_OK
;
}
int
dfs_ramfs_rename
(
struct
dfs_filesystem
*
fs
,
const
char
*
oldpath
,
const
char
*
newpath
)
int
dfs_ramfs_rename
(
struct
dfs_filesystem
*
fs
,
const
char
*
oldpath
,
const
char
*
newpath
)
{
struct
ramfs_dirent
*
dirent
;
struct
dfs_ramfs
*
ramfs
;
...
...
@@ -332,10 +358,12 @@ int dfs_ramfs_rename(struct dfs_filesystem *fs, const char *oldpath, const char
RT_ASSERT
(
ramfs
!=
RT_NULL
);
dirent
=
dfs_ramfs_lookup
(
ramfs
,
newpath
,
&
size
);
if
(
dirent
!=
RT_NULL
)
return
-
DFS_STATUS_EEXIST
;
if
(
dirent
!=
RT_NULL
)
return
-
DFS_STATUS_EEXIST
;
dirent
=
dfs_ramfs_lookup
(
ramfs
,
oldpath
,
&
size
);
if
(
dirent
==
RT_NULL
)
return
-
DFS_STATUS_ENOENT
;
if
(
dirent
==
RT_NULL
)
return
-
DFS_STATUS_ENOENT
;
strncpy
(
dirent
->
name
,
newpath
,
RAMFS_NAME_MAX
);
...
...
@@ -368,10 +396,11 @@ int dfs_ramfs_init(void)
{
/* register ram file system */
dfs_register
(
&
_ramfs
);
return
0
;
}
struct
dfs_ramfs
*
dfs_ramfs_create
(
rt_uint8_t
*
pool
,
rt_size_t
size
)
struct
dfs_ramfs
*
dfs_ramfs_create
(
rt_uint8_t
*
pool
,
rt_size_t
size
)
{
struct
dfs_ramfs
*
ramfs
;
rt_uint8_t
*
data_ptr
;
...
...
@@ -385,7 +414,8 @@ struct dfs_ramfs* dfs_ramfs_create(rt_uint8_t* pool, rt_size_t size)
size
=
RT_ALIGN_DOWN
(
size
,
RT_ALIGN_SIZE
);
result
=
rt_memheap_init
(
&
ramfs
->
memheap
,
"ramfs"
,
data_ptr
,
size
);
if
(
result
!=
RT_EOK
)
return
RT_NULL
;
if
(
result
!=
RT_EOK
)
return
RT_NULL
;
/* detach this memheap object from the system */
rt_object_detach
((
rt_object_t
)
&
(
ramfs
->
memheap
));
...
...
components/dfs/filesystems/ramfs/dfs_ramfs.h
浏览文件 @
773990ab
/*
* File : dfs_ramfs.h
* This file is part of RT-Thread RTOS
* COPYRIGHT (C) 20
11, Shanghai Real-Thread Technology Co., Ltd
* This file is part of
Device File System in
RT-Thread RTOS
* COPYRIGHT (C) 20
04-2013, RT-Thread Development Team
*
* All rights reserved.
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
...
...
components/dfs/filesystems/romfs/dfs_romfs.c
浏览文件 @
773990ab
...
...
@@ -3,9 +3,19 @@
* This file is part of Device File System in RT-Thread RTOS
* COPYRIGHT (C) 2004-2011, RT-Thread Development Team
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rt-thread.org/license/LICENSE.
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
...
...
components/dfs/filesystems/romfs/dfs_romfs.h
浏览文件 @
773990ab
...
...
@@ -3,9 +3,19 @@
* This file is part of Device File System in RT-Thread RTOS
* COPYRIGHT (C) 2004-2011, RT-Thread Development Team
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rt-thread.org/license/LICENSE.
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
...
...
components/dfs/filesystems/romfs/romfs.c
浏览文件 @
773990ab
/*
* File : romfs.c
* This file is part of Device File System in RT-Thread RTOS
* COPYRIGHT (C) 2004-2011, RT-Thread Development Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
*/
#include <dfs_romfs.h>
const
static
unsigned
char
_dummy_dummy_txt
[]
=
{
0x74
,
0x68
,
0x69
,
0x73
,
0x20
,
0x69
,
0x73
,
0x20
,
0x61
,
0x20
,
0x66
,
0x69
,
0x6c
,
0x65
,
0x21
,
0x0d
,
0x0a
,
const
static
unsigned
char
_dummy_dummy_txt
[]
=
{
0x74
,
0x68
,
0x69
,
0x73
,
0x20
,
0x69
,
0x73
,
0x20
,
0x61
,
0x20
,
0x66
,
0x69
,
0x6c
,
0x65
,
0x21
,
0x0d
,
0x0a
,
};
const
static
struct
romfs_dirent
_dummy
[]
=
{
const
static
struct
romfs_dirent
_dummy
[]
=
{
{
ROMFS_DIRENT_FILE
,
"dummy.txt"
,
_dummy_dummy_txt
,
sizeof
(
_dummy_dummy_txt
)},
};
const
static
unsigned
char
_dummy_txt
[]
=
{
0x74
,
0x68
,
0x69
,
0x73
,
0x20
,
0x69
,
0x73
,
0x20
,
0x61
,
0x20
,
0x66
,
0x69
,
0x6c
,
0x65
,
0x21
,
0x0d
,
0x0a
,
const
static
unsigned
char
_dummy_txt
[]
=
{
0x74
,
0x68
,
0x69
,
0x73
,
0x20
,
0x69
,
0x73
,
0x20
,
0x61
,
0x20
,
0x66
,
0x69
,
0x6c
,
0x65
,
0x21
,
0x0d
,
0x0a
,
};
const
struct
romfs_dirent
_root_dirent
[]
=
{
{
ROMFS_DIRENT_DIR
,
"dummy"
,
(
rt_uint8_t
*
)
_dummy
,
sizeof
(
_dummy
)
/
sizeof
(
_dummy
[
0
])},
const
struct
romfs_dirent
_root_dirent
[]
=
{
{
ROMFS_DIRENT_DIR
,
"dummy"
,
(
rt_uint8_t
*
)
_dummy
,
sizeof
(
_dummy
)
/
sizeof
(
_dummy
[
0
])},
{
ROMFS_DIRENT_FILE
,
"dummy.txt"
,
_dummy_txt
,
sizeof
(
_dummy_txt
)},
};
const
struct
romfs_dirent
romfs_root
=
{
ROMFS_DIRENT_DIR
,
"/"
,
(
rt_uint8_t
*
)
_root_dirent
,
sizeof
(
_root_dirent
)
/
sizeof
(
_root_dirent
[
0
])};
const
struct
romfs_dirent
romfs_root
=
{
ROMFS_DIRENT_DIR
,
"/"
,
(
rt_uint8_t
*
)
_root_dirent
,
sizeof
(
_root_dirent
)
/
sizeof
(
_root_dirent
[
0
])
};
components/dfs/filesystems/skeleton/skeleton.c
浏览文件 @
773990ab
/*
* A skeleton of file system in Device File System
* File : skeleton.c
* This file is part of Device File System in RT-Thread RTOS
* COPYRIGHT (C) 2004-2011, RT-Thread Development Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
*/
#include <rtthread.h>
#include <dfs.h>
#include <dfs_fs.h>
...
...
components/dfs/filesystems/skeleton/skeleton.h
浏览文件 @
773990ab
/*
* File : skeleton.h
* This file is part of Device File System in RT-Thread RTOS
* COPYRIGHT (C) 2004-2011, RT-Thread Development Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
*/
#ifndef __SKELETON_H__
#define __SKELETON_H__
...
...
components/dfs/filesystems/uffs/dfs_uffs.c
浏览文件 @
773990ab
/*
* File :
rtthread.h
* This file is part of RT-Thread RTOS
* COPYRIGHT (C) 200
6
-2012, RT-Thread Development Team
* File :
dfs_uffs.c
* This file is part of
Device File System in
RT-Thread RTOS
* COPYRIGHT (C) 200
4
-2012, RT-Thread Development Team
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rt-thread.org/license/LICENSE.
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
* 2011-10-22 prife the first version
* 2012-03-28 prife use mtd device interface
* 2012-04-05 prife update uffs with official repo and use uffs_UnMount/Mount
*/
*/
#include <rtthread.h>
#include <dfs_fs.h>
...
...
components/dfs/filesystems/uffs/dfs_uffs.h
浏览文件 @
773990ab
/*
* dfs_uffs.h
* File : dfs_uffs.h
* This file is part of Device File System in RT-Thread RTOS
* COPYRIGHT (C) 2004-2012, RT-Thread Development Team
*
* Created on: 2012-3-30
* Author: prife
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
* 2012-03-30 prife the first version
*/
#ifndef DFS_UFFS_H_
...
...
components/dfs/filesystems/uffs/uffs_nandif.c
浏览文件 @
773990ab
...
...
@@ -18,7 +18,9 @@ static int nand_release_flash(uffs_Device *dev)
static
int
nand_erase_block
(
uffs_Device
*
dev
,
unsigned
block
)
{
int
res
;
res
=
rt_mtd_nand_erase_block
(
RT_MTD_NAND_DEVICE
(
dev
->
_private
),
block
);
return
res
==
RT_EOK
?
UFFS_FLASH_NO_ERR
:
UFFS_FLASH_IO_ERR
;
}
...
...
@@ -26,26 +28,31 @@ static int nand_erase_block(uffs_Device *dev, unsigned block)
static
int
nand_check_block
(
uffs_Device
*
dev
,
unsigned
block
)
{
int
res
;
res
=
rt_mtd_nand_check_block
(
RT_MTD_NAND_DEVICE
(
dev
->
_private
),
block
);
return
res
==
RT_EOK
?
UFFS_FLASH_NO_ERR
:
UFFS_FLASH_BAD_BLK
;
}
static
int
nand_mark_badblock
(
uffs_Device
*
dev
,
unsigned
block
)
{
int
res
;
res
=
rt_mtd_nand_mark_badblock
(
RT_MTD_NAND_DEVICE
(
dev
->
_private
),
block
);
return
res
==
RT_EOK
?
UFFS_FLASH_NO_ERR
:
UFFS_FLASH_IO_ERR
;
}
#endif
#if (RT_CONFIG_UFFS_ECC_MODE == UFFS_ECC_NONE) || (RT_CONFIG_UFFS_ECC_MODE == UFFS_ECC_SOFT)
static
int
nand_read_page
(
uffs_Device
*
dev
,
u32
block
,
u32
page
,
u8
*
data
,
int
data_len
,
u8
*
ecc
,
rt_uint8_t
*
spare
,
int
spare_len
)
static
int
nand_read_page
(
uffs_Device
*
dev
,
u32
block
,
u32
page
,
u8
*
data
,
int
data_len
,
u8
*
ecc
,
rt_uint8_t
*
spare
,
int
spare_len
)
{
int
res
;
...
...
@@ -66,6 +73,7 @@ static int nand_read_page(
res
=
spare
[
dev
->
attr
->
block_status_offs
]
==
0xFF
?
UFFS_FLASH_NO_ERR
:
UFFS_FLASH_BAD_BLK
;
return
res
;
#endif
}
...
...
@@ -76,11 +84,13 @@ static int nand_read_page(
return
UFFS_FLASH_NO_ERR
;
}
static
int
nand_write_page
(
uffs_Device
*
dev
,
u32
block
,
u32
page
,
const
u8
*
data
,
int
data_len
,
const
u8
*
spare
,
int
spare_len
)
static
int
nand_write_page
(
uffs_Device
*
dev
,
u32
block
,
u32
page
,
const
u8
*
data
,
int
data_len
,
const
u8
*
spare
,
int
spare_len
)
{
int
res
;
...
...
@@ -136,9 +146,8 @@ const uffs_FlashOps nand_ops =
nand_erase_block
,
/* EraseBlock() */
};
void
uffs_setup_storage
(
struct
uffs_StorageAttrSt
*
attr
,
struct
rt_mtd_nand_device
*
nand
)
void
uffs_setup_storage
(
struct
uffs_StorageAttrSt
*
attr
,
struct
rt_mtd_nand_device
*
nand
)
{
rt_memset
(
attr
,
0
,
sizeof
(
struct
uffs_StorageAttrSt
));
...
...
@@ -153,10 +162,11 @@ void uffs_setup_storage(
}
#elif RT_CONFIG_UFFS_ECC_MODE == UFFS_ECC_HW_AUTO
static
int
WritePageWithLayout
(
uffs_Device
*
dev
,
u32
block
,
u32
page
,
const
u8
*
data
,
int
data_len
,
static
int
WritePageWithLayout
(
uffs_Device
*
dev
,
u32
block
,
u32
page
,
const
u8
*
data
,
int
data_len
,
const
u8
*
ecc
,
//NULL
const
uffs_TagStore
*
ts
)
{
...
...
@@ -186,7 +196,6 @@ static int WritePageWithLayout(
dev
->
st
.
io_write
++
;
return
UFFS_FLASH_NO_ERR
;
#endif
}
...
...
@@ -216,9 +225,11 @@ __error:
return
UFFS_FLASH_IO_ERR
;
}
static
URET
ReadPageWithLayout
(
uffs_Device
*
dev
,
u32
block
,
u32
page
,
u8
*
data
,
int
data_len
,
static
URET
ReadPageWithLayout
(
uffs_Device
*
dev
,
u32
block
,
u32
page
,
u8
*
data
,
int
data_len
,
u8
*
ecc
,
//NULL
uffs_TagStore
*
ts
,
u8
*
ecc_store
)
//NULL
...
...
@@ -304,14 +315,17 @@ const uffs_FlashOps nand_ops =
};
static
rt_uint8_t
hw_flash_data_layout
[
UFFS_SPARE_LAYOUT_SIZE
]
=
{
0x05
,
0x08
,
0xFF
,
0x00
};
{
0x05
,
0x08
,
0xFF
,
0x00
};
static
rt_uint8_t
hw_flash_ecc_layout
[
UFFS_SPARE_LAYOUT_SIZE
]
=
{
0x00
,
0x04
,
0xFF
,
0x00
};
{
0x00
,
0x04
,
0xFF
,
0x00
};
void
uffs_setup_storage
(
struct
uffs_StorageAttrSt
*
attr
,
struct
rt_mtd_nand_device
*
nand
)
void
uffs_setup_storage
(
struct
uffs_StorageAttrSt
*
attr
,
struct
rt_mtd_nand_device
*
nand
)
{
rt_memset
(
attr
,
0
,
sizeof
(
struct
uffs_StorageAttrSt
));
...
...
components/dfs/include/dfs.h
浏览文件 @
773990ab
...
...
@@ -3,9 +3,19 @@
* This file is part of Device File System in RT-Thread RTOS
* COPYRIGHT (C) 2004-2012, RT-Thread Development Team
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rt-thread.org/license/LICENSE.
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
...
...
components/dfs/include/dfs_def.h
浏览文件 @
773990ab
...
...
@@ -3,9 +3,19 @@
* This file is part of Device File System in RT-Thread RTOS
* COPYRIGHT (C) 2004-2012, RT-Thread Development Team
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rt-thread.org/license/LICENSE.
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
...
...
components/dfs/include/dfs_elm.h
浏览文件 @
773990ab
...
...
@@ -3,9 +3,19 @@
* This file is part of Device File System in RT-Thread RTOS
* COPYRIGHT (C) 2008-2012, RT-Thread Development Team
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rt-thread.org/license/LICENSE.
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
...
...
components/dfs/include/dfs_file.h
浏览文件 @
773990ab
...
...
@@ -3,9 +3,19 @@
* This file is part of Device File System in RT-Thread RTOS
* COPYRIGHT (C) 2004-2012, RT-Thread Development Team
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rt-thread.org/license/LICENSE.
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
...
...
components/dfs/include/dfs_fs.h
浏览文件 @
773990ab
...
...
@@ -3,9 +3,19 @@
* This file is part of Device File System in RT-Thread RTOS
* COPYRIGHT (C) 2004-2012, RT-Thread Development Team
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rt-thread.org/license/LICENSE.
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
...
...
components/dfs/include/dfs_init.h
浏览文件 @
773990ab
...
...
@@ -3,9 +3,19 @@
* This file is part of Device File System in RT-Thread RTOS
* COPYRIGHT (C) 2004-2012, RT-Thread Development Team
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rt-thread.org/license/LICENSE.
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
...
...
components/dfs/include/dfs_posix.h
浏览文件 @
773990ab
...
...
@@ -3,9 +3,19 @@
* This file is part of Device File System in RT-Thread RTOS
* COPYRIGHT (C) 2004-2012, RT-Thread Development Team
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rt-thread.org/license/LICENSE.
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
...
...
components/dfs/src/dfs.c
浏览文件 @
773990ab
...
...
@@ -3,9 +3,19 @@
* This file is part of Device File System in RT-Thread RTOS
* COPYRIGHT (C) 2004-2012, RT-Thread Development Team
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rt-thread.org/license/LICENSE.
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
...
...
components/dfs/src/dfs_file.c
浏览文件 @
773990ab
...
...
@@ -3,9 +3,19 @@
* This file is part of Device File System in RT-Thread RTOS
* COPYRIGHT (C) 2004-2011, RT-Thread Development Team
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rt-thread.org/license/LICENSE.
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
...
...
components/dfs/src/dfs_fs.c
浏览文件 @
773990ab
...
...
@@ -3,9 +3,19 @@
* This file is part of Device File System in RT-Thread RTOS
* COPYRIGHT (C) 2004-2012, RT-Thread Development Team
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rt-thread.org/license/LICENSE.
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
...
...
components/dfs/src/dfs_posix.c
浏览文件 @
773990ab
...
...
@@ -3,9 +3,19 @@
* This file is part of Device File System in RT-Thread RTOS
* COPYRIGHT (C) 2004-2012, RT-Thread Development Team
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rt-thread.org/license/LICENSE.
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Change Logs:
* Date Author Notes
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录