From 01672f8627e3b341e7eb30adef42660bce25b1c3 Mon Sep 17 00:00:00 2001 From: kk Date: Thu, 26 Oct 2023 10:43:49 +0800 Subject: [PATCH] [dfs_v2][mqueue] fix No mqueue mounted (#8189) --- components/dfs/dfs_v2/filesystems/mqueue/dfs_mqueue.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/components/dfs/dfs_v2/filesystems/mqueue/dfs_mqueue.c b/components/dfs/dfs_v2/filesystems/mqueue/dfs_mqueue.c index 0bc61c635c..e543d2f4f3 100644 --- a/components/dfs/dfs_v2/filesystems/mqueue/dfs_mqueue.c +++ b/components/dfs/dfs_v2/filesystems/mqueue/dfs_mqueue.c @@ -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);