Skip to content
Snippets Groups Projects
Commit 7301cd7e authored by Stéphane Diemer's avatar Stéphane Diemer
Browse files

Fixed wrong unallocated space warning.

parent a0dc1521
No related branches found
No related tags found
No related merge requests found
...@@ -92,12 +92,14 @@ def check_allocation(dev): ...@@ -92,12 +92,14 @@ def check_allocation(dev):
size = int(blocks) * 512 size = int(blocks) * 512
if name == root_dev: if name == root_dev:
max_size = size max_size = size
if root_dev.startswith('md'):
total_size += size
else: else:
total_size += size total_size += size
unallocated = max_size - total_size unallocated = max_size - total_size
unallocated_gbytes = to_gbytes(unallocated) unallocated_gbytes = to_gbytes(unallocated)
if unallocated_gbytes > 1: if unallocated_gbytes > 1:
print('Warning, %s GB are unallocated on %s.' % (unallocated_gbytes, root_dev)) print('Warning: %s%s GB are unallocated on %s.%s' % (YELLOW, unallocated_gbytes, root_dev, DEF))
return False return False
return True return True
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment