ipmitool / test

0 stars 0 forks source link

lib/ipmi_gendev.c - returns 0 on error #12

Open AlexanderAmelkin opened 12 years ago

AlexanderAmelkin commented 12 years ago

Reported by: Duncan Idaho Original Ticket: ipmitool/bugs/119

It seems functions in 'lib/ipmi_gendev.c' do return 0 even on error. Some example follows:

ipmi\_gendev\_read\_file\(...\) \{
int rc = 0;
\[...\]
if\(counter == \(eeprom\_info.size\)\)
\{
printf\("\r%%100 percent completed\n"\);
\}
else
\{
printf\("\rError: %i percent completed, read not completed \n", percentCompleted\);
\}

fclose\(fp\);
\}
\}
else
\{
lprintf\(LOG\_ERR, "The selected generic device is not an eeprom"\);
\}

return rc;
\}

Check 'lib/ipmi_gendev.c' for similar cases. There is more than just one.

AlexanderAmelkin commented 11 years ago

Original comment by: Zdenek Styblik

AlexanderAmelkin commented 11 years ago

Original comment by: Zdenek Styblik