From 2afe1514f00f5c05102a39df9e9ba58cba2f3d53 Mon Sep 17 00:00:00 2001 From: sakolish Date: Tue, 17 Jun 2008 13:38:54 +0000 Subject: [PATCH] Display usage in preprocess_request() correctly git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1670 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/PPC.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/perl-xCAT/xCAT/PPC.pm b/perl-xCAT/xCAT/PPC.pm index b7f586407..62347bc8d 100644 --- a/perl-xCAT/xCAT/PPC.pm +++ b/perl-xCAT/xCAT/PPC.pm @@ -869,13 +869,13 @@ sub preprocess_request { my $usage_string=xCAT::Usage->parseCommand($command, @exargs); if ($usage_string) { - $callback->({data=>$usage_string}); + $callback->({data=>[$usage_string]}); $req = {}; return; } if (!$noderange) { $usage_string=xCAT::Usage->getUsage($command); - $callback->({data=>$usage_string}); + $callback->({data=>[$usage_string]}); $req = {}; return; } @@ -887,7 +887,7 @@ sub preprocess_request { my $hcptab_name = ($package eq "fsp") ? "ppcdirect" : "ppchcp"; my $hcptab = xCAT::Table->new( $hcptab_name ); unless ($hcptab ) { - $callback->({data=>"Cannot open $hcptab_name table"}); + $callback->({data=>["Cannot open $hcptab_name table"]}); $req = {}; return; } @@ -907,7 +907,7 @@ sub preprocess_request { if (@missednodes > 0) { my $ppctab = xCAT::Table->new("ppc"); unless ($ppctab) { - $callback->({data=>"Cannot open ppc table"}); + $callback->({data=>["Cannot open ppc table"]}); $req = {}; return; } @@ -915,7 +915,7 @@ sub preprocess_request { my $ent=$ppctab->getNodeAttribs($node,['hcp']); if (defined($ent->{hcp})) { push @{$hcp_hash{$ent->{hcp}}{nodes}}, $node;} else { - $callback->({data=>"The node $node is neither a hcp nor an lapr"}); + $callback->({data=>["The node $node is neither a hcp nor an lpar"]}); $req = {}; return; }