From: Johannes Berg Date: Sat, 24 May 2008 23:23:41 +0000 (+0200) Subject: sort rules within collections X-Git-Tag: v0.9~84 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=538a561b821192d17d6f0f46b87da2d709f96fd2;p=platform%2Fupstream%2Fcrda.git sort rules within collections --- diff --git a/db2bin.py b/db2bin.py index ed551bf..014f717 100755 --- a/db2bin.py +++ b/db2bin.py @@ -75,6 +75,8 @@ for coll in collections: reg_rules_collections[coll] = output.tell() # struct regdb_file_reg_rules_collection be32(output, len(coll)) + coll = list(coll) + coll.sort(cmp=lambda x, y: cmp(bands[x[0]], bands[y[0]])) for regrule in coll: be32(output, reg_rules[regrule])