diff options
Diffstat (limited to 'scripts/lib/mic/plugins')
-rw-r--r-- | scripts/lib/mic/plugins/source/bootimg-efi.py | 10 | ||||
-rw-r--r-- | scripts/lib/mic/plugins/source/bootimg-pcbios.py | 10 |
2 files changed, 18 insertions, 2 deletions
diff --git a/scripts/lib/mic/plugins/source/bootimg-efi.py b/scripts/lib/mic/plugins/source/bootimg-efi.py index 3e0997bacf..1974b062b2 100644 --- a/scripts/lib/mic/plugins/source/bootimg-efi.py +++ b/scripts/lib/mic/plugins/source/bootimg-efi.py | |||
@@ -131,7 +131,15 @@ class BootimgEFIPlugin(SourcePlugin): | |||
131 | rc, out = exec_cmd(du_cmd) | 131 | rc, out = exec_cmd(du_cmd) |
132 | blocks = int(out.split()[0]) | 132 | blocks = int(out.split()[0]) |
133 | 133 | ||
134 | blocks += BOOTDD_EXTRA_SPACE | 134 | extra_blocks = part.get_extra_block_count(blocks) |
135 | |||
136 | if extra_blocks < BOOTDD_EXTRA_SPACE: | ||
137 | extra_blocks = BOOTDD_EXTRA_SPACE | ||
138 | |||
139 | blocks += extra_blocks | ||
140 | |||
141 | msger.debug("Added %d extra blocks to %s to get to %d total blocks" % \ | ||
142 | (extra_blocks, part.mountpoint, blocks)) | ||
135 | 143 | ||
136 | # Ensure total sectors is an integral number of sectors per | 144 | # Ensure total sectors is an integral number of sectors per |
137 | # track or mcopy will complain. Sectors are 512 bytes, and we | 145 | # track or mcopy will complain. Sectors are 512 bytes, and we |
diff --git a/scripts/lib/mic/plugins/source/bootimg-pcbios.py b/scripts/lib/mic/plugins/source/bootimg-pcbios.py index 3cd446f052..fad150f940 100644 --- a/scripts/lib/mic/plugins/source/bootimg-pcbios.py +++ b/scripts/lib/mic/plugins/source/bootimg-pcbios.py | |||
@@ -154,7 +154,15 @@ class BootimgPcbiosPlugin(SourcePlugin): | |||
154 | rc, out = exec_cmd(du_cmd) | 154 | rc, out = exec_cmd(du_cmd) |
155 | blocks = int(out.split()[0]) | 155 | blocks = int(out.split()[0]) |
156 | 156 | ||
157 | blocks += BOOTDD_EXTRA_SPACE | 157 | extra_blocks = part.get_extra_block_count(blocks) |
158 | |||
159 | if extra_blocks < BOOTDD_EXTRA_SPACE: | ||
160 | extra_blocks = BOOTDD_EXTRA_SPACE | ||
161 | |||
162 | blocks += extra_blocks | ||
163 | |||
164 | msger.debug("Added %d extra blocks to %s to get to %d total blocks" % \ | ||
165 | (extra_blocks, part.mountpoint, blocks)) | ||
158 | 166 | ||
159 | # Ensure total sectors is an integral number of sectors per | 167 | # Ensure total sectors is an integral number of sectors per |
160 | # track or mcopy will complain. Sectors are 512 bytes, and we | 168 | # track or mcopy will complain. Sectors are 512 bytes, and we |