summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2017-02-08 20:51:25 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-02-15 20:06:44 -0800
commitb8354df7898471d821b85111374671f9e577a086 (patch)
treef70382392aa05b495b0eb315db932673e6adec2f
parent03648d3d04ac49591ad4b43c91687a6a40081a99 (diff)
downloadpoky-b8354df7898471d821b85111374671f9e577a086.tar.gz
wic: partitionedfs: merged __format_disks and create
Private method __format_disks is called only from create method making the code less readable. Merged the code into one method. (From OE-Core rev: b76b1bd404487df38fd99bc0d0e6a59acb10c9d3) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--scripts/lib/wic/utils/partitionedfs.py15
1 files changed, 5 insertions, 10 deletions
diff --git a/scripts/lib/wic/utils/partitionedfs.py b/scripts/lib/wic/utils/partitionedfs.py
index 5fc5765d65..08ae52f3e5 100644
--- a/scripts/lib/wic/utils/partitionedfs.py
+++ b/scripts/lib/wic/utils/partitionedfs.py
@@ -238,7 +238,11 @@ class Image():
238 238
239 return exec_native_cmd(cmd, self.native_sysroot) 239 return exec_native_cmd(cmd, self.native_sysroot)
240 240
241 def __format_disks(self): 241 def create(self):
242 for dev in self.disks:
243 disk = self.disks[dev]
244 disk['disk'].create()
245
242 self.layout_partitions() 246 self.layout_partitions()
243 247
244 for dev in self.disks: 248 for dev in self.disks:
@@ -375,12 +379,3 @@ class Image():
375 partimage = image_file + '.p%d' % part['num'] 379 partimage = image_file + '.p%d' % part['num']
376 os.rename(source, partimage) 380 os.rename(source, partimage)
377 self.partimages.append(partimage) 381 self.partimages.append(partimage)
378
379 def create(self):
380 for dev in self.disks:
381 disk = self.disks[dev]
382 disk['disk'].create()
383
384 self.__format_disks()
385
386 return