diskmanage: add mounted_paths
returns a list of mounted paths with the backing devices Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com> Reviewed-by: Dominik Csapak <d.csapak@proxmox.com> Tested-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
committed by
Fabian Grünbichler
parent
6a44cc417d
commit
4de6002558
@ -499,6 +499,19 @@ sub mounted_blockdevs {
|
|||||||
return $mounted;
|
return $mounted;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# returns hashmap of abs mount path -> first part of /proc/mounts (what)
|
||||||
|
sub mounted_paths {
|
||||||
|
my $mounted = {};
|
||||||
|
|
||||||
|
my $mounts = PVE::ProcFSTools::parse_proc_mounts();
|
||||||
|
|
||||||
|
foreach my $mount (@$mounts) {
|
||||||
|
$mounted->{abs_path($mount->[1])} = $mount->[0];
|
||||||
|
};
|
||||||
|
|
||||||
|
return $mounted;
|
||||||
|
}
|
||||||
|
|
||||||
sub get_disks {
|
sub get_disks {
|
||||||
my ($disks, $nosmart, $include_partitions) = @_;
|
my ($disks, $nosmart, $include_partitions) = @_;
|
||||||
my $disklist = {};
|
my $disklist = {};
|
||||||
|
|||||||
Reference in New Issue
Block a user