From f2f0ffd6a8e8bfdbcb55ec6abbb7d0c9e53fdf5d Mon Sep 17 00:00:00 2001 From: sakolish Date: Wed, 5 Mar 2008 18:39:02 +0000 Subject: [PATCH] More error handling git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@686 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT-2.0/xCAT/PPCmac.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/perl-xCAT-2.0/xCAT/PPCmac.pm b/perl-xCAT-2.0/xCAT/PPCmac.pm index 689ea7a33..3595e6087 100644 --- a/perl-xCAT-2.0/xCAT/PPCmac.pm +++ b/perl-xCAT-2.0/xCAT/PPCmac.pm @@ -261,7 +261,7 @@ sub getmacs { # Invalid target hardware ######################################### if ( $type ne "lpar" ) { - return( [[$name,"Node must be LPAR"]] ); + return( [[$name,"Node must be LPAR",1]] ); } ######################################### # IVM does not have lpar_netboot command @@ -285,16 +285,16 @@ sub getmacs { # Form string from array results ################################## if ( exists($request->{verbose}) ) { - return( [[$name,join( '', @$result )]] ); + return( [[$name,join( '', @$result ),$Rc]] ); } ################################## # Return error ################################## if ( $Rc != SUCCESS ) { if ( @$result[0] =~ /lpar_netboot: (.*)/ ) { - return( [[$name,$1]] ); + return( [[$name,$1,$Rc]] ); } - return( [[$name,join( '', @$result )]] ); + return( [[$name,join( '', @$result ),$Rc]] ); } ################################## # Split results into array @@ -325,7 +325,7 @@ sub getmacs { $values.= "$_\n"; } } - return( [[$name,$values]] ); + return( [[$name,$values,$Rc]] ); }