ecf2d82159
* Synchronize the code of the rt mart branch to the master branch. * TTY device * Add lwP code from rt-smart * Add vnode in DFS, but DFS will be re-write for rt-smart * There are three libcpu for rt-smart: * arm/cortex-a, arm/aarch64 * riscv64 Co-authored-by: Rbb666 <zhangbingru@rt-thread.com> Co-authored-by: zhkag <zhkag@foxmail.com>
32 lines
601 B
C
32 lines
601 B
C
/*
|
|
* Copyright (c) 2006-2021, RT-Thread Development Team
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*
|
|
* Change Logs:
|
|
* Date Author Notes
|
|
* 2021/08/19 bernard the first version
|
|
*/
|
|
|
|
#include <rtthread.h>
|
|
|
|
#ifdef RT_USING_DFS
|
|
#include <dfs_fs.h>
|
|
#include <rtdbg.h>
|
|
|
|
int mnt_init(void)
|
|
{
|
|
if (rt_device_find("virtio-blk0"))
|
|
{
|
|
/* mount virtio-blk as root directory */
|
|
if (dfs_mount("virtio-blk0", "/", "elm", 0, RT_NULL) != 0)
|
|
{
|
|
LOG_E("virtio-blk0 mount failed\n");
|
|
}
|
|
}
|
|
|
|
return 0;
|
|
}
|
|
INIT_ENV_EXPORT(mnt_init);
|
|
#endif
|