From 2a0737f2c5c82495689b8c1700ba220ff582cf87 Mon Sep 17 00:00:00 2001 From: Natalia Serrano Date: Thu, 20 Feb 2025 14:17:12 +0100 Subject: [PATCH] refs #1594 more comments and whitespace shuffling --- client/lib/engine/bin/DiskLib.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/client/lib/engine/bin/DiskLib.py b/client/lib/engine/bin/DiskLib.py index 350a482..a953159 100755 --- a/client/lib/engine/bin/DiskLib.py +++ b/client/lib/engine/bin/DiskLib.py @@ -68,6 +68,7 @@ def ogCreatePartitions (disk, parts): SystemLib.ogRaiseError ([], ogGlobals.OG_ERR_PARTITION, PTTYPE) return None + # Se calcula el ultimo sector del disco (total de sectores usables) SECTORS = ogGetLastSector (disk) # Se recalcula el nº de sectores del disco si existe partición de caché. @@ -77,7 +78,6 @@ def ogCreatePartitions (disk, parts): cache_disk, cache_part = CACHEPART.split() if ND == cache_disk: CACHESIZE = int (CacheLib.ogGetCacheSize()) * 2 - # Sector de inicio (la partición 1 empieza en el sector 63). IODISCO = ogDiskToDev (disk) IOSIZE = 0 @@ -101,12 +101,8 @@ def ogCreatePartitions (disk, parts): PART = 1 - # Fichero temporal de entrada para "sfdisk" sfdisk_input = 'unit: sectors\n\n' - NVME_PREFIX = 'p' if 'nvme' in DISK else '' - - # Generar fichero de entrada para "sfdisk" con las particiones. for p in parts: # Conservar los datos de la partición de caché. if f'{ND} {PART}' == CACHEPART and CACHESIZE: @@ -134,7 +130,7 @@ def ogCreatePartitions (disk, parts): if PART > 4: SystemLib.ogRaiseError ([], ogGlobals.OG_ERR_FORMAT, '') return None - # El inicio de la primera partición logica es el de la extendida más 4x512 + # El inicio de la primera partición logica es el de la extendida más 4x512 EXTSTART = START+2048 EXTSIZE = SIZE-2048 # Incluir particiones lógicas dentro de la partición extendida.