Skip to content

Commit a03b676

Browse files
committed
scripts: gen-uuid-reg.py: Generate string identifier for toml files
Extend the script that generates the uuid-registry.h file to also generate definitions containing the uuid as a string. These definitions (UUIDREG_STR_...) can be used in toml files, allowing get values from the uuid-registry. Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
1 parent c6a6e17 commit a03b676

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

scripts/gen-uuid-reg.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ def emit_uuid_rec(uu, sym):
3131
uuidinit = "{ " + ", ".join(wrecs) + ", { " + ", ".join(byts) + " } }"
3232
out_recs.append(f"#define _UUIDREG_{sym} {uuidinit}")
3333

34+
uuidstr = uu[:23] + '-' + uu[23:]
35+
out_recs.append(f'#define UUIDREG_STR_{sym.upper()} "{uuidstr}"')
36+
3437
def main():
3538
with open(sys.argv[1]) as f:
3639
for line in f.readlines():

0 commit comments

Comments
 (0)