summaryrefslogtreecommitdiff
path: root/components/dfs
diff options
context:
space:
mode:
author[email protected] <[email protected]>2010-12-12 23:37:56 +0000
committer[email protected] <[email protected]>2010-12-12 23:37:56 +0000
commit3ba6d887daed668c7296359c0ca8207771b33832 (patch)
treebab2799d49ba5381362ff2cbded77a13f9b8fd30 /components/dfs
parentfdfe4f4781c2a2c6cd479f8f078aa0c32873d08b (diff)
update mkromfs script.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1192 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'components/dfs')
-rw-r--r--components/dfs/filesystems/romfs/mkromfs.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/components/dfs/filesystems/romfs/mkromfs.py b/components/dfs/filesystems/romfs/mkromfs.py
index 5ae6500ae8..ebda107b76 100644
--- a/components/dfs/filesystems/romfs/mkromfs.py
+++ b/components/dfs/filesystems/romfs/mkromfs.py
@@ -12,6 +12,7 @@ def mkromfs_output(out):
def mkromfs_file(filename, arrayname):
f = file(filename, "rb")
arrayname = arrayname.replace('.', '_')
+ arrayname = arrayname.replace('-', '_')
mkromfs_output('const static unsigned char %s[] = {\n' % arrayname)
count = 0
@@ -76,6 +77,7 @@ def mkromfs_dir(dirname, is_root = False):
items = subpath.split('\\')
item_name = string.join(items, '_')
item_name = item_name.replace('.', '_')
+ item_name = item_name.replace('-', '_')
subpath = subpath.replace('\\', '/')
if subpath[0] == '/':
subpath = subpath[1:]
@@ -98,6 +100,7 @@ def mkromfs_dir(dirname, is_root = False):
items = subpath.split('\\')
item_name = string.join(items, '_')
item_name = item_name.replace('.', '_')
+ item_name = item_name.replace('-', '_')
subpath = subpath.replace('\\', '/')
if subpath[0] == '/':
subpath = subpath[1:]