[dfs_v2][mqueue] fix No mqueue mounted (#8189)

This commit is contained in:
kk 2023-10-26 10:43:49 +08:00 committed by GitHub
parent c701b3e81a
commit 01672f8627
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -230,6 +230,12 @@ static struct dfs_filesystem_type _mqueue = {
int dfs_mqueue_init(void) {
/* register mqueue file system */
return dfs_register(&_mqueue);
dfs_register(&_mqueue);
mkdir("/dev/mqueue", 0x777);
if (dfs_mount(RT_NULL, "/dev/mqueue", "mqueue", 0, 0) != 0)
{
rt_kprintf("Dir /dev/mqueue mount failed!\n");
}
return 0;
}
INIT_COMPONENT_EXPORT(dfs_mqueue_init);