Improve readability of printgpt

This commit is contained in:
Bjoern Kerler 2024-09-15 13:00:22 +02:00
parent a53a9ef73b
commit d810505828
No known key found for this signature in database
GPG key ID: A3E0FAF79F2F4578

View file

@ -267,7 +267,7 @@ class GPT(metaclass=LogBase):
def tostring(self):
mstr = "\nGPT Table:\n-------------\n"
for _partition in self.partentries:
mstr += ("{:20} Offset 0x{:016x}, Length 0x{:016x}, Flags 0x{:08x}, UUID {}, Type {}\n".format(
mstr += ("{:20} Offset 0x{:016x}, Length 0x{:016x}\n Flags 0x{:08x}, UUID {}, Type {}\n".format(
_partition.name + ":", _partition.sector * self.sectorsize, _partition.sectors * self.sectorsize,
_partition.flags, _partition.unique, _partition.type))
mstr += ("\nTotal disk size:0x{:016x}, sectors:0x{:016x}\n".format(self.totalsectors * self.sectorsize,