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
This commit is contained in:
nott 2008-01-21 20:35:16 +00:00
parent b8b4e74f04
commit 065d31a2d2

View File

@ -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;