Skip to content
This repository was archived by the owner on Oct 16, 2023. It is now read-only.

Commit 7d63bae

Browse files
authored
Merge pull request #14 from apollo-lhc/develop
Develop
2 parents 9c7d84f + 95d378d commit 7d63bae

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/shelf_scan.cxx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,15 +88,16 @@ int main(int argc, char ** argv){
8888
std::vector<FRUReader*> FRUs;
8989

9090
// check every ipmb address
91-
const size_t dotCountMax = 64;
91+
const size_t dotCountMax = 80;
92+
printf("This may take a minute due to IPMB timeouts.\n");
9293
printf("Searching...\n[");
93-
for(size_t iDot = 0;iDot < dotCountMax;iDot++){
94+
for(size_t iDot = 0;iDot < 256/(256/dotCountMax);iDot++){
9495
printf("=");
9596
}
9697
printf("]\n[.");
9798
size_t deltaDot = 256/dotCountMax;
9899
size_t nextDot = deltaDot;
99-
for( uint16_t deviceAddr = 0x02; deviceAddr <= 0xFF;deviceAddr++){
100+
for( uint16_t deviceAddr = 0x02; deviceAddr <= 0xFF;){
100101
try{
101102
if(deviceAddr > nextDot){
102103
printf(".");
@@ -153,8 +154,8 @@ int main(int argc, char ** argv){
153154
ipmi_ctx_close(ipmiContext_);
154155

155156
printf("Shelf contents\n");
156-
printf("IPMB(FRU) | %*s | %*s |\n",60,"Product Name",10,"SN");
157-
printf("=======================================================================================\n");
157+
printf("IPMB(FRU) | %*s | %*s \n",60,"Product Name",10,"SN");
158+
printf("======================================================================================\n");
158159
for(size_t iFRU = 0; iFRU < FRUs.size();iFRU++){
159160
FRUs[iFRU]->PrintFRUInfo(false);
160161
}

0 commit comments

Comments
 (0)