[elbe-devel] [PATCH v2 1/4] hdimg: do not use flag lba if partition format is gpt
Martin Kaistra
martin.kaistra at linutronix.de
Wed Mar 28 14:16:53 CEST 2018
The partition flag 'lba' is not available for gpt disk labels, so
don't try to set it.
Error message:
PartitionException: The flag 'lba' is not available for gpt disk
labels.
Signed-off-by: Martin Kaistra <martin.kaistra at linutronix.de>
Reported-by: Claudius Heine <ch at denx.de>
Reviewed-by: Torben Hohn <torben.hohn at linutronix.de>
---
elbepack/hdimg.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/elbepack/hdimg.py b/elbepack/hdimg.py
index a8b74c58..e1dc2aae 100644
--- a/elbepack/hdimg.py
+++ b/elbepack/hdimg.py
@@ -398,7 +398,8 @@ def create_partition(
fslabel[part.text("label")].fstype == "vfat":
fs = simple_fstype("fat32")
ppart = parted.Partition(disk, ptype, fs, geometry=g)
- ppart.setFlag(_ped.PARTITION_LBA)
+ if disk.type != "gpt":
+ ppart.setFlag(_ped.PARTITION_LBA)
else:
ppart = parted.Partition(disk, ptype, geometry=g)
--
2.11.0
More information about the elbe-devel
mailing list