From ad404f9982e1655b63c3b18e124b3e68a6f12c77 Mon Sep 17 00:00:00 2001 From: Natalia Serrano Date: Thu, 20 Feb 2025 14:02:10 +0100 Subject: [PATCH] refs #1594 ignore empty slots --- client/lib/engine/bin/DiskLib.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/client/lib/engine/bin/DiskLib.py b/client/lib/engine/bin/DiskLib.py index a87fbc3..6969d47 100755 --- a/client/lib/engine/bin/DiskLib.py +++ b/client/lib/engine/bin/DiskLib.py @@ -144,9 +144,12 @@ def ogCreatePartitions (disk, parts): return None START = EXTSTART SECTORS = EXTSTART+EXTSIZE - # Generar datos para la partición. - sfdisk_input += f'{DISK}{NVME_PREFIX}{PART} : start={START}, size={SIZE}, Id={ID}\n' - # Error si se supera el nº total de sectores. + + # Generar datos para la partición. + # En el caso de que la partición sea EMPTY no se crea nada + if 'EMPTY' != TYPE: + sfdisk_input += f'{DISK}{NVME_PREFIX}{PART} : start={START}, size={SIZE}, Id={ID}\n' + START += SIZE # Error si se supera el nº total de sectores.