mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-02-28 05:37:04 +08:00
fixed statfs issue in elmfs porting
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1744 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
parent
1785791733
commit
947ec32efe
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* File : dfs_elm.c
|
||||
* 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.
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2008-02-22 QiuYi The first version.
|
||||
* 2011-10-08 Bernard fixed the block size in statfs.
|
||||
*/
|
||||
|
||||
#include <rtthread.h>
|
||||
#include "ffconf.h"
|
||||
#include "ff.h"
|
||||
@ -177,7 +192,11 @@ int dfs_elm_statfs(struct dfs_filesystem* fs, struct statfs *buf)
|
||||
|
||||
buf->f_bfree = fre_sect;
|
||||
buf->f_blocks = tot_sect;
|
||||
#if _MAX_SS != 512
|
||||
buf->f_bsize = f->ssize;
|
||||
#else
|
||||
buf->f_bsize = 512;
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user