2013-06-26 22:30:40 +08:00
|
|
|
/*
|
2022-08-03 00:09:49 +08:00
|
|
|
* Copyright (c) 2006-2022, RT-Thread Development Team
|
2013-06-26 22:30:40 +08:00
|
|
|
*
|
2018-10-15 01:46:07 +08:00
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
2013-06-26 22:30:40 +08:00
|
|
|
*
|
|
|
|
* Change Logs:
|
|
|
|
* Date Author Notes
|
|
|
|
*/
|
|
|
|
|
2014-11-01 17:57:43 +08:00
|
|
|
#include <rtthread.h>
|
2013-01-08 22:40:58 +08:00
|
|
|
#include <dfs_romfs.h>
|
|
|
|
|
2022-08-03 00:09:49 +08:00
|
|
|
static const unsigned char _dummy_dummy_txt[] =
|
2013-06-26 22:30:40 +08:00
|
|
|
{
|
2019-04-03 18:09:52 +08:00
|
|
|
0x74, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x61, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x21, 0x0d, 0x0a,
|
2013-01-08 22:40:58 +08:00
|
|
|
};
|
|
|
|
|
2022-08-03 00:09:49 +08:00
|
|
|
static const struct romfs_dirent _dummy[] =
|
2013-06-26 22:30:40 +08:00
|
|
|
{
|
|
|
|
{ROMFS_DIRENT_FILE, "dummy.txt", _dummy_dummy_txt, sizeof(_dummy_dummy_txt)},
|
2013-01-08 22:40:58 +08:00
|
|
|
};
|
|
|
|
|
2022-08-03 00:09:49 +08:00
|
|
|
static const unsigned char _dummy_txt[] =
|
2013-06-26 22:30:40 +08:00
|
|
|
{
|
2019-04-03 18:09:52 +08:00
|
|
|
0x74, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x61, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x21, 0x0d, 0x0a,
|
2013-01-08 22:40:58 +08:00
|
|
|
};
|
|
|
|
|
2022-12-12 02:12:03 +08:00
|
|
|
rt_weak const struct romfs_dirent _root_dirent[] =
|
2013-06-26 22:30:40 +08:00
|
|
|
{
|
2023-06-10 21:35:25 +08:00
|
|
|
{ROMFS_DIRENT_DIR, "dev", RT_NULL, 0},
|
|
|
|
{ROMFS_DIRENT_DIR, "mnt", RT_NULL, 0},
|
2024-03-28 23:42:56 +08:00
|
|
|
{ROMFS_DIRENT_DIR, "proc", RT_NULL, 0},
|
|
|
|
{ROMFS_DIRENT_DIR, "etc", RT_NULL, 0},
|
|
|
|
{ROMFS_DIRENT_DIR, "bin", RT_NULL, 0},
|
2019-04-03 18:09:52 +08:00
|
|
|
{ROMFS_DIRENT_DIR, "dummy", (rt_uint8_t *)_dummy, sizeof(_dummy) / sizeof(_dummy[0])},
|
2013-06-26 22:30:40 +08:00
|
|
|
{ROMFS_DIRENT_FILE, "dummy.txt", _dummy_txt, sizeof(_dummy_txt)},
|
2013-01-08 22:40:58 +08:00
|
|
|
};
|
|
|
|
|
2022-12-12 02:12:03 +08:00
|
|
|
rt_weak const struct romfs_dirent romfs_root =
|
2013-06-26 22:30:40 +08:00
|
|
|
{
|
2019-04-03 18:09:52 +08:00
|
|
|
ROMFS_DIRENT_DIR, "/", (rt_uint8_t *)_root_dirent, sizeof(_root_dirent) / sizeof(_root_dirent[0])
|
2013-06-26 22:30:40 +08:00
|
|
|
};
|