Skip to contentSkip to conversation

isoimage-isohybrid.py: Parameterize ESP label

PATCH New Haris Okanovic 1 participant 1 message Nov 7, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 isoimage-isohybrid.py: Parameterize ESP label

Add "esp_label" plugin parameter so that caller may override default ESP partition label 'EFIimg'.

---
 scripts/lib/wic/plugins/source/isoimage-isohybrid.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
scripts/lib/wic/plugins/source/isoimage-isohybrid.py +4 -2
index 24299c1ece..95a54a09d2 100644
@@ -347,8 +347,10 @@ class IsoImagePlugin(SourcePlugin):
             # dosfs image for EFI boot
             bootimg = "%s/efi.img" % isodir
 
-            dosfs_cmd = 'mkfs.vfat -n "EFIimg" -S 512 -C %s %d' \
-                        % (bootimg, blocks)
+            esp_label = source_params.get('esp_label', 'EFIimg')
+
+            dosfs_cmd = 'mkfs.vfat -n \'%s\' -S 512 -C %s %d' \
+                        % (esp_label, bootimg, blocks)
             exec_native_cmd(dosfs_cmd, native_sysroot)
 
             mmd_cmd = "mmd -i %s ::/EFI" % bootimg
Signature · 1 line
2.24.0