Commit 6b1d90b7 authored by Daniel Borkmann's avatar Daniel Borkmann

Merge branch 'bpf-uapi-doc-fixes'

Quentin Monnet says:

====================
Another round of fixes for the doc in the BPF UAPI header, which can be
turned into a manual page. First patch is the most important, as it fixes
parsing for the bpf_strtoul() helper doc. Following patches are formatting
fixes (nitpicks, mostly). The last one updates the copy of the header,
located under tools/.
====================
Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
parents 98583812 c1fe1e70
This diff is collapsed.
#!/usr/bin/python3 #!/usr/bin/python3
# SPDX-License-Identifier: GPL-2.0-only # SPDX-License-Identifier: GPL-2.0-only
# #
# Copyright (C) 2018 Netronome Systems, Inc. # Copyright (C) 2018-2019 Netronome Systems, Inc.
# In case user attempts to run with Python 2. # In case user attempts to run with Python 2.
from __future__ import print_function from __future__ import print_function
...@@ -39,7 +39,7 @@ class Helper(object): ...@@ -39,7 +39,7 @@ class Helper(object):
Break down helper function protocol into smaller chunks: return type, Break down helper function protocol into smaller chunks: return type,
name, distincts arguments. name, distincts arguments.
""" """
arg_re = re.compile('((const )?(struct )?(\w+|...))( (\**)(\w+))?$') arg_re = re.compile('((\w+ )*?(\w+|...))( (\**)(\w+))?$')
res = {} res = {}
proto_re = re.compile('(.+) (\**)(\w+)\(((([^,]+)(, )?){1,5})\)$') proto_re = re.compile('(.+) (\**)(\w+)\(((([^,]+)(, )?){1,5})\)$')
...@@ -54,8 +54,8 @@ class Helper(object): ...@@ -54,8 +54,8 @@ class Helper(object):
capture = arg_re.match(a) capture = arg_re.match(a)
res['args'].append({ res['args'].append({
'type' : capture.group(1), 'type' : capture.group(1),
'star' : capture.group(6), 'star' : capture.group(5),
'name' : capture.group(7) 'name' : capture.group(6)
}) })
return res return res
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment