diff options
| author | bernard.xiong <[email protected]> | 2010-08-03 08:47:09 +0000 |
|---|---|---|
| committer | bernard.xiong <[email protected]> | 2010-08-03 08:47:09 +0000 |
| commit | 8772a35e3b05db97e5674bb0be85716dca8644c8 (patch) | |
| tree | 4ca72de0a02e68452cb605cb329cf944b0f6986d /components/dfs/src | |
| parent | 7f5d09c9294d5c328e48c3a7caf6910c85752146 (diff) | |
change dfs_stat/dfs_statfs to _stat/_statfs.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@822 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'components/dfs/src')
| -rw-r--r-- | components/dfs/src/dfs_file.c | 14 | ||||
| -rw-r--r-- | components/dfs/src/dfs_fs.c | 4 | ||||
| -rw-r--r-- | components/dfs/src/dfs_posix.c | 12 |
3 files changed, 15 insertions, 15 deletions
diff --git a/components/dfs/src/dfs_file.c b/components/dfs/src/dfs_file.c index f5562dc4a8..8450fee03c 100644 --- a/components/dfs/src/dfs_file.c +++ b/components/dfs/src/dfs_file.c @@ -173,7 +173,7 @@ int dfs_file_read(struct dfs_fd* fd, void *buf, rt_size_t len) *
* @return the read dirent, others on failed.
*/
-int dfs_file_getdents(struct dfs_fd* fd, struct dfs_dirent* dirp, rt_size_t nbytes)
+int dfs_file_getdents(struct dfs_fd* fd, struct _dirent* dirp, rt_size_t nbytes)
{
struct dfs_filesystem* fs;
@@ -298,7 +298,7 @@ int dfs_file_lseek(struct dfs_fd* fd, rt_off_t offset) *
* @return 0 on successful, -1 on failed.
*/
-int dfs_file_stat(const char *path, struct dfs_stat *buf)
+int dfs_file_stat(const char *path, struct _stat *buf)
{
int result;
char* fullpath;
@@ -422,10 +422,10 @@ __exit: #include <finsh.h>
static struct dfs_fd fd;
-static struct dfs_dirent dirent;
+static struct _dirent dirent;
void ls(const char* pathname)
{
- struct dfs_stat stat;
+ struct _stat stat;
int length;
char* fullpath;
@@ -437,11 +437,11 @@ void ls(const char* pathname) rt_kprintf("Directory %s:\n", pathname);
do
{
- rt_memset(&dirent, 0, sizeof(struct dfs_dirent));
- length = dfs_file_getdents(&fd, &dirent, sizeof(struct dfs_dirent));
+ rt_memset(&dirent, 0, sizeof(struct _dirent));
+ length = dfs_file_getdents(&fd, &dirent, sizeof(struct _dirent));
if ( length > 0 )
{
- rt_memset(&stat, 0, sizeof(struct dfs_stat));
+ rt_memset(&stat, 0, sizeof(struct _stat));
/* build full path for each file */
if (pathname[strlen(pathname) - 1] != '/')
diff --git a/components/dfs/src/dfs_fs.c b/components/dfs/src/dfs_fs.c index 98e61abd83..71ddb479ec 100644 --- a/components/dfs/src/dfs_fs.c +++ b/components/dfs/src/dfs_fs.c @@ -408,7 +408,7 @@ int dfs_mkfs(const char* fs_name, const char* device_name) *
* @return 0 on successful, others on failed.
*/
-int dfs_statfs(const char* path, struct dfs_statfs* buffer)
+int dfs_statfs(const char* path, struct _statfs* buffer)
{
struct dfs_filesystem* fs;
@@ -432,7 +432,7 @@ FINSH_FUNCTION_EXPORT(mkfs, make a file system); void df(const char* path)
{
- struct dfs_statfs buffer;
+ struct _statfs buffer;
if (dfs_statfs(path, &buffer) == 0)
{
diff --git a/components/dfs/src/dfs_posix.c b/components/dfs/src/dfs_posix.c index 8b5918cb58..415ae455b1 100644 --- a/components/dfs/src/dfs_posix.c +++ b/components/dfs/src/dfs_posix.c @@ -261,7 +261,7 @@ int unlink(const char *pathname) *
* @return 0 on successful, -1 on failed.
*/
-int stat(const char *file, struct dfs_stat *buf)
+int stat(const char *file, struct _stat *buf)
{
int result;
@@ -283,7 +283,7 @@ int stat(const char *file, struct dfs_stat *buf) *
* @return 0 on successful, others on failed.
*/
-int statfs(const char *path, struct dfs_statfs *buf)
+int statfs(const char *path, struct _statfs *buf)
{
int result;
@@ -404,7 +404,7 @@ DIR* opendir(const char* name) *
* @return the next directory entry, NULL on the end of directory or failed.
*/
-struct dfs_dirent* readdir(DIR *d)
+struct _dirent* readdir(DIR *d)
{
int result;
struct dfs_fd* fd;
@@ -416,9 +416,9 @@ struct dfs_dirent* readdir(DIR *d) return RT_NULL;
}
- if (!d->num || (d->cur += ((struct dfs_dirent*)(d->buf + d->cur))->d_reclen) >= d->num)
+ if (!d->num || (d->cur += ((struct _dirent*)(d->buf + d->cur))->d_reclen) >= d->num)
{
- result = dfs_file_getdents(fd, (struct dfs_dirent*)d->buf, sizeof(d->buf) - 1);
+ result = dfs_file_getdents(fd, (struct _dirent*)d->buf, sizeof(d->buf) - 1);
if (result <= 0)
{
rt_set_errno(result);
@@ -432,7 +432,7 @@ struct dfs_dirent* readdir(DIR *d) }
fd_put(fd);
- return (struct dfs_dirent*)(d->buf+d->cur);
+ return (struct _dirent*)(d->buf+d->cur);
}
/**
|
