]> code.ossystems Code Review - openembedded-core.git/commitdiff
wic: Add parameter 'uuid' to Image.add_partition method
authorEd Bartosh <ed.bartosh@linux.intel.com>
Fri, 5 Jun 2015 07:17:12 +0000 (10:17 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 11 Jun 2015 22:55:39 +0000 (23:55 +0100)
With this parameter it's possible to pass generated UUID
into Image class to set it for partition when it's created.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
scripts/lib/wic/imager/direct.py
scripts/lib/wic/utils/partitionedfs.py

index 36150c9ad351721d725727589ab6f1ff8206d4fa..2290ecd07d8ca68bbe5c8f0e9aca3e0aa65da871 100644 (file)
@@ -272,7 +272,8 @@ class DirectImageCreator(BaseImageCreator):
                                        boot=p.active,
                                        align=p.align,
                                        no_table=p.no_table,
-                                       part_type=p.part_type)
+                                       part_type=p.part_type,
+                                       uuid=p.uuid)
 
         self._restore_fstab(fstab)
 
index 902548fbf8fb9da51b1f110653561fb1cecd9bbd..a6e2e4f233b7e5fd86409f6ea79857245e361929 100644 (file)
@@ -86,7 +86,7 @@ class Image(object):
 
     def add_partition(self, size, disk_name, mountpoint, source_file=None, fstype=None,
                       label=None, fsopts=None, boot=False, align=None, no_table=False,
-                      part_type=None):
+                      part_type=None, uuid=None):
         """ Add the next partition. Prtitions have to be added in the
         first-to-last order. """
 
@@ -110,7 +110,8 @@ class Image(object):
                     'boot': boot, # Bootable flag
                     'align': align, # Partition alignment
                     'no_table' : no_table, # Partition does not appear in partition table
-                    'part_type' : part_type} # Partition type
+                    'part_type' : part_type, # Partition type
+                    'uuid': uuid} # Partition UUID
 
             self.__add_partition(part)