[pve-devel] [PATCH container] use PVE::Storage::config(), not cfs_read_file

Fabian Grünbichler f.gruenbichler at proxmox.com
Fri Mar 25 13:46:23 CET 2016


---
 src/PVE/API2/LXC.pm | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/PVE/API2/LXC.pm b/src/PVE/API2/LXC.pm
index ea1e942..ec9ea44 100644
--- a/src/PVE/API2/LXC.pm
+++ b/src/PVE/API2/LXC.pm
@@ -7,7 +7,7 @@ use PVE::SafeSyslog;
 use PVE::Tools qw(extract_param run_command);
 use PVE::Exception qw(raise raise_param_exc);
 use PVE::INotify;
-use PVE::Cluster qw(cfs_read_file);
+use PVE::Cluster;
 use PVE::AccessControl;
 use PVE::Firewall;
 use PVE::Storage;
@@ -213,7 +213,7 @@ __PACKAGE__->register_method({
 
 	my $storage = extract_param($param, 'storage') // 'local';
 
-	my $storage_cfg = cfs_read_file("storage.cfg");
+	my $storage_cfg = PVE::Storage::config();
 
 	my $ostemplate = extract_param($param, 'ostemplate');
 
@@ -505,7 +505,7 @@ __PACKAGE__->register_method({
 	# test if container exists
 	my $conf = PVE::LXC::Config->load_config($vmid);
 
-	my $storage_cfg = cfs_read_file("storage.cfg");
+	my $storage_cfg = PVE::Storage::config();
 
 	PVE::LXC::Config->check_protection($conf, "can't remove CT $vmid");
 
@@ -1268,7 +1268,7 @@ __PACKAGE__->register_method({
 
 	PVE::LXC::check_ct_modify_config_perm($rpcenv, $authuser, $vmid, undef, $param, []);
 
-	my $storage_cfg = cfs_read_file("storage.cfg");
+	my $storage_cfg = PVE::Storage::config();
 
 	my $code = sub {
 
-- 
2.1.4





More information about the pve-devel mailing list