Skip to content

Commit a30e7a8

Browse files
committed
ynl-gen-cpp: udpate the header path generation
Equivalent of upstream commit f32c821ae019 ("tools: ynl: lift an assumption about spec file name") Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent bde0879 commit a30e7a8

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

ynl-gen-cpp.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -935,7 +935,7 @@ def __init__(self, file_name, exclude_ops):
935935
if "uapi-header" in self.yaml:
936936
self.uapi_header = self.yaml["uapi-header"]
937937
else:
938-
self.uapi_header = f"linux/{self.name}.h"
938+
self.uapi_header = f"linux/{c_lower(self.name)}.h"
939939
if self.uapi_header.startswith("linux/") and self.uapi_header.endswith(".h"):
940940
self.uapi_header_name = self.uapi_header[6:-2]
941941
else:
@@ -2243,7 +2243,8 @@ def main():
22432243
cw.nl()
22442244
cw.p('#include "ynl.hpp"')
22452245
else:
2246-
cw.p(f'#include "{parsed.name}-user.hpp"')
2246+
hdr_file = os.path.basename(args.out_file[:-4]) + ".hpp"
2247+
cw.p(f'#include "{hdr_file}"')
22472248
cw.nl()
22482249
cw.p("#include <array>")
22492250
cw.nl()

0 commit comments

Comments
 (0)