[pve-devel] [PATCH manager 3/8] api/Ceph: actually use imported file_get_contents

Fabian Grünbichler f.gruenbichler at proxmox.com
Wed Nov 21 15:41:33 CET 2018


LGTM, but it's a bit strange that get is imported, and set is not (but
also used). just in case you want to clean that up as well ;)

On Wed, Nov 21, 2018 at 11:42:38AM +0100, Thomas Lamprecht wrote:
> Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
> ---
>  PVE/API2/Ceph.pm | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/PVE/API2/Ceph.pm b/PVE/API2/Ceph.pm
> index cd62c040..dd7f2016 100644
> --- a/PVE/API2/Ceph.pm
> +++ b/PVE/API2/Ceph.pm
> @@ -688,7 +688,7 @@ __PACKAGE__->register_method ({
>  	PVE::CephTools::check_ceph_inited();
>  
>  	my $path = PVE::CephTools::get_config('pve_ceph_cfgpath');
> -	return PVE::Tools::file_get_contents($path);
> +	return file_get_contents($path);
>  
>      }});
>  
> @@ -1923,7 +1923,7 @@ __PACKAGE__->register_method ({
>  	    my $bindata = $rados->mon_command({ prefix => 'osd getcrushmap', format => 'plain' });
>  	    PVE::Tools::file_set_contents($mapfile, $bindata);
>  	    run_command(['crushtool', '-d', $mapfile, '-o', $mapdata]);
> -	    $txt = PVE::Tools::file_get_contents($mapdata);
> +	    $txt = file_get_contents($mapdata);
>  	};
>  	my $err = $@;
>  
> -- 
> 2.19.1
> 
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel




More information about the pve-devel mailing list