From 38e1f1d9ac39cbecf8a6cadf2bd96f85336d2302 Mon Sep 17 00:00:00 2001 From: ligc Date: Thu, 16 Jun 2011 00:38:49 +0000 Subject: [PATCH] fix for bug 3308305: check the unnecessary arguments git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9809 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/imgcapture.pm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/imgcapture.pm b/xCAT-server/lib/xcat/plugins/imgcapture.pm index 93e4d0e33..1290d91f6 100644 --- a/xCAT-server/lib/xcat/plugins/imgcapture.pm +++ b/xCAT-server/lib/xcat/plugins/imgcapture.pm @@ -64,6 +64,13 @@ sub process_request { "verbose|V" => \$verbose ); + if ( defined( $ARGV[0] )) { + my $rsp = {}; + $rsp->{data}->[0] = "Invalid Argument: $ARGV[0]"; + $rsp->{data}->[1] = $usage; + xCAT::MsgUtils->message("D", $rsp, $callback); + return 0; + } if($version) { my $version = xCAT::Utils->Version(); my $rsp = {};