From 63403c03d906681a4e573e44063b984f022df588 Mon Sep 17 00:00:00 2001 From: sakolish Date: Wed, 30 Apr 2008 13:47:45 +0000 Subject: [PATCH] Fixed output formatting of "IP-addresses" - Line #639 git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1230 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server-2.0/lib/xcat/plugins/lsslp.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/xCAT-server-2.0/lib/xcat/plugins/lsslp.pm b/xCAT-server-2.0/lib/xcat/plugins/lsslp.pm index 273f3fe3c..edef48725 100644 --- a/xCAT-server-2.0/lib/xcat/plugins/lsslp.pm +++ b/xCAT-server-2.0/lib/xcat/plugins/lsslp.pm @@ -34,6 +34,9 @@ use constant { TYPE_HMC => "HMC", TYPE_IVM => "IVM", TYPE_FSP => "IVM", + IP_ADDRESSES => 3, + TEXT => 0, + FORMAT => 1 }; ####################################### @@ -633,7 +636,7 @@ sub format_output { my $request = shift; my $values = shift; - my $length = 0; + my $length = length( $header[IP_ADDRESSES][TEXT] ); my $result; ########################################### @@ -683,7 +686,7 @@ sub format_output { # Get longest IP for formatting purposes ########################################### my $format = sprintf "%%-%ds", ( $length + 2 ); - $header[3][1] = $format; + $header[IP_ADDRESSES][FORMAT] = $format; ########################################### # Display header