提交 ead014f9 编写于 作者: B bernard.xiong@gmail.com

update mkromfs script.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1287 bbd45198-f89e-11dd-88c7-29a3b14d5316
上级 54228a05
...@@ -85,7 +85,7 @@ def mkromfs_dir(dirname, is_root = False): ...@@ -85,7 +85,7 @@ def mkromfs_dir(dirname, is_root = False):
if not os.path.isfile(fullpath): if not os.path.isfile(fullpath):
l = os.listdir(fullpath) l = os.listdir(fullpath)
if len(l): if len(l):
mkromfs_output(('\t{ROMFS_DIRENT_DIR, "%s", %s, sizeof(%s)/sizeof(%s[0])},\n' % (fn, item_name, item_name, item_name))) mkromfs_output(('\t{ROMFS_DIRENT_DIR, "%s", (rt_uint8_t*) %s, sizeof(%s)/sizeof(%s[0])},\n' % (fn, item_name, item_name, item_name)))
else: else:
mkromfs_output(('\t{ROMFS_DIRENT_DIR, "%s", RT_NULL, 0},\n' % fn)) mkromfs_output(('\t{ROMFS_DIRENT_DIR, "%s", RT_NULL, 0},\n' % fn))
...@@ -122,4 +122,4 @@ if __name__ == "__main__": ...@@ -122,4 +122,4 @@ if __name__ == "__main__":
mkromfs_output("#include <dfs_romfs.h>\n\n") mkromfs_output("#include <dfs_romfs.h>\n\n")
mkromfs_dir(basename, is_root = True) mkromfs_dir(basename, is_root = True)
mkromfs_output("const struct romfs_dirent romfs_root = {ROMFS_DIRENT_DIR, \"/\", _root_dirent, sizeof(_root_dirent)/sizeof(_root_dirent[0])};\n\n") mkromfs_output("const struct romfs_dirent romfs_root = {ROMFS_DIRENT_DIR, \"/\", (rt_uint8_t*) _root_dirent, sizeof(_root_dirent)/sizeof(_root_dirent[0])};\n\n")
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册