[pve-devel] r5016 - pve-access-control/trunk

svn-commits at proxmox.com svn-commits at proxmox.com
Mon Aug 16 13:49:42 CEST 2010


Author: dietmar
Date: 2010-08-16 11:49:42 +0000 (Mon, 16 Aug 2010)
New Revision: 5016

Modified:
   pve-access-control/trunk/AccessControl.pm
Log:
import safe_print


Modified: pve-access-control/trunk/AccessControl.pm
===================================================================
--- pve-access-control/trunk/AccessControl.pm	2010-08-16 11:49:19 UTC (rev 5015)
+++ pve-access-control/trunk/AccessControl.pm	2010-08-16 11:49:42 UTC (rev 5016)
@@ -8,7 +8,7 @@
 use Digest::SHA;
 use Authen::PAM qw(:constants);
 use Net::LDAP;
-use PVE::Tools qw(run_command lock_file file_get_contents split_list);
+use PVE::Tools qw(run_command lock_file file_get_contents split_list safe_print);
 use PVE::INotify qw(register_file read_file write_file);
 use PVE::JSONSchema;
 
@@ -848,16 +848,6 @@
     return $domainname;
 }
 
-sub safe_print {
-    my ($filename, $fh, $data) = @_;
-
-    return if !$data;
-
-    my $res = print $fh $data;
-
-    die "write to '$filename' failed\n" if !$res;
-}
-
 sub write_shadow_config {
     my ($filename, $fh, $cfg) = @_;
 




More information about the pve-devel mailing list