[elbe-devel] Add name to a gpthd partition
Steih, Martin
Martin.Steih at lachmann-rink.de
Tue Mar 8 06:46:22 CET 2022
>On Thu, Jan 13, 2022 at 09:08:28PM +0000, Steih, Martin wrote:
>> 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
>
>> _______________________________________________
>> elbe-devel mailing list
>> elbe-devel at linutronix.de
>> https://lists.linutronix.de/mailman/listinfo/elbe-devel
Signed-off-by: "Steih, Martin" <Martin.Steih at lachmann-rink.de>
More information about the elbe-devel
mailing list