aboutsummaryrefslogtreecommitdiffstats
path: root/tools/asn2wrs.py
diff options
context:
space:
mode:
authorJoão Valverde <joao.valverde@tecnico.ulisboa.pt>2016-03-09 03:17:51 +0000
committerJoão Valverde <j@v6e.pt>2016-03-13 21:30:24 +0000
commit54a520d4a1151c68d0b4e5f09a8d82466fa499f3 (patch)
tree7aacae160382098ce651ac862a5dfd5de4beff94 /tools/asn2wrs.py
parentc1f3c935bdd33090c87f0d2f84842ce9729b747a (diff)
Move /asn1 to /epan/dissectors
Change-Id: I1208fe3c2ba428995526f561e8f792b8d871e9a9 Reviewed-on: https://code.wireshark.org/review/14388 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: João Valverde <j@v6e.pt>
Diffstat (limited to 'tools/asn2wrs.py')
-rwxr-xr-xtools/asn2wrs.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/tools/asn2wrs.py b/tools/asn2wrs.py
index 995e751be3..c818882f88 100755
--- a/tools/asn2wrs.py
+++ b/tools/asn2wrs.py
@@ -594,8 +594,7 @@ def rel_dissector_path(filename):
path_parts = os.path.abspath(filename).split(os.sep)
while (len(path_parts) > 3 and path_parts[0] != 'asn1'):
path_parts.pop(0)
- path_parts.insert(0, '..')
- path_parts.insert(0, '..')
+ path_parts.insert(0, '.')
return '/'.join(path_parts)
@@ -2923,13 +2922,13 @@ class EthOut:
out += self.outcomment('Do not modify this file. Changes will be overwritten.', comment)
out += self.outcomment('Generated automatically by the ASN.1 to Wireshark dissector compiler', comment)
out += self.outcomment(os.path.basename(fn), comment)
- out += self.outcomment(' '.join(sys.argv), comment)
+ out += self.outcomment(' '.join(['asn2wrs.py'] + sys.argv[1:]), comment)
out += '\n'
# Make Windows path separator look like Unix path separator
out = out.replace('\\', '/')
# Change absolute paths and relative paths generated outside
# source directory to paths relative to asn1/<proto> subdir.
- out = re.sub(r'(\s)[./A-Z]\S*(/tools/|/epan/)', r'\1../..\2', out)
+ out = re.sub(r'(\s)[./A-Z]\S*/dissectors\b', r'\1../..', out)
out = re.sub(r'(\s)[./A-Z]\S*/asn1/\S*?([\s/])', r'\1.\2', out)
return out