[elbe-devel] elbe gpt disk partition names
Steih, Martin
Martin.Steih at lachmann-rink.de
Tue Jan 4 13:18:44 CET 2022
I hope I am not requesting this wrong, but would it be possible to add the following patch (or something more suitable) to support partition names with gpt images?
diff --git a/elbepack/hdimg.py b/elbepack/hdimg.py
index 696225925..0e6ebed72 100644
--- a/elbepack/hdimg.py
+++ b/elbepack/hdimg.py
@@ -331,11 +331,16 @@ def create_partition(
fs = simple_fstype("fat32")
ppart = parted.Partition(disk, ptype, fs, geometry=g)
+
if disk.type != "gpt":
ppart.setFlag(_ped.PARTITION_LBA)
else:
ppart = parted.Partition(disk, ptype, geometry=g)
+ if disk.type == "gpt" and \
+ part.text("label") in fslabel:
+ ppart.set_name(fslabel[part.text("label")].label)
+
cons = parted.Constraint(exactGeom=g)
disk.addPartition(ppart, cons)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linutronix.de/pipermail/elbe-devel/attachments/20220104/23d7401d/attachment.htm>
More information about the elbe-devel
mailing list