Merge pull request #1828 from Guozhanxin/master

[components][dfs][ramfs] add RT_Object_Class_MemHeap flag for ramfs->memheap
This commit is contained in:
Bernard Xiong 2018-09-20 14:13:15 +08:00 committed by GitHub
commit 5253d4e37d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -453,6 +453,7 @@ struct dfs_ramfs* dfs_ramfs_create(rt_uint8_t *pool, rt_size_t size)
/* initialize ramfs object */
ramfs->magic = RAMFS_MAGIC;
ramfs->memheap.parent.type = RT_Object_Class_MemHeap | RT_Object_Class_Static;
/* initialize root directory */
memset(&(ramfs->root), 0x00, sizeof(ramfs->root));