summaryrefslogtreecommitdiffstats
path: root/src/linux
diff options
context:
space:
mode:
authorJavier Sánchez Parra <jsanchez@soleta.eu>2020-11-26 16:42:50 +0100
committerOpenGnSys Support Team <soporte-og@soleta.eu>2020-11-27 12:52:54 +0100
commita11224d6f587052226b9f94fc942092d6eab5896 (patch)
tree1c440d91dc12cb41ea190534d6077f2fbd33fb7f /src/linux
parent0411d2bf94c8854f3589213074f40056d026a020 (diff)
#1008 Add support to work with GPT table
ogClient /setup in linux mode do not support to indicate which table type the user want to use. It always supposes that the partition table is MBR/MSDOS. Add ogClient support to work with GPT tables. Add new field table type to /setup linux mode that expects a string with "MSDOS" or "GPT". Example old JSON: { "disk": "1", "cache": "0", "cache_size": "0", "partition_setup": [...] } Example new JSON: { "type": "GPT", "disk": "1", "cache": "0", "cache_size": "0", "partition_setup": [...] }
Diffstat (limited to 'src/linux')
-rw-r--r--src/linux/ogOperations.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/linux/ogOperations.py b/src/linux/ogOperations.py
index ef01d2c..58dff3a 100644
--- a/src/linux/ogOperations.py
+++ b/src/linux/ogOperations.py
@@ -146,6 +146,7 @@ class OgLinuxOperations:
return output.decode('utf-8')
def setup(self, request, ogRest):
+ table_type = request.getType()
disk = request.getDisk()
cache = request.getCache()
cache_size = request.getCacheSize()
@@ -160,7 +161,7 @@ class OgLinuxOperations:
if ogRest.terminated:
break
- cmd = f'{ogClient.OG_PATH}interfaceAdm/Configurar {disk} {cfg}'
+ cmd = f'{ogClient.OG_PATH}interfaceAdm/Configurar {table_type} {cfg}'
try:
ogRest.proc = subprocess.Popen([cmd],
stdout=subprocess.PIPE,