[pve-devel] [PATCH v2 librados2-perl 1/3] white space cleanup

Alwin Antreich a.antreich at proxmox.com
Thu Apr 5 10:41:34 CEST 2018


Signed-off-by: Alwin Antreich <a.antreich at proxmox.com>
---
 PVE/RADOS.pm | 12 ++++++------
 RADOS.xs     | 32 ++++++++++++++++----------------
 2 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/PVE/RADOS.pm b/PVE/RADOS.pm
index aa6a102..aff8141 100644
--- a/PVE/RADOS.pm
+++ b/PVE/RADOS.pm
@@ -43,7 +43,7 @@ my $writedata = sub {
     my ($fh, $cmd, $data) = @_;
 
     local $SIG{PIPE} = 'IGNORE';
- 
+
     my $bin = pack "a L/a*", $cmd, $data || '';
     my $res = syswrite $fh, $bin;
 
@@ -63,7 +63,7 @@ my $readdata = sub {
     return undef if $allow_eof && length($head) == 0;
 
     die "partial read\n" if length($head) < 5;
-    
+
     my ($cmd, $len) = unpack "a L", $head;
 
     my $data = '';
@@ -86,7 +86,7 @@ my $kill_worker = sub {
     close($self->{child}) if defined($self->{child});
 
     # only kill if we created the process
-    return if $self->{pid} != $$; 
+    return if $self->{pid} != $$;
 
     kill(9, $self->{cpid});
     waitpid($self->{cpid}, 0);
@@ -140,7 +140,7 @@ sub new {
 
     if ($cpid) { # parent
 	close $parent;
- 
+
 	$self->{cpid} = $cpid;
 	$self->{child} = $child;
 
@@ -182,7 +182,7 @@ sub new {
 
 	for (;;) {
 	    my ($cmd, $data) = &$readdata($parent, 1);
-	    
+
 	    last if !$cmd || $cmd eq 'Q';
 
 	    my $res;
@@ -203,7 +203,7 @@ sub new {
 	    }
 	    &$writedata($parent, '>', $res);
 	}
- 
+
 	exit(0);
     }
 
diff --git a/RADOS.xs b/RADOS.xs
index a9f6bc3..66fa65a 100644
--- a/RADOS.xs
+++ b/RADOS.xs
@@ -13,14 +13,14 @@
 
 MODULE = PVE::RADOS		PACKAGE = PVE::RADOS
 
-rados_t 
-pve_rados_create() 
+rados_t
+pve_rados_create()
 PROTOTYPE:
 CODE:
-{	
-    rados_t clu = NULL;	 
+{
+    rados_t clu = NULL;
     int ret = rados_create(&clu, NULL);
-    
+
     if (ret == 0)
         RETVAL = clu;
     else {
@@ -31,7 +31,7 @@ CODE:
 OUTPUT: RETVAL
 
 void
-pve_rados_conf_set(cluster, key, value) 
+pve_rados_conf_set(cluster, key, value)
 rados_t cluster
 char *key
 char *value
@@ -41,13 +41,13 @@ CODE:
     DPRINTF("pve_rados_conf_set %s = %s\n", key, value);
 
     int res = rados_conf_set(cluster, key, value);
-    if (res < 0) {		 
+    if (res < 0) {
         die("rados_conf_set failed - %s\n", strerror(-res));
     }
 }
 
 void
-pve_rados_connect(cluster) 
+pve_rados_connect(cluster)
 rados_t cluster
 PROTOTYPE: $
 CODE:
@@ -58,7 +58,7 @@ CODE:
     if (res < 0) {
         die("rados_conf_read_file failed - %s\n", strerror(-res));
     }
- 
+
     res = rados_connect(cluster);
     if (res < 0) {
         die("rados_connect failed - %s\n", strerror(-res));
@@ -66,7 +66,7 @@ CODE:
 }
 
 void
-pve_rados_shutdown(cluster) 
+pve_rados_shutdown(cluster)
 rados_t cluster
 PROTOTYPE: $
 CODE:
@@ -76,7 +76,7 @@ CODE:
 }
 
 SV *
-pve_rados_mon_command(cluster, cmds) 
+pve_rados_mon_command(cluster, cmds)
 rados_t cluster
 AV *cmds
 PROTOTYPE: $$
@@ -99,7 +99,7 @@ CODE:
         cmd[cmdlen] = SvPV_nolen(arg);
         DPRINTF("pve_rados_mon_command%zd %s\n", cmdlen, cmd[cmdlen]);
         cmdlen++;
-    } 
+    }
 
     int ret = rados_mon_command(cluster, cmd, cmdlen,
                                 NULL, 0,
@@ -112,15 +112,15 @@ CODE:
         rados_buffer_free(outs);
         die(msg);
     }
- 
+
     RETVAL = newSVpv(outbuf, outbuflen);
 
     rados_buffer_free(outbuf);
 }
 OUTPUT: RETVAL
 
-HV * 
-pve_rados_cluster_stat(cluster) 
+HV *
+pve_rados_cluster_stat(cluster)
 rados_t cluster
 PROTOTYPE: $
 CODE:
@@ -130,7 +130,7 @@ CODE:
     DPRINTF("pve_rados_cluster_stat");
 
     int ret = rados_cluster_stat(cluster, &result);
-  
+
     if(ret != 0) {
         warn("rados_cluster_stat failed (ret=%d)\n", ret);
         XSRETURN_UNDEF;
-- 
2.11.0





More information about the pve-devel mailing list