mirror of
git://git.proxmox.com/git/pve-storage.git
synced 2025-01-24 02:04:13 +03:00
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:
parent
6a44cc417d
commit
4de6002558
@ -499,6 +499,19 @@ sub mounted_blockdevs {
|
||||
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 {
|
||||
my ($disks, $nosmart, $include_partitions) = @_;
|
||||
my $disklist = {};
|
||||
|
Loading…
x
Reference in New Issue
Block a user