Solve image not clean after created
authoryyh <yyh@123.com>
Sat, 1 Apr 2017 14:10:27 +0000 (22:10 +0800)
committeradmin <yuhuan.yang@samsung.com>
Thu, 6 Jul 2017 09:55:38 +0000 (17:55 +0800)
Change-Id: I02352678364c5879a3cee75b246ab06216f84187

mic/imager/loop.py

index c0620a4..288a707 100644 (file)
@@ -446,6 +446,7 @@ class LoopImageCreator(BaseImageCreator):
             if item['fstype'] == "ext4":
                 runner.show('/sbin/tune2fs -O ^huge_file,extents,uninit_bg %s '
                             % imgfile)
+                runner.quiet(["/sbin/e2fsck", "-f", "-y", imgfile])
             self.image_files.setdefault('partitions', {}).update(
                     {item['mountpoint']: item['label']})
             if self.compress_image: