aboutsummaryrefslogtreecommitdiffstats
path: root/tools/asn2wrs.py
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2010-11-14 23:48:07 +0000
committerBill Meier <wmeier@newsguy.com>2010-11-14 23:48:07 +0000
commit1b7474fab6925675dce1c0ac6974cf09bb78b080 (patch)
tree8ca38a59ec82203b930d6df6116344decda667d4 /tools/asn2wrs.py
parent84dd318764acf729c548455e631c35cb622ef861 (diff)
Sort value_string array by value if used with value_str_ext fcns;
svn path=/trunk/; revision=34874
Diffstat (limited to 'tools/asn2wrs.py')
-rwxr-xr-xtools/asn2wrs.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/asn2wrs.py b/tools/asn2wrs.py
index b256650c5d..86e89e249d 100755
--- a/tools/asn2wrs.py
+++ b/tools/asn2wrs.py
@@ -1358,6 +1358,8 @@ class EthCtx:
out = ""
has_enum = self.eth_type[tname]['enum'] & EF_ENUM
use_ext = self.eth_type[tname]['vals_ext']
+ if (use_ext):
+ vals.sort(key=lambda vals_entry: int(vals_entry[0]))
if (not self.eth_type[tname]['export'] & EF_VALS):
out += 'static '
if (self.eth_type[tname]['export'] & EF_VALS) and (self.eth_type[tname]['export'] & EF_TABLE):