From 8730fef4343cb9a5ac16b4ca7ff9846b658ffe0a Mon Sep 17 00:00:00 2001 From: daniceexi Date: Mon, 21 Feb 2011 10:25:54 +0000 Subject: [PATCH] defect 2975073: fix the issue that reventlog could not display the entries as cli expected. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@8899 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/ipmi.pm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/ipmi.pm b/xCAT-server/lib/xcat/plugins/ipmi.pm index fd31b47ff..aa97f4756 100644 --- a/xCAT-server/lib/xcat/plugins/ipmi.pm +++ b/xCAT-server/lib/xcat/plugins/ipmi.pm @@ -2841,6 +2841,7 @@ sub eventlog { } elsif($subcommand =~ /^\d+$/) { $sessdata->{numevents} = $subcommand; + $sessdata->{displayedevents} = 0; } else { return(1,"unsupported command eventlog $subcommand"); @@ -3072,19 +3073,23 @@ sub got_sel { if ($sessdata->{auxloginfo} and $sessdata->{auxloginfo}->{$entry}) { $text.=" with additional data:"; - if ($sessdata->{fullsel}) { + if ($sessdata->{fullsel} || ( $sessdata->{numevents} + && $sessdata->{numevents} > $sessdata->{displayedevents})) { xCAT::SvrUtils::sendmsg($text,$callback,$sessdata->{node},%allerrornodes); foreach (split /\n/,$sessdata->{auxloginfo}->{$entry}) { xCAT::SvrUtils::sendmsg($_,$sessdata->{node}); } + $sessdata->{displayedevents}++; } else { push(@{$sessdata->{selentries}},$text); push @{$sessdata->{selentries}},split /\n/,$sessdata->{auxloginfo}->{$entry}; } } else { - if ($sessdata->{fullsel}) { + if ($sessdata->{fullsel} || ($sessdata->{numevents} + && $sessdata->{numevents} > $sessdata->{displayedevents})) { xCAT::SvrUtils::sendmsg($text,$callback,$sessdata->{node},%allerrornodes); + $sessdata->{displayedevents}++; } else { push(@{$sessdata->{selentries}},$text); }