This commit is contained in:
刘可亮
2025-07-22 11:15:46 +08:00
parent d164b333ed
commit 11c97ef399
2870 changed files with 951307 additions and 26675 deletions

View File

@@ -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 */

View File

@@ -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;