mirror of
git://git.proxmox.com/git/pve-storage.git
synced 2024-12-22 13:34:16 +03:00
diskmanage: don't set usage for unused partitions
The disk type is already 'partition' so there's no additional information here. And it would need to serve as a code-word for unused partitions. The cleaner approach is to not set the usage. Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
This commit is contained in:
parent
bd46e59b5d
commit
ff91cfae35
@ -661,7 +661,7 @@ sub get_disks {
|
||||
# for devices, this check is done explicitly later
|
||||
return 'Device Mapper' if !dir_is_empty("$sysdir/holders");
|
||||
|
||||
return 'partition';
|
||||
return; # unused partition
|
||||
};
|
||||
|
||||
my $collect_ceph_info = sub {
|
||||
@ -730,7 +730,6 @@ sub get_disks {
|
||||
my $used = $determine_usage->($devpath, $sysdir, 0);
|
||||
if (!$include_partitions) {
|
||||
foreach my $part (sort keys %{$partitions}) {
|
||||
next if $partitions->{$part}->{used} eq 'partition';
|
||||
$used //= $partitions->{$part}->{used};
|
||||
}
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user