From 3cc2eb0f9e57e7af61aabaa6b316d301998f8b16 Mon Sep 17 00:00:00 2001 From: sakolish Date: Wed, 5 Mar 2008 18:38:29 +0000 Subject: [PATCH] More error handling git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@685 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT-2.0/xCAT/PPCboot.pm | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/perl-xCAT-2.0/xCAT/PPCboot.pm b/perl-xCAT-2.0/xCAT/PPCboot.pm index 7f85f878d..606b23564 100644 --- a/perl-xCAT-2.0/xCAT/PPCboot.pm +++ b/perl-xCAT-2.0/xCAT/PPCboot.pm @@ -251,7 +251,7 @@ sub rnetboot { # Invalid target hardware ##################################### if ( $type !~ /^lpar$/ ) { - return( [[$name,"Not supported"]] ); + return( [[$name,"Not supported",1]] ); } ######################################### # IVM does not have lpar_netboot command @@ -274,7 +274,7 @@ sub rnetboot { # Form string from array results ################################## if ( exists($request->{verbose}) ) { - return( [[$name,join( '', @$result )]] ); + return( [[$name,join( '', @$result ),$Rc]] ); } ################################## # Return error @@ -292,9 +292,9 @@ sub rnetboot { ################################## 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 array into string @@ -317,7 +317,7 @@ sub rnetboot { # ##################################### if ( $data =~ /Finished/) { - return( [[$name,"Success"]] ); + return( [[$name,"Success",$Rc]] ); } ################################## # Can still be error w/ Rc=0: @@ -332,12 +332,13 @@ sub rnetboot { # ##################################### if ( $data =~ /lpar_netboot: (.*)/ ) { - return( [[$name,$1]] ); + return( [[$name,$1,1]] ); } - return( [[$name,$data]] ); + return( [[$name,$data,1]] ); } 1; +