summaryrefslogtreecommitdiff
path: root/tools/net/ynl
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2023-05-24 20:09:01 +0300
committerDavid S. Miller <davem@davemloft.net>2023-05-26 12:30:14 +0300
commit9b66ee06e5ca2698d0ba12a7ad7188cb724279e7 (patch)
tree5154ba9312f0738b8b742fb800604913af2cf740 /tools/net/ynl
parentca7d05007d0a95615a51cb5a624775db8c450f43 (diff)
downloadlinux-9b66ee06e5ca2698d0ba12a7ad7188cb724279e7.tar.xz
net: ynl: prefix uAPI header include with uapi/
To keep things simple we used to include the uAPI header in the kernel in the #include <linux/$family.h> format. This works well enough, most of the genl families should have headers in include/net/ so linux/$family.h ends up referring to the uAPI header, anyway. And if it doesn't no big deal, we'll just include more info than we need. Unless that is there is a naming conflict. Someone recently created include/linux/psp.h which will be a problem when supporting the PSP protocol. (I'm talking about work-in-progress patches, but it's just a proof that assuming lack of name conflicts was overly optimistic.) Signed-off-by: Jakub Kicinski <kuba@kernel.org> Reviewed-by: Simon Horman <simon.horman@corigine.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/net/ynl')
-rwxr-xr-xtools/net/ynl/ynl-gen-c.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/net/ynl/ynl-gen-c.py b/tools/net/ynl/ynl-gen-c.py
index cc2f8c945340..be664510f484 100755
--- a/tools/net/ynl/ynl-gen-c.py
+++ b/tools/net/ynl/ynl-gen-c.py
@@ -2101,7 +2101,9 @@ def main():
if args.out_file:
cw.p(f'#include "{os.path.basename(args.out_file[:-2])}.h"')
cw.nl()
- headers = [parsed.uapi_header]
+ headers = ['uapi/' + parsed.uapi_header]
+ else:
+ headers = [parsed.uapi_header]
for definition in parsed['definitions']:
if 'header' in definition:
headers.append(definition['header'])