From 41c00b59e2aa8f75589876a69a8ac8d141557587 Mon Sep 17 00:00:00 2001 From: phamt Date: Mon, 1 Apr 2013 01:46:31 +0000 Subject: [PATCH] Fixed bug where argument size check was not correct. Added default mode for chvm --add9336 option. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.8@15750 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/zvm.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/zvm.pm b/xCAT-server/lib/xcat/plugins/zvm.pm index 0ff6fd23d..300fe0102 100644 --- a/xCAT-server/lib/xcat/plugins/zvm.pm +++ b/xCAT-server/lib/xcat/plugins/zvm.pm @@ -852,13 +852,17 @@ sub changeVM { my $pool = $args->[1]; my $addr = $args->[2]; my $blks = $args->[3]; - my $mode = $args->[4]; # If the user specifies auto as the device address, then find a free device address if ($addr eq "auto") { $addr = xCAT::zvmUtils->getFreeAddress($::SUDOER, $node, "smapi"); } + my $mode = "MR"; + if ($args->[4]) { + $mode = $args->[4]; + } + my $readPw = "''"; if ($args->[5]) { $readPw = $args->[5]; @@ -1031,7 +1035,7 @@ sub changeVM { my $wwpn; my $lun; my $useWwpnLun = 0; - if ($argsSize == 7) { + if ($argsSize == 8) { $useWwpnLun = 1; $wwpn = $args->[6]; $lun = $args->[7];