image-info: include partition table id

Signed-off-by: Tom Gundersen <teg@jklm.no>
This commit is contained in:
Tom Gundersen 2019-10-03 12:26:55 +02:00 committed by Lars Karlitski
parent ed185b41ce
commit 41c6f5dd0b

View file

@ -77,7 +77,7 @@ def read_partition_table(device):
"size": p["size"] * 512
})
return ptable["label"], partitions
return ptable["label"], ptable["id"], partitions
def read_bootloader_type(device):
@ -120,7 +120,7 @@ report = {}
with nbd_connect(image) as device:
report["image-format"] = read_image_format(image)
report["bootloader"] = read_bootloader_type(device)
report["partition-table"], report["partitions"] = read_partition_table(device)
report["partition-table"], report["partition-table-id"], report["partitions"] = read_partition_table(device)
n_partitions = len(report["partitions"])
for n in range(1, n_partitions + 1):