aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorValentin Popa <valentin.popa@intel.com>2014-03-17 17:53:38 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-03-17 15:57:25 +0000
commitcc98b19112ab875ebc7cb604cd96acadac4cbf21 (patch)
treec0964c24bb108a73a5482f3a2bb4f54aaea1d214 /lib
parentce17478c8197abf178c00774f5bbe23fd4375ee2 (diff)
downloadbitbake-cc98b19112ab875ebc7cb604cd96acadac4cbf21.tar.gz
hob: sync after image deploy
Showing "Deploy image successful" after 'dd' returns may determine the user to disconnect the usb stick even though the writing operations are not finished. This patch makes sure that the entire image is deployed on the usb stick before the user is informed about any result. [YOCTO #5892] Signed-off-by: Valentin Popa <valentin.popa@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/bb/ui/crumbs/hig/deployimagedialog.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bb/ui/crumbs/hig/deployimagedialog.py b/lib/bb/ui/crumbs/hig/deployimagedialog.py
index f64fbd6ea..a13fff906 100644
--- a/lib/bb/ui/crumbs/hig/deployimagedialog.py
+++ b/lib/bb/ui/crumbs/hig/deployimagedialog.py
@@ -167,7 +167,7 @@ class DeployImageDialog (CrumbsDialog):
if cmdline:
tmpfile = tempfile.NamedTemporaryFile()
cmdline += "\"sudo dd if=" + self.image_path + \
- " of=" + combo_item + "; echo $? > " + tmpfile.name + "\""
+ " of=" + combo_item + " && sync; echo $? > " + tmpfile.name + "\""
subprocess.call(shlex.split(cmdline))
if int(tmpfile.readline().strip()) == 0: