From 180ac3aea20f3fc2de6396a65310d4be1a519893 Mon Sep 17 00:00:00 2001 From: nott Date: Fri, 7 Mar 2008 21:01:32 +0000 Subject: [PATCH] Fixed GetOpt option and error return. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@730 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server-2.0/lib/xcat/plugins/DBobjectdefs.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/xCAT-server-2.0/lib/xcat/plugins/DBobjectdefs.pm b/xCAT-server-2.0/lib/xcat/plugins/DBobjectdefs.pm index 76d930716..19d3561ae 100644 --- a/xCAT-server-2.0/lib/xcat/plugins/DBobjectdefs.pm +++ b/xCAT-server-2.0/lib/xcat/plugins/DBobjectdefs.pm @@ -18,7 +18,6 @@ use xCAT::MsgUtils; # options can be bundled up like -vV Getopt::Long::Configure("bundling"); -Getopt::Long::Configure("pass_through"); $Getopt::Long::ignorecase = 0; # @@ -161,7 +160,9 @@ sub process_request $rsp->{data}->[0] = $msg; $::callback->($rsp); } - return $ret; + if ($ret > 0) { + $rsp->{errorcode}->[0] = $ret; + } } #---------------------------------------------------------------------------- @@ -200,6 +201,7 @@ sub processArgs } # parse the options - include any option from all 4 cmds + Getopt::Long::Configure("no_pass_through"); if ( !GetOptions( 'all|a' => \$::opt_a,