From 6cf2f5c8d8d3740aea2bcdf4dded2da15900aae1 Mon Sep 17 00:00:00 2001 From: Reiner Herrmann Date: Wed, 28 Oct 2020 18:27:09 +0100 Subject: support bluetooth protocol in sort.py --- contrib/sort.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'contrib') 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): def sort_protocol(protocols): - """sort the given protocole into this scheme: unix,inet,inet6,netlink,packet""" + """sort the given protocole into this scheme: unix,inet,inet6,netlink,packet,bluetooth""" # shortcut for common protocol lines if protocols in ("unix", "unix,inet,inet6"): return protocols @@ -45,6 +45,7 @@ def sort_protocol(protocols): "inet6": False, "netlink": False, "packet": False, + "bluetooth": False, } for protocol in protocols.split(","): if protocol == "unix": @@ -57,6 +58,8 @@ def sort_protocol(protocols): present_protocols["netlink"] = True elif protocol == "packet": present_protocols["packet"] = True + elif protocol == "bluetooth": + present_protocols["bluetooth"] = True if present_protocols["unix"]: fixed_protocols += "unix," if present_protocols["inet"]: @@ -67,6 +70,8 @@ def sort_protocol(protocols): fixed_protocols += "netlink," if present_protocols["packet"]: fixed_protocols += "packet," + if present_protocols["bluetooth"]: + fixed_protocols += "bluetooth," return fixed_protocols[:-1] -- cgit v1.2.3-70-g09d2