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>
+# 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 = {};
sub get_disks {
my ($disks, $nosmart, $include_partitions) = @_;
my $disklist = {};