summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorIrina Gómez <irinagomez@us.es>2020-05-05 12:53:47 +0200
committerIrina Gómez <irinagomez@us.es>2020-05-05 12:53:47 +0200
commit9fe0fe30b7b844c04f72b7506a503df257902c11 (patch)
tree69fb2b96807791e7de58b8430fc88dca79c8a568 /client
parente521fb869b8734ee80b9541157109f4451560012 (diff)
#841 Fixes bug in partitioning wizard when configure MBR: ogGetBootMbr function is created for detect MBR content and used in wizard.
Diffstat (limited to 'client')
-rwxr-xr-xclient/engine/Boot.lib30
1 files changed, 30 insertions, 0 deletions
diff --git a/client/engine/Boot.lib b/client/engine/Boot.lib
index 81f28f83..aa77b4f9 100755
--- a/client/engine/Boot.lib
+++ b/client/engine/Boot.lib
@@ -505,6 +505,36 @@ rm -f $FILE
}
+#/**
+# ogGetBootMbr int_ndisk
+#@brief Obtiene el contenido del sector de arranque de un disco.
+#@param int_ndisk nº de orden del disco
+#@return str_MBR Descripción del contenido del MBR.
+#@exception OG_ERR_FORMAT Formato incorrecto.
+#@exception OG_ERR_NOTFOUND Dispositivo de disco no encontrado.
+#@version 1.1.1b - Primera versión
+#@author Irina Gómez (US). Propuesto por Antonio J. Doblas Viso (UMA)
+#@date 2020-04-05
+#*/ ##
+function ogGetBootMbr ()
+{
+# Variables locales.
+local DISK
+
+# Si se solicita, mostrar ayuda.
+if [ "$*" == "help" ]; then
+ ogHelp "$FUNCNAME" "$FUNCNAME int_ndisk " \
+ "$FUNCNAME 1"
+ return
+fi
+
+# Error si no se recibe 1 parámetro.
+[ $# == 1 ] || ogRaiseError $OG_ERR_FORMAT "$FUNCNAME int_ndisk" || return $?
+
+DISK="$(ogDiskToDev $1)" || return $?
+
+ms-sys -f $DISK
+}
#/**
# ogWindowsBootParameters int_ndisk int_parition