From c0fb66ec30bce792dec7185c59e68903f5ba8442 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Fri, 19 Nov 2021 17:26:36 +0100 Subject: [PATCH] Add a trivial guard against using the same uuid twice --- tools/list-discoverable-partitions.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/list-discoverable-partitions.py b/tools/list-discoverable-partitions.py index e9a3dce11d4..2ad179c7769 100644 --- a/tools/list-discoverable-partitions.py +++ b/tools/list-discoverable-partitions.py @@ -169,10 +169,16 @@ def generate(defines): print(HEADER, end='') + uuids = set() + for type, arch, uuid in defines: tdesc = TYPES[type] adesc = '' if arch is None else f' ({ARCHITECTURES[arch]})' + # Let's make sure that we didn't select&paste the same value twice + assert uuid not in uuids + uuids.add(uuid) + if type != prevtype: prevtype = type morea, moreb = DESCRIPTIONS[type] -- 2.47.3