Hi,

attached is my take on mending of ipmi_fru_main(). Main objectives were:
* printf() -> lprintf() where appropriate
* return codes
* clean up ipmi_fru_main() a bit

Now, if somebody has ideas what else could be done with
ipmi_main_fru(), please, let me know.
Extra attention should be paid to if() - some of them had to be inverted.

I'm just wondering what's the point of the following piece of code:
~~~
                if ((argc >= 3) && (strlen(argv[1]) > 0)) {
                        if (!strncmp(argv[2], "oem", 3)) {
                                rc = ipmi_fru_get_multirec(intf, fru_id, argc, 
argv);
                        }
                } else {
                        rc = ipmi_fru_get_multirec(intf, fru_id, argc, argv);
                }
~~~
and what ``if (!strncmp(argv[2], "oem", 3)) {'' isn't met?

Thanks,
Z.

Attachment: ipmi_fru.c-main_rework.diff
Description: Binary data

------------------------------------------------------------------------------
LogMeIn Central: Instant, anywhere, Remote PC access and management.
Stay in control, update software, and manage PCs from one command center
Diagnose problems and improve visibility into emerging IT issues
Automate, monitor and manage. Do more in less time with Central
http://p.sf.net/sfu/logmein12331_d2d
_______________________________________________
Ipmitool-devel mailing list
Ipmitool-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ipmitool-devel

Reply via email to