mirror of
https://gitee.com/Vancouver2017/luban-lite.git
synced 2025-12-17 01:28:54 +00:00
v1.2.1
This commit is contained in:
@@ -466,7 +466,11 @@ int dfs_elm_close(struct dfs_fd *file)
|
||||
fd = (FIL *)(file->data);
|
||||
RT_ASSERT(fd != RT_NULL);
|
||||
|
||||
result = f_close(fd);
|
||||
if (file->fs && file->fs->data)
|
||||
{
|
||||
/* close file if fs is not unmount */
|
||||
result = f_close(fd);
|
||||
}
|
||||
if (result == FR_OK)
|
||||
{
|
||||
/* release memory */
|
||||
|
||||
@@ -60,6 +60,7 @@ struct dfs_filesystem
|
||||
struct dfs_partition
|
||||
{
|
||||
uint8_t type; /* file system type */
|
||||
char name[PARTITION_NAME_MAX]; /* partition name */
|
||||
off_t offset; /* partition start offset */
|
||||
size_t size; /* partition size */
|
||||
rt_sem_t lock;
|
||||
|
||||
Reference in New Issue
Block a user