[elbe-devel] Add name to a gpthd partition

Eduard Krein eduard.krein at linutronix.de
Mon Mar 7 14:09:29 CET 2022


Am Donnerstag, dem 13.01.2022 um 21:08 +0000 schrieb Steih, Martin:
> 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.MartinSteih 
> Projektleiter 
> Entwicklung
> 
> Lachmann & Rink GmbH
> Martin.Steih at lachmann-rink.de | www.lachmann-rink.de
> fon: +49 2734 2817 430
> 
> 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

Tested-by:  Eduard Krein <eduard.krein at linutronix.de>

-- 
Eduard Krein
Linutronix GmbH | Bahnhofstrasse 3 | D-88690 Uhldingen-Mühlhofen
Phone: +49 7556 25 999 19; Fax.: +49 7556 25 999 99

Hinweise zum Datenschutz finden Sie hier (Informations on data privacy 
can be found here): https://linutronix.de/kontakt/Datenschutz.php

Linutronix GmbH | Firmensitz (Registered Office): Uhldingen-Mühlhofen | 
Registergericht (Registration Court): Amtsgericht Freiburg i.Br., HRB700 
806 | Geschäftsführer (Managing Directors): Heinz Egger, Thomas Gleixner

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linutronix.de/pipermail/elbe-devel/attachments/20220307/609b8570/attachment.htm>


More information about the elbe-devel mailing list