diff options
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/sort.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/contrib/sort.py b/contrib/sort.py index e2f82012b..54b2cbaa6 100755 --- a/contrib/sort.py +++ b/contrib/sort.py | |||
@@ -34,7 +34,7 @@ def sort_alphabetical(raw_items): | |||
34 | 34 | ||
35 | 35 | ||
36 | def sort_protocol(protocols): | 36 | def sort_protocol(protocols): |
37 | """sort the given protocole into this scheme: unix,inet,inet6,netlink,packet""" | 37 | """sort the given protocole into this scheme: unix,inet,inet6,netlink,packet,bluetooth""" |
38 | # shortcut for common protocol lines | 38 | # shortcut for common protocol lines |
39 | if protocols in ("unix", "unix,inet,inet6"): | 39 | if protocols in ("unix", "unix,inet,inet6"): |
40 | return protocols | 40 | return protocols |
@@ -45,6 +45,7 @@ def sort_protocol(protocols): | |||
45 | "inet6": False, | 45 | "inet6": False, |
46 | "netlink": False, | 46 | "netlink": False, |
47 | "packet": False, | 47 | "packet": False, |
48 | "bluetooth": False, | ||
48 | } | 49 | } |
49 | for protocol in protocols.split(","): | 50 | for protocol in protocols.split(","): |
50 | if protocol == "unix": | 51 | if protocol == "unix": |
@@ -57,6 +58,8 @@ def sort_protocol(protocols): | |||
57 | present_protocols["netlink"] = True | 58 | present_protocols["netlink"] = True |
58 | elif protocol == "packet": | 59 | elif protocol == "packet": |
59 | present_protocols["packet"] = True | 60 | present_protocols["packet"] = True |
61 | elif protocol == "bluetooth": | ||
62 | present_protocols["bluetooth"] = True | ||
60 | if present_protocols["unix"]: | 63 | if present_protocols["unix"]: |
61 | fixed_protocols += "unix," | 64 | fixed_protocols += "unix," |
62 | if present_protocols["inet"]: | 65 | if present_protocols["inet"]: |
@@ -67,6 +70,8 @@ def sort_protocol(protocols): | |||
67 | fixed_protocols += "netlink," | 70 | fixed_protocols += "netlink," |
68 | if present_protocols["packet"]: | 71 | if present_protocols["packet"]: |
69 | fixed_protocols += "packet," | 72 | fixed_protocols += "packet," |
73 | if present_protocols["bluetooth"]: | ||
74 | fixed_protocols += "bluetooth," | ||
70 | return fixed_protocols[:-1] | 75 | return fixed_protocols[:-1] |
71 | 76 | ||
72 | 77 | ||