Merge pull request #640 from mwhudson/do-not-count-extended-partitions
do not count extended partition as using space
This commit is contained in:
commit
9e4986b67a
|
@ -604,6 +604,8 @@ class _Device(_Formattable, ABC):
|
||||||
return self.size
|
return self.size
|
||||||
r = 0
|
r = 0
|
||||||
for p in self._partitions:
|
for p in self._partitions:
|
||||||
|
if p.flag == "extended":
|
||||||
|
continue
|
||||||
r += p.size
|
r += p.size
|
||||||
return r
|
return r
|
||||||
|
|
||||||
|
@ -878,6 +880,10 @@ class Partition(_Formattable):
|
||||||
r.append("ESP")
|
r.append("ESP")
|
||||||
elif self.flag == "bios_grub":
|
elif self.flag == "bios_grub":
|
||||||
r.append("bios_grub")
|
r.append("bios_grub")
|
||||||
|
elif self.flag == "extended":
|
||||||
|
r.append("extended")
|
||||||
|
elif self.flag == "logical":
|
||||||
|
r.append("logical")
|
||||||
return r
|
return r
|
||||||
|
|
||||||
def usage_labels(self):
|
def usage_labels(self):
|
||||||
|
|
Loading…
Reference in New Issue