Zdenek Styblik
-
2013-05-29
- milestone: --> version-1.8.12
There are couple things in 'lib/ipmi_ekanalyzer.c' that would use re-work. I've noticed only print-outs.
Why???
static void ipmi\_ekanalyzer\_usage\( void \) \{ char \* help\_message = "Ekeying analyzer tool version 1.00 \n\ ekanalyzer Commands: \n\ print \[carrier | power | all\] <oc=filename1> <b1=filename2>... \n\ frushow <b2=filename> \n\ summary \[match | unmatch | all\] <oc=filename1> <b1=filename2>... \n\ "; printf\("%s",help\_message\); fflush\(stdout\); \}
Typo _argumentS_ + Repetitive -> create function:
printf\("Too few argument\! \n"\); if \( strcmp\(argv\[argument\_offset\], "print"\) == 0 \)\{ lprintf\(LOG\_ERR, " ekanalyzer print \[carrier/power/all\]" " <xx=frufile> <xx=frufile> \[xx=frufile\]" \); \} else\{ lprintf\(LOG\_ERR, " ekanalyzer summary \[match/ unmatch/ all\]" " <xx=frufile> <xx=frufile> \[xx=frufile\]" \); \}
Should be at STDERR:
printf\("Too few argument\! \n"\); \[...\] printf\("Invalid option '%s'\n", argv\[argument\_offset\]\); \[...\] if \( \!found\_flag \)\{ printf\("No carrier file has been found\n"\); return\_value = ERROR\_STATUS; \} \[...\] if \( amc\_file == FALSE \)\{ printf\("\nNo AMC FRU file is provided --->" \ " No possible ekeying match\!\n"\); return\_value = ERROR\_STATUS; \} \[...\] if \( \!oc\_file \)\{ printf\("\nNo Carrier FRU file is provided" \ " ---> No possible ekeying match\!\n"\); return\_value = ERROR\_STATUS; \} \[...\] else\{ printf\("No amc record is found\!\n"\); \} \[...\] if \( record == NULL \)\{ printf\("NO Carrier p2p connectivity \!\n"\); return\_status = ERROR\_STATUS; \}
Perhaps there is more. There is some debug information passed straight to STDOUT; I think it should go to STDERR.