We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 120aec0 commit 989134fCopy full SHA for 989134f
tools/vmlinux-gen.py
@@ -243,6 +243,17 @@ def step5_postprocess(self, input_file):
243
data
244
)
245
246
+ # below to replace those c_bool with bitfield greater than 8
247
+ def repl(m):
248
+ name, bits = m.groups()
249
+ return f"('{name}', ctypes.c_uint32, {bits})" if int(bits) > 8 else m.group(0)
250
+
251
+ data = re.sub(
252
+ r"\('([^']+)',\s*ctypes\.c_bool,\s*(\d+)\)",
253
+ repl,
254
+ data
255
+ )
256
257
# Remove ctypes. prefix from invalid entries
258
invalid_ctypes = ["bpf_iter_state", "_cache_type", "fs_context_purpose"]
259
for name in invalid_ctypes:
0 commit comments