diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2021-11-19 17:26:36 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2021-11-19 18:49:46 +0100 |
commit | c0fb66ec30bce792dec7185c59e68903f5ba8442 (patch) | |
tree | 52ea09f51f3dbda0137e79e11fc3983040b0328b /tools | |
parent | a965a3191e47630e84d33f6c9fc5e6114645d8a6 (diff) | |
download | systemd-c0fb66ec30bce792dec7185c59e68903f5ba8442.tar.gz |
Add a trivial guard against using the same uuid twice
Diffstat (limited to 'tools')
-rw-r--r-- | tools/list-discoverable-partitions.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/list-discoverable-partitions.py b/tools/list-discoverable-partitions.py index e9a3dce11d..2ad179c776 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] |