mirror of
https://git.yoctoproject.org/poky
synced 2026-03-11 09:49:41 +01:00
wic: remove useless calls to __write_fstab
__write_fstab() is already iterating over parts. There is now need to call it fort each parts. (From OE-Core rev: 0a6668f6e60b4195ff4163c00fc972bacdb27b4b) Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
cf3e21e71e
commit
4dce5c44ab
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user