[elbe-devel] Add name to a gpthd partition
Steih, Martin
Martin.Steih at lachmann-rink.de
Thu Jan 13 22:08:28 CET 2022
Would this be a viable solution to add support for partition names in case of gpthd? I hope I do not bother you with this, but it would really help to have this ability.
diff --git a/elbepack/hdimg.py b/elbepack/hdimg.py
index 696225925..e151ef289 100644
--- a/elbepack/hdimg.py
+++ b/elbepack/hdimg.py
@@ -335,6 +335,10 @@ def create_partition(
ppart.setFlag(_ped.PARTITION_LBA)
else:
ppart = parted.Partition(disk, ptype, geometry=g)
+
+ if disk.type == "gpt" and \
+ part.has("name"):
+ ppart.set_name(part.text("name"))
cons = parted.Constraint(exactGeom=g)
disk.addPartition(ppart, cons)
diff --git a/schema/dbsfed.xsd b/schema/dbsfed.xsd
index 34f4562c0..551e354ba 100644
--- a/schema/dbsfed.xsd
+++ b/schema/dbsfed.xsd
@@ -1807,6 +1807,13 @@
</documentation>
</annotation>
</element>
+ <element name="name" type="rfs:string" minOccurs="0" maxOccurs="1">
+ <annotation>
+ <documentation>
+ human readable name of the partition used for naming a gpt partition
+ </documentation>
+ </annotation>
+ </element>
<element name="binary" type="rfs:string" minOccurs="0">
<annotation>
<documentation>
i. A. Martin Steih
Projektleiter
Entwicklung
Lachmann & Rink GmbH
Martin.Steih at lachmann-rink.de<mailto:Martin.Steih at lachmann-rink.de> | www.lachmann-rink.de<https://www.lachmann-rink.de>
fon: +49 2734 2817 430<tel:+49%202734%202817%20430>
Hommeswiese 129, 57258 Freudenberg | Otto-Hahn-Straße 18-20, 44227 Dortmund
Geschäftsführer: Dipl.-Ing. Arjan Bijlard, Dipl.-Inf. Claudius Rink | Amtsgericht Siegen, HRB 2600
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linutronix.de/pipermail/elbe-devel/attachments/20220113/0dafac0b/attachment.htm>
More information about the elbe-devel
mailing list