diff options
author | Alexandre Belloni <alexandre.belloni@free-electrons.com> | 2015-02-09 00:16:24 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-02-14 08:40:35 +0000 |
commit | 0a6668f6e60b4195ff4163c00fc972bacdb27b4b (patch) | |
tree | 925031ed161e3d9e9ffefca0541a020e73729cc7 /scripts | |
parent | 20fe0c7202724187dbe80eb2101d8ef69e86b94e (diff) | |
download | openembedded-core-0a6668f6e60b4195ff4163c00fc972bacdb27b4b.tar.gz openembedded-core-0a6668f6e60b4195ff4163c00fc972bacdb27b4b.tar.bz2 openembedded-core-0a6668f6e60b4195ff4163c00fc972bacdb27b4b.zip |
wic: remove useless calls to __write_fstab
__write_fstab() is already iterating over parts. There is now need to
call it fort each parts.
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/lib/wic/imager/direct.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/lib/wic/imager/direct.py b/scripts/lib/wic/imager/direct.py index 38d4e78e62..c605e64238 100644 --- a/scripts/lib/wic/imager/direct.py +++ b/scripts/lib/wic/imager/direct.py @@ -136,7 +136,7 @@ class DirectImageCreator(BaseImageCreator): fstab_lines.append(fstab_entry) def _write_fstab(self, fstab, fstab_lines): - fstab = open(fstab, "w") + fstab = open(fstab + ".new", "w") for line in fstab_lines: fstab.write(line) fstab.close() @@ -258,12 +258,9 @@ class DirectImageCreator(BaseImageCreator): # self.assemble() calls Image.assemble() which calls # __write_partitition() for each partition to dd the fs # into the partitions. - fstab = self.__write_fstab(self.rootfs_dir.get("ROOTFS_DIR")) - p.prepare(self, self.workdir, self.oe_builddir, self.rootfs_dir, self.bootimg_dir, self.kernel_dir, self.native_sysroot) - self._restore_fstab(fstab) self.__image.add_partition(int(p.size), p.disk, @@ -277,6 +274,9 @@ class DirectImageCreator(BaseImageCreator): no_table = p.no_table, part_type = p.part_type) + fstab = self.__write_fstab(self.rootfs_dir.get("ROOTFS_DIR")) + self._restore_fstab(fstab) + self.__image.layout_partitions(self._ptable_format) self.__imgdir = self.workdir |