From 4d41d0a5f4f760547d6251c15bc4442dc1d292c4 Mon Sep 17 00:00:00 2001 From: wanghuaz Date: Thu, 6 Aug 2009 06:48:11 +0000 Subject: [PATCH] fixed defect: 2831058. rpower return 0 if error occurs git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3954 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/Common.pm | 2 +- xCAT-server/lib/xcat/plugins/blade.pm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/perl-xCAT/xCAT/Common.pm b/perl-xCAT/xCAT/Common.pm index 3844243fd..ec14c8d1e 100644 --- a/perl-xCAT/xCAT/Common.pm +++ b/perl-xCAT/xCAT/Common.pm @@ -124,7 +124,7 @@ sub usage_noderange { if (!$noderange) { $usage_string="Missing Noderange\n"; $usage_string .=xCAT::Usage->getUsage($command); - $callback->({data=>$usage_string}); + $callback->({error=>[$usage_string],errorcode=>[1]}); $request = {}; return; } diff --git a/xCAT-server/lib/xcat/plugins/blade.pm b/xCAT-server/lib/xcat/plugins/blade.pm index 28dfe6507..0335d2780 100644 --- a/xCAT-server/lib/xcat/plugins/blade.pm +++ b/xCAT-server/lib/xcat/plugins/blade.pm @@ -1950,7 +1950,7 @@ sub preprocess_request { if (!$noderange) { $usage_string="Missing Noderange\n"; $usage_string .=xCAT::Usage->getUsage($command); - $callback->({data=>$usage_string}); + $callback->({error=>[$usage_string],errorcode=>[1]}); $request = {}; return; }