diff options
Diffstat (limited to 'lib/ipmi_delloem.c')
-rw-r--r-- | lib/ipmi_delloem.c | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/lib/ipmi_delloem.c b/lib/ipmi_delloem.c index 308c513..2214c99 100644 --- a/lib/ipmi_delloem.c +++ b/lib/ipmi_delloem.c @@ -273,22 +273,22 @@ ipmi_delloem_main(struct ipmi_intf * intf, int argc, char ** argv) return 0; } if (0 ==strncmp(argv[current_arg], "lcd\0", 4)) { - ipmi_delloem_lcd_main(intf,argc,argv); + rc = ipmi_delloem_lcd_main(intf,argc,argv); } else if (strncmp(argv[current_arg], "mac\0", 4) == 0) { /* mac address*/ - ipmi_delloem_mac_main(intf,argc,argv); + rc = ipmi_delloem_mac_main(intf,argc,argv); } else if (strncmp(argv[current_arg], "lan\0", 4) == 0) { /* lan address*/ - ipmi_delloem_lan_main(intf,argc,argv); + rc = ipmi_delloem_lan_main(intf,argc,argv); } else if (strncmp(argv[current_arg], "setled\0", 7) == 0) { /* SetLED support */ - ipmi_delloem_setled_main(intf,argc,argv); + rc = ipmi_delloem_setled_main(intf,argc,argv); } else if (strncmp(argv[current_arg], "powermonitor\0", 13) == 0) { /*Powermanagement report processing*/ - ipmi_delloem_powermonitor_main(intf,argc,argv); + rc = ipmi_delloem_powermonitor_main(intf,argc,argv); } else if (strncmp(argv[current_arg], "vFlash\0", 7) == 0) { /* vFlash Support */ - ipmi_delloem_vFlash_main(intf,argc,argv); + rc = ipmi_delloem_vFlash_main(intf,argc,argv); } else { usage(); return -1; @@ -453,6 +453,8 @@ ipmi_delloem_lcd_main(struct ipmi_intf * intf, int argc, char ** argv) } else if (strncmp(argv[current_arg], "help\0", 5) == 0) { ipmi_lcd_usage(); } else { + lprintf(LOG_ERR, "Invalid DellOEM command: %s", + argv[current_arg]); ipmi_lcd_usage(); } } else if ((strncmp(argv[current_arg], "lcdqualifier\0", 13) == 0) @@ -477,6 +479,8 @@ ipmi_delloem_lcd_main(struct ipmi_intf * intf, int argc, char ** argv) } else if (strncmp(argv[current_arg], "help\0", 5) == 0) { ipmi_lcd_usage(); } else { + lprintf(LOG_ERR, "Invalid DellOEM command: %s", + argv[current_arg]); ipmi_lcd_usage(); } } else if ((strncmp(argv[current_arg], "errordisplay\0", 13) == 0) @@ -499,6 +503,8 @@ ipmi_delloem_lcd_main(struct ipmi_intf * intf, int argc, char ** argv) } else if (strncmp(argv[current_arg], "help\0", 5) == 0) { ipmi_lcd_usage(); } else { + lprintf(LOG_ERR, "Invalid DellOEM command: %s", + argv[current_arg]); ipmi_lcd_usage(); } } else if ((strncmp(argv[current_arg], "none\0", 5) == 0) @@ -529,6 +535,8 @@ ipmi_delloem_lcd_main(struct ipmi_intf * intf, int argc, char ** argv) } else if (strncmp(argv[current_arg], "help\0", 5) == 0) { ipmi_lcd_usage(); } else { + lprintf(LOG_ERR, "Invalid DellOEM command: %s", + argv[current_arg]); ipmi_lcd_usage(); } } else if (strncmp(argv[current_arg], "frontpanelaccess\0", 17) == 0) { @@ -546,16 +554,22 @@ ipmi_delloem_lcd_main(struct ipmi_intf * intf, int argc, char ** argv) } else if (strncmp(argv[current_arg], "help\0", 5) == 0) { ipmi_lcd_usage(); } else { + lprintf(LOG_ERR, "Invalid DellOEM command: %s", + argv[current_arg]); ipmi_lcd_usage(); } } else if( (strncmp(argv[current_arg], "help\0", 5) == 0) && (iDRAC_FLAG==0)) { ipmi_lcd_usage(); } else { + lprintf(LOG_ERR, "Invalid DellOEM command: %s", + argv[current_arg]); ipmi_lcd_usage(); return -1; } } else { + lprintf(LOG_ERR, "Invalid DellOEM command: %s", + argv[current_arg]); ipmi_lcd_usage(); return -1; } @@ -575,7 +589,6 @@ int ipmi_lcd_get_platform_model_name(struct ipmi_intf * intf, char* lcdstring, uint8_t max_length, uint8_t field_type) { - uint8_t data[4]; int bytes_copied = 0; int ii = 0; int lcdstring_len = 0; @@ -692,7 +705,6 @@ ipmi_idracvalidator_command(struct ipmi_intf * intf) static int ipmi_lcd_get_configure_command_wh(struct ipmi_intf * intf) { - uint8_t data[4]; int rc; rc = ipmi_mc_getsysinfo(intf, IPMI_DELL_LCD_CONFIG_SELECTOR, 0, 0, sizeof(lcd_mode), &lcd_mode); @@ -2047,7 +2059,6 @@ get_nic_selection_mode_12g(struct ipmi_intf* intf,int current_arg, struct ipmi_rs * rsp; struct ipmi_rq req; int failover = 0; - int nic_selection_mode = 0; uint8_t input_length = 0; uint8_t msg_data[30]; @@ -2210,7 +2221,6 @@ get_nic_selection_mode_12g(struct ipmi_intf* intf,int current_arg, static int get_nic_selection_mode(int current_arg, char ** argv) { - int nic_selection_mode = 0; if (argv[current_arg] != NULL && strncmp(argv[current_arg], "dedicated\0", 10) == 0) { return DEDICATED; @@ -3547,7 +3557,6 @@ ipmi_print_power_consmpt_history(struct ipmi_intf * intf, int unit) static int ipmi_get_power_cap(struct ipmi_intf * intf, IPMI_POWER_CAP * ipmipowercap) { - uint64_t tempbtuphrconv; uint8_t *rdata; int rc; rc = ipmi_mc_getsysinfo(intf, IPMI_DELL_POWER_CAP, 0, 0, |