From bcc4893d23bf8aa80bc4b9f7f0d5ce77989ce27c Mon Sep 17 00:00:00 2001 From: "goprife@gmail.com" Date: Wed, 19 Dec 2012 02:42:23 +0000 Subject: [PATCH] 1) add jffs2's dirty space size to total free size 2) change JFFS2_NAME_MAX to 23 git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2497 bbd45198-f89e-11dd-88c7-29a3b14d5316 --- components/dfs/filesystems/jffs2/jffs2_config.h | 2 +- components/dfs/filesystems/jffs2/porting.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/dfs/filesystems/jffs2/jffs2_config.h b/components/dfs/filesystems/jffs2/jffs2_config.h index 8ef01ed22..3340f1ff1 100644 --- a/components/dfs/filesystems/jffs2/jffs2_config.h +++ b/components/dfs/filesystems/jffs2/jffs2_config.h @@ -4,7 +4,7 @@ #define __ECOS /* must be defined */ #define FILE_PATH_MAX 128 /* the longest file path */ -#define CONFIG_JFFS2_ENTRY_NAME_MAX 8 +#define CONFIG_JFFS2_ENTRY_NAME_MAX 23 #define JFFS2_NAME_MAX CONFIG_JFFS2_ENTRY_NAME_MAX #define JFFS2_PATH_MAX FILE_PATH_MAX diff --git a/components/dfs/filesystems/jffs2/porting.c b/components/dfs/filesystems/jffs2/porting.c index ec8c0e0fe..81290bdc3 100644 --- a/components/dfs/filesystems/jffs2/porting.c +++ b/components/dfs/filesystems/jffs2/porting.c @@ -19,7 +19,7 @@ void jffs2_get_info_from_sb(void * data, struct jffs2_fs_info * info) info->sector_size = c->sector_size; info->nr_blocks = c->nr_blocks; - info->free_size = c->free_size; //fixme need test! + info->free_size = c->free_size + c->dirty_size; //fixme need test! } int jffs2_porting_stat(cyg_mtab_entry * mte, cyg_dir dir, const char *name,