From da7dfd8ef5bc055a9e723807c38de4b3c407387d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Sat, 17 Sep 2022 13:01:11 +0200 Subject: docs/DPS: use the SD_GPT_* constants here too --- tools/list-discoverable-partitions.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'tools') diff --git a/tools/list-discoverable-partitions.py b/tools/list-discoverable-partitions.py index 43d7ee9984..153c904774 100644 --- a/tools/list-discoverable-partitions.py +++ b/tools/list-discoverable-partitions.py @@ -146,6 +146,7 @@ def extract(file): if not m: continue + name = line.split()[1] if m2 := re.match(r'^(ROOT|USR)_([A-Z0-9]+|X86_64|PPC64_LE|MIPS_LE|MIPS64_LE)(|_VERITY|_VERITY_SIG)\s+SD_ID128_MAKE\((.*)\)', m.group(1)): type, arch, suffix, u = m2.groups() u = uuid.UUID(u.replace(',', '')) @@ -153,12 +154,12 @@ def extract(file): type = f'{type}{suffix}' assert type in TYPES - yield type, arch, u + yield name, type, arch, u elif m2 := re.match(r'(\w+)\s+SD_ID128_MAKE\((.*)\)', m.group(1)): type, u = m2.groups() u = uuid.UUID(u.replace(',', '')) - yield type, None, u + yield name, type, None, u else: raise Exception(f'Failed to match: {m.group(1)}') @@ -170,7 +171,7 @@ def generate(defines): uuids = set() - for type, arch, uuid in defines: + for name, type, arch, uuid in defines: tdesc = TYPES[type] adesc = '' if arch is None else f' ({ARCHITECTURES[arch]})' @@ -184,7 +185,7 @@ def generate(defines): else: morea = moreb = 'ditto' - print(f'| _{tdesc}{adesc}_ | `{uuid}` | {morea} | {moreb} |') + print(f'| _{tdesc}{adesc}_ | `{uuid}` `{name}` | {morea} | {moreb} |') if __name__ == '__main__': known = extract(sys.stdin) -- cgit v1.2.1