summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--scripts/lib/wic/utils/partitionedfs.py14
1 files changed, 4 insertions, 10 deletions
diff --git a/scripts/lib/wic/utils/partitionedfs.py b/scripts/lib/wic/utils/partitionedfs.py
index 08ae52f3e5..2cfdf70cde 100644
--- a/scripts/lib/wic/utils/partitionedfs.py
+++ b/scripts/lib/wic/utils/partitionedfs.py
@@ -80,15 +80,6 @@ class Image():
80 self.disks[disk_name]['disk'] = disk_obj 80 self.disks[disk_name]['disk'] = disk_obj
81 self.disks[disk_name]['identifier'] = identifier 81 self.disks[disk_name]['identifier'] = identifier
82 82
83 def __add_partition(self, part):
84 """ This is a helper function for 'add_partition()' which adds a
85 partition to the internal list of partitions. """
86
87 assert not self._partitions_layed_out
88
89 self.partitions.append(part)
90 self.__add_disk(part['disk_name'])
91
92 def add_partition(self, size, disk_name, mountpoint, source_file=None, fstype=None, 83 def add_partition(self, size, disk_name, mountpoint, source_file=None, fstype=None,
93 label=None, fsopts=None, boot=False, align=None, no_table=False, 84 label=None, fsopts=None, boot=False, align=None, no_table=False,
94 part_type=None, uuid=None, system_id=None): 85 part_type=None, uuid=None, system_id=None):
@@ -117,7 +108,10 @@ class Image():
117 'uuid': uuid, # Partition UUID 108 'uuid': uuid, # Partition UUID
118 'system_id': system_id} # Partition system id 109 'system_id': system_id} # Partition system id
119 110
120 self.__add_partition(part) 111 assert not self._partitions_layed_out
112
113 self.partitions.append(part)
114 self._add_disk(part['disk_name'])
121 115
122 def layout_partitions(self, ptable_format="msdos"): 116 def layout_partitions(self, ptable_format="msdos"):
123 """ Layout the partitions, meaning calculate the position of every 117 """ Layout the partitions, meaning calculate the position of every