summaryrefslogtreecommitdiff
path: root/scripts/lib/wic
diff options
context:
space:
mode:
authorDaniel Schultz <d.schultz@phytec.de>2017-03-20 13:18:52 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-03-21 22:43:03 +0000
commit95ac3d0637cad7e12f246b8bd64ab64348df0483 (patch)
tree04bbbb1c913688219853ee31b65a3b63269befc8 /scripts/lib/wic
parent8341ee45d721cf07b19d50c249bb3a77ef1bf100 (diff)
downloadopenembedded-core-95ac3d0637cad7e12f246b8bd64ab64348df0483.tar.gz
openembedded-core-95ac3d0637cad7e12f246b8bd64ab64348df0483.tar.bz2
openembedded-core-95ac3d0637cad7e12f246b8bd64ab64348df0483.zip
wic: partition.py: Add fsck to avoid corrupt EXT file systems
This patch avoids the creation of a corrupt EXT file system. Since there are no checks if a EXT file system was successfully created, this should add to prevent possible system failures. Signed-off-by: Daniel Schultz <d.schultz@phytec.de> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'scripts/lib/wic')
-rw-r--r--scripts/lib/wic/partition.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/lib/wic/partition.py b/scripts/lib/wic/partition.py
index 6ef8d7f3c9..8e32afcd89 100644
--- a/scripts/lib/wic/partition.py
+++ b/scripts/lib/wic/partition.py
@@ -286,6 +286,9 @@ class Partition():
(self.fstype, extra_imagecmd, rootfs, label_str, rootfs_dir)
exec_native_cmd(mkfs_cmd, native_sysroot, pseudo=pseudo)
+ mkfs_cmd = "fsck.%s -fy %s" % (self.fstype, rootfs)
+ exec_native_cmd(mkfs_cmd, native_sysroot, pseudo=pseudo)
+
def prepare_rootfs_btrfs(self, rootfs, oe_builddir, rootfs_dir,
native_sysroot, pseudo):
"""