fs: add "/" suffix for mountpoint node when using inode_getpath

Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
This commit is contained in:
Jiuzhu Dong 2022-02-18 19:57:38 +08:00 committed by Xiang Xiao
parent 2a434fe1fa
commit 120fa93d7f

View File

@ -63,7 +63,7 @@ int inode_getpath(FAR struct inode *node, FAR char *path)
}
strcat(path, node->i_name);
if (node->i_child)
if (node->i_child || INODE_IS_MOUNTPT(node))
{
strcat(path, "/");
}