From 065d31a2d2f77bb516b14260a77ef39c7cf1880f Mon Sep 17 00:00:00 2001 From: nott Date: Mon, 21 Jan 2008 20:35:16 +0000 Subject: [PATCH] Fix format of lsdef -h output. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@307 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server-2.0/lib/xcat/plugins/DBobjectdefs.pm | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/xCAT-server-2.0/lib/xcat/plugins/DBobjectdefs.pm b/xCAT-server-2.0/lib/xcat/plugins/DBobjectdefs.pm index 4b7167b36..4535e050a 100644 --- a/xCAT-server-2.0/lib/xcat/plugins/DBobjectdefs.pm +++ b/xCAT-server-2.0/lib/xcat/plugins/DBobjectdefs.pm @@ -431,6 +431,7 @@ sub processArgs $rsp->{data}->[1] = "Attribute Description\n"; my @alreadydone; # the same attr may appear more then once + my $outstr = ""; foreach $this_attr (sort @{$datatype->{'attrs'}}) { my $attr = $this_attr->{attr_name}; @@ -438,20 +439,14 @@ sub processArgs # if (($attr ne $objkey) && !grep(/^$attr$/, @alreadydone)) if (!grep(/^$attr$/, @alreadydone)) - { - push(@attrlist, "$attr\t\t- $desc\n"); + { + $outstr .= "$attr\n\t\t- $desc\n\n"; } push(@alreadydone, $attr); - - } - my $n = 2; - foreach my $l (sort @attrlist) - { - $rsp->{data}->[$n] = "$l"; - $n++; } + + $rsp->{data}->[2] = $outstr; xCAT::MsgUtils->message("I", $rsp, $::callback); - } return 1;