cluster: STABLE3 - Always remove leading zeros from key value.

rohara rohara at fedoraproject.org
Mon Feb 15 17:51:19 UTC 2010


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=dc37a1fe8217a5e29d6b0c5377761cb7f745492a
Commit:        dc37a1fe8217a5e29d6b0c5377761cb7f745492a
Parent:        79376b5abe20c9e2cc00ca98c8bff3e9b8a58381
Author:        Ryan O'Hara <rohara at redhat.com>
AuthorDate:    Mon Feb 15 11:48:34 2010 -0600
Committer:     Ryan O'Hara <rohara at redhat.com>
CommitterDate: Mon Feb 15 11:48:34 2010 -0600

Always remove leading zeros from key value.

Signed-off-by: Ryan O'Hara <rohara at redhat.com>
---
 fence/agents/scsi/fence_scsi.pl |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/fence/agents/scsi/fence_scsi.pl b/fence/agents/scsi/fence_scsi.pl
index 611a98f..59259cf 100644
--- a/fence/agents/scsi/fence_scsi.pl
+++ b/fence/agents/scsi/fence_scsi.pl
@@ -609,6 +609,12 @@ if ($key == 0) {
     log_error ("key cannot be zero");
 }
 
+## remove any leading zeros from key
+##
+if ($key =~ /^0/) {
+    $key =~ s/^0+//;
+}
+
 ## get devices
 ##
 if (defined $opt_d) {


More information about the cluster-commits mailing list