diff options
| author | shaolin <[email protected]> | 2014-03-04 09:14:48 +0800 |
|---|---|---|
| committer | shaolin <[email protected]> | 2014-03-04 09:14:48 +0800 |
| commit | 020e95d91b5e1d7f902674a320e42657bee3ebfe (patch) | |
| tree | 65b65bfa527e0e8670dc807a8fee8d507d67ca48 /components/dfs | |
| parent | 0fb9c54efda7fef4346523fdc4b92512a0441ee1 (diff) | |
| parent | 738871fd9ebbd53da6cfcc429dfdd5ffc17fd685 (diff) | |
Merge branch 'master' of https://github.com/RT-Thread/rt-thread
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('-', '_') |
