s390utils/0061-lsluns-Accept-uppercas...

40 lines
1.2 KiB
Diff

From 7fd37ae55c104cf62f8d62da79d89a4c59087a6d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
Date: Fri, 28 Jan 2011 14:31:06 +0100
Subject: [PATCH 61/61] lsluns: Accept uppercase and lowercase hex digits
Description: lsluns: Accept uppercase and lowercase hex digits
Symptom: lsluns does not accept uppercase letters in hex-digits for
FCP device id and WWPN.
Problem: lsluns compares the FCP device id and the WWPN with the
sysfs entries that are always lowercase.
Solution: Convert the input from the command line to lowercase, so
that lsluns accepts both, uppercase and lowercase for the
hex digits in the FCP device and the WWPN.
---
zconf/lsluns | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/zconf/lsluns b/zconf/lsluns
index acbdcd7..436ea34 100755
--- a/zconf/lsluns
+++ b/zconf/lsluns
@@ -252,7 +252,14 @@ GetOptions('c|ccw=s' => \@adapter,
};
@adapter = split(',', join(',', @adapter));
+foreach (@adapter) {
+ $_ =~ tr/A-Z/a-z/;
+}
+
@port = split(',', join(',', @port));
+foreach (@port) {
+ $_ =~ tr/A-Z/a-z/;
+}
%res_hash = get_env_list(\@adapter, \@port);
--
1.7.3.5