refs #1594 more comments and whitespace shuffling
parent
000ea29e70
commit
2a0737f2c5
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue