From f9ddfae37b313f76f38b744c20742be6f129df94 Mon Sep 17 00:00:00 2001 From: Rainer Keller Date: Wed, 10 Sep 2014 15:59:06 +0200 Subject: Unmount boot partition Sometimes the boot partition is already mounted on iMX6. Make sure it gets unmounted first in order to prevent mounting it twice. Change-Id: I0815d59ab89cdddb0ed8d41a6b17192fe9abe9c4 Reviewed-by: Eirik Aavitsland --- src/b2qt-update-util/main.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/b2qt-update-util') diff --git a/src/b2qt-update-util/main.cpp b/src/b2qt-update-util/main.cpp index ae26dc5..d22019e 100644 --- a/src/b2qt-update-util/main.cpp +++ b/src/b2qt-update-util/main.cpp @@ -27,6 +27,9 @@ bool mount_boot() { + // In some cases the boot partition is already mounted somewhere else. + // Mounting it again is no problem but data loss will happen. + QProcess::execute("umount", QStringList() << "/dev/mmcblk0p1"); // Ignore return value return QProcess::execute("mount", QStringList() << "/dev/mmcblk0p1" << "/boot") == 0; } -- cgit v1.2.3