diff options
Diffstat (limited to 'components/dfs')
| -rw-r--r-- | components/dfs/filesystems/ramfs/dfs_ramfs.c | 1 | ||||
| -rw-r--r-- | components/dfs/filesystems/romfs/mkromfs.py | 13 |
2 files changed, 8 insertions, 6 deletions
diff --git a/components/dfs/filesystems/ramfs/dfs_ramfs.c b/components/dfs/filesystems/ramfs/dfs_ramfs.c index 117528c1e2..fecebe4688 100644 --- a/components/dfs/filesystems/ramfs/dfs_ramfs.c +++ b/components/dfs/filesystems/ramfs/dfs_ramfs.c @@ -414,6 +414,7 @@ int dfs_ramfs_init(void) return 0; } +INIT_FS_EXPORT(dfs_ramfs_init); struct dfs_ramfs* dfs_ramfs_create(rt_uint8_t *pool, rt_size_t size) { diff --git a/components/dfs/filesystems/romfs/mkromfs.py b/components/dfs/filesystems/romfs/mkromfs.py index a84458e892..d1354eb259 100644 --- a/components/dfs/filesystems/romfs/mkromfs.py +++ b/components/dfs/filesystems/romfs/mkromfs.py @@ -4,6 +4,7 @@ import string basename = '' output = '' +sep = os.sep def mkromfs_output(out): # print '%s' % out, @@ -54,12 +55,12 @@ def mkromfs_dir(dirname, is_root = False): fullpath = os.path.join(path, item) if os.path.isfile(fullpath): subpath = fullpath[len(basename):] - array = subpath.split('\\') + array = subpath.split(sep) arrayname = string.join(array, '_') mkromfs_file(fullpath, arrayname) subpath = path[len(basename):] - dir = subpath.split('\\') + dir = subpath.split(sep) direntname = string.join(dir, '_') if is_root: mkromfs_output('const struct romfs_dirent _root_dirent[] = {\n') @@ -69,12 +70,12 @@ def mkromfs_dir(dirname, is_root = False): for item in list: fullpath = os.path.join(path, item) fn = fullpath[len(dirname):] - if fn[0] == '\\': + if fn[0] == sep: fn = fn[1:] fn = fn.replace('\\', '/') subpath = fullpath[len(basename):] - items = subpath.split('\\') + items = subpath.split(sep) item_name = string.join(items, '_') item_name = item_name.replace('.', '_') item_name = item_name.replace('-', '_') @@ -92,12 +93,12 @@ def mkromfs_dir(dirname, is_root = False): for item in list: fullpath = os.path.join(path, item) fn = fullpath[len(dirname):] - if fn[0] == '\\': + if fn[0] == sep: fn = fn[1:] fn = fn.replace('\\', '/') subpath = fullpath[len(basename):] - items = subpath.split('\\') + items = subpath.split(sep) item_name = string.join(items, '_') item_name = item_name.replace('.', '_') item_name = item_name.replace('-', '_') |
