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

Commit

Permalink
Merge pull request #14 from apollo-lhc/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
dgastler authored Sep 18, 2020
2 parents 9c7d84f + 95d378d commit 7d63bae
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/shelf_scan.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,16 @@ int main(int argc, char ** argv){
std::vector<FRUReader*> FRUs;

// check every ipmb address
const size_t dotCountMax = 64;
const size_t dotCountMax = 80;
printf("This may take a minute due to IPMB timeouts.\n");
printf("Searching...\n[");
for(size_t iDot = 0;iDot < dotCountMax;iDot++){
for(size_t iDot = 0;iDot < 256/(256/dotCountMax);iDot++){
printf("=");
}
printf("]\n[.");
size_t deltaDot = 256/dotCountMax;
size_t nextDot = deltaDot;
for( uint16_t deviceAddr = 0x02; deviceAddr <= 0xFF;deviceAddr++){
for( uint16_t deviceAddr = 0x02; deviceAddr <= 0xFF;){
try{
if(deviceAddr > nextDot){
printf(".");
Expand Down Expand Up @@ -153,8 +154,8 @@ int main(int argc, char ** argv){
ipmi_ctx_close(ipmiContext_);

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

0 comments on commit 7d63bae

Please sign in to comment.