$def with (disk) $code: def partinfo(p, ext=False): ret = '' if p.size > 1: ret += '%.0f%%' % p.size if p.filesystem: ret += '('+p.filesystem+')' ret += '' if p.bootable: ret += '
' if ext: ret += '
' ret = '
%s
' % (' pext' if ext else '', ret) return ret
$for partition in disk.get_partitions_with_free_spaces_and_extended(): $if partition.type == "PRIMARY":
$:partinfo(partition)
$elif partition.type == "EXTENDED":
$for logic in disk.get_partitions_inside_extended(): $if logic.type == "LOGIC":
$:partinfo(logic, True)
$elif logic.type == "FREE":
$:partinfo(logic, True)
$elif partition.type == "FREE":
$:partinfo(partition)