[pve-devel] [PATCH] fix modification of read only bug
mir at datanom.net
mir at datanom.net
Sat Oct 25 00:16:32 CEST 2014
From: Michael Rasmussen <mir at datanom.net>
Signed-off-by: Michael Rasmussen <mir at datanom.net>
---
PVE/Storage/LunCmd/Istgt.pm | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/PVE/Storage/LunCmd/Istgt.pm b/PVE/Storage/LunCmd/Istgt.pm
index c17d1c8..8594f77 100644
--- a/PVE/Storage/LunCmd/Istgt.pm
+++ b/PVE/Storage/LunCmd/Istgt.pm
@@ -241,7 +241,7 @@ my $make_lun = sub {
my @options = ();
my $lun = $get_lu_name->($target);
if ($scfg->{nowritecache}) {
- push @options, "WriteCache Disable";
+ push @options, "WriteCache Disable";
}
my $conf = {
lun => $lun,
@@ -285,13 +285,14 @@ my $parser = sub {
next if (($_ =~ /^\s*#/) || ($_ =~ /^\s*$/));
if ($_ =~ /^\s*(\w+)\s+(.+)\s*/) {
my $arg1 = $1;
- $2 =~ s/^\s+|\s+$|"\s*//g;
- if ($2 =~ /^Storage\s*(.+)/i) {
+ my $arg2 = $2;
+ $arg2 =~ s/^\s+|\s+$|"\s*//g;
+ if ($arg2 =~ /^Storage\s*(.+)/i) {
$SETTINGS->{$lun}->{$arg1}->{storage} = $1;
- } elsif ($2 =~ /^Option\s*(.+)/i) {
+ } elsif ($arg2 =~ /^Option\s*(.+)/i) {
push @{$SETTINGS->{$lun}->{$arg1}->{options}}, $1;
} else {
- $SETTINGS->{$lun}->{$arg1} = $2;
+ $SETTINGS->{$lun}->{$arg1} = $arg2;
}
} else {
die "$line: parse error [$_]";
--
2.1.1
----
This mail was virus scanned and spam checked before delivery.
This mail is also DKIM signed. See header dkim-signature.
More information about the pve-devel
mailing list