rt-thread/components/dfs/dfs_v1/filesystems/romfs/romfs.c

39 lines
1.0 KiB
C
Raw Normal View History

2013-06-26 22:30:40 +08:00
/*
* Copyright (c) 2006-2022, RT-Thread Development Team
2013-06-26 22:30:40 +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>
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
};
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
};
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
};
rt_weak const struct romfs_dirent _root_dirent[] =
2013-06-26 22:30:40 +08:00
{
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
};
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
};
2013-01-08 22:40:58 +08:00