[pve-devel] [PATCH] moved from PVE::Storage:NFSPlugin to reuse the code
Dietmar Maurer
dietmar at proxmox.com
Thu Sep 3 09:55:46 CEST 2015
I added the following to ProcFSTools instead:
sub read_proc_mounts {
return PVE::Tools::file_get_contents("/proc/mounts"):
}
On 09/03/2015 08:51 AM, Wolfgang Link wrote:
> +sub read_proc_mounts {
> +
> + local $/; # enable slurp mode
> +
> + my $data = "";
> + if (my $fd = IO::File->new("/proc/mounts", "r")) {
> + $data = <$fd>;
> + close ($fd);
> + }
> +
> + return $data;
> +}
More information about the pve-devel
mailing list