diff --git a/include/ipmitool/ipmi_picmg.h b/include/ipmitool/ipmi_picmg.h index 180a30b..3f08b42 100644 --- a/include/ipmitool/ipmi_picmg.h +++ b/include/ipmitool/ipmi_picmg.h @@ -93,7 +93,7 @@ typedef enum picmg_busres_resource_id { } t_picmg_busres_resource_id; /* the LED color capabilities */ -static const char* __UNUSED__(led_color_str[]) = { +static const char *__UNUSED__(led_color_str[]) = { "reserved", "BLUE", "RED", diff --git a/include/ipmitool/ipmi_sol.h b/include/ipmitool/ipmi_sol.h index 6e2fd24..1d3f8e1 100644 --- a/include/ipmitool/ipmi_sol.h +++ b/include/ipmitool/ipmi_sol.h @@ -92,17 +92,16 @@ struct activate_payload_rsp { * function will return -1 if value is not valid, or * will return 0 if valid. */ -int ipmi_sol_set_param_isvalid_uint8_t( const char *strval, - const char *name, - int base, - uint8_t minval, - uint8_t maxval, - uint8_t *out_value); +int ipmi_sol_set_param_isvalid_uint8_t(const char *strval, + const char *name, + uint8_t minval, + uint8_t maxval, + uint8_t *out_value); int ipmi_sol_main(struct ipmi_intf *, int, char **); -int ipmi_get_sol_info(struct ipmi_intf * intf, - uint8_t channel, - struct sol_config_parameters * params); +int ipmi_get_sol_info(struct ipmi_intf *intf, + uint8_t channel, + struct sol_config_parameters *params); #endif /* IPMI_SOL_H */ diff --git a/lib/ipmi_delloem.c b/lib/ipmi_delloem.c index c1f3ef6..59c237f 100644 --- a/lib/ipmi_delloem.c +++ b/lib/ipmi_delloem.c @@ -171,12 +171,10 @@ static int ipmi_lcd_get_status(struct ipmi_intf *intf); static int ipmi_lcd_set_kvm(struct ipmi_intf *intf, char status); static int ipmi_lcd_set_lock(struct ipmi_intf *intf, char lock); static int ipmi_lcd_set_single_line_text(struct ipmi_intf *intf, char *text); -static int ipmi_lcd_set_text(struct ipmi_intf *intf, char *text, - int line_number); +static int ipmi_lcd_set_text(struct ipmi_intf *intf, char *text); static int ipmi_lcd_configure_wh(struct ipmi_intf *intf, uint32_t mode, - uint16_t lcdquallifier, uint8_t errordisp, int8_t line_number, char *text); -static int ipmi_lcd_configure(struct ipmi_intf *intf, int command, - int8_t line_number, char *text); + uint16_t lcdquallifier, uint8_t errordisp, char *text); +static int ipmi_lcd_configure(struct ipmi_intf *intf, int command, char *text); static void ipmi_lcd_usage(void); /* MAC Function prototypes */ static int ipmi_delloem_mac_main(struct ipmi_intf *intf, int argc, char **argv); @@ -417,10 +415,10 @@ ipmi_delloem_lcd_main(struct ipmi_intf * intf, int argc, char ** argv) } if (strncmp(argv[current_arg], "none\0", 5) == 0) { rc = ipmi_lcd_configure_wh(intf, IPMI_DELL_LCD_CONFIG_NONE, 0xFF, - 0XFF, 0, NULL); + 0XFF, NULL); } else if (strncmp(argv[current_arg], "modelname\0", 10) == 0) { rc = ipmi_lcd_configure_wh(intf, IPMI_DELL_LCD_CONFIG_DEFAULT, 0xFF, - 0XFF, 0, NULL); + 0XFF, NULL); } else if (strncmp(argv[current_arg], "userdefined\0", 12) == 0) { current_arg++; if (argc <= current_arg) { @@ -428,31 +426,31 @@ ipmi_delloem_lcd_main(struct ipmi_intf * intf, int argc, char ** argv) return -1; } rc = ipmi_lcd_configure_wh(intf, IPMI_DELL_LCD_CONFIG_USER_DEFINED, - 0xFF, 0XFF, line_number, argv[current_arg]); + 0xFF, 0XFF, argv[current_arg]); } else if (strncmp(argv[current_arg], "ipv4address\0", 12) == 0) { rc = ipmi_lcd_configure_wh(intf, IPMI_DELL_LCD_iDRAC_IPV4ADRESS, - 0xFF, 0XFF, 0, NULL); + 0xFF, 0XFF, NULL); } else if (strncmp(argv[current_arg], "macaddress\0", 11) == 0) { rc = ipmi_lcd_configure_wh(intf, IPMI_DELL_LCD_IDRAC_MAC_ADDRESS, - 0xFF, 0XFF, 0, NULL); + 0xFF, 0XFF, NULL); } else if (strncmp(argv[current_arg], "systemname\0", 11) == 0) { rc = ipmi_lcd_configure_wh(intf, IPMI_DELL_LCD_OS_SYSTEM_NAME, 0xFF, - 0XFF, 0, NULL); + 0XFF, NULL); } else if (strncmp(argv[current_arg], "servicetag\0", 11) == 0) { rc = ipmi_lcd_configure_wh(intf, IPMI_DELL_LCD_SERVICE_TAG, 0xFF, - 0XFF, 0, NULL); + 0XFF, NULL); } else if (strncmp(argv[current_arg], "ipv6address\0", 12) == 0) { rc = ipmi_lcd_configure_wh(intf, IPMI_DELL_LCD_iDRAC_IPV6ADRESS, - 0xFF, 0XFF, 0, NULL); + 0xFF, 0XFF, NULL); } else if (strncmp(argv[current_arg], "ambienttemp\0", 12) == 0) { rc = ipmi_lcd_configure_wh(intf, IPMI_DELL_LCD_AMBEINT_TEMP, 0xFF, - 0XFF, 0, NULL); + 0XFF, NULL); } else if (strncmp(argv[current_arg], "systemwatt\0", 11) == 0) { rc = ipmi_lcd_configure_wh(intf, IPMI_DELL_LCD_SYSTEM_WATTS, 0xFF, - 0XFF, 0, NULL); + 0XFF, NULL); } else if (strncmp(argv[current_arg], "assettag\0", 9) == 0) { rc = ipmi_lcd_configure_wh(intf, IPMI_DELL_LCD_ASSET_TAG, 0xFF, - 0XFF, 0, NULL); + 0XFF, NULL); } else if (strncmp(argv[current_arg], "help\0", 5) == 0) { ipmi_lcd_usage(); } else { @@ -472,13 +470,13 @@ ipmi_delloem_lcd_main(struct ipmi_intf * intf, int argc, char ** argv) return -1; } if (strncmp(argv[current_arg], "watt\0", 5) == 0) { - rc = ipmi_lcd_configure_wh(intf, 0xFF, 0x00, 0XFF, 0, NULL); + rc = ipmi_lcd_configure_wh(intf, 0xFF, 0x00, 0XFF, NULL); } else if (strncmp(argv[current_arg], "btuphr\0",7) == 0) { - rc = ipmi_lcd_configure_wh(intf, 0xFF, 0x01, 0XFF, 0, NULL); + rc = ipmi_lcd_configure_wh(intf, 0xFF, 0x01, 0XFF, NULL); } else if (strncmp(argv[current_arg], "celsius\0", 8) == 0) { - rc = ipmi_lcd_configure_wh(intf, 0xFF, 0x02, 0xFF, 0, NULL); + rc = ipmi_lcd_configure_wh(intf, 0xFF, 0x02, 0xFF, NULL); } else if (strncmp(argv[current_arg], "fahrenheit", 11) == 0) { - rc = ipmi_lcd_configure_wh(intf, 0xFF, 0x03, 0xFF, 0, NULL); + rc = ipmi_lcd_configure_wh(intf, 0xFF, 0x03, 0xFF, NULL); } else if (strncmp(argv[current_arg], "help\0", 5) == 0) { ipmi_lcd_usage(); } else { @@ -499,10 +497,10 @@ ipmi_delloem_lcd_main(struct ipmi_intf * intf, int argc, char ** argv) } if (strncmp(argv[current_arg], "sel\0", 4) == 0) { rc = ipmi_lcd_configure_wh(intf, 0xFF, 0xFF, - IPMI_DELL_LCD_ERROR_DISP_SEL, 0, NULL); + IPMI_DELL_LCD_ERROR_DISP_SEL, NULL); } else if (strncmp(argv[current_arg], "simple\0", 7) == 0) { rc = ipmi_lcd_configure_wh(intf, 0xFF, 0xFF, - IPMI_DELL_LCD_ERROR_DISP_VERBOSE, 0, NULL); + IPMI_DELL_LCD_ERROR_DISP_VERBOSE, NULL); } else if (strncmp(argv[current_arg], "help\0", 5) == 0) { ipmi_lcd_usage(); } else { @@ -512,10 +510,10 @@ ipmi_delloem_lcd_main(struct ipmi_intf * intf, int argc, char ** argv) } } else if ((strncmp(argv[current_arg], "none\0", 5) == 0) && (iDRAC_FLAG==0)) { - rc = ipmi_lcd_configure(intf, IPMI_DELL_LCD_CONFIG_NONE, 0, NULL); + rc = ipmi_lcd_configure(intf, IPMI_DELL_LCD_CONFIG_NONE, NULL); } else if ((strncmp(argv[current_arg], "default\0", 8) == 0) && (iDRAC_FLAG==0)) { - rc = ipmi_lcd_configure(intf, IPMI_DELL_LCD_CONFIG_DEFAULT, 0, NULL); + rc = ipmi_lcd_configure(intf, IPMI_DELL_LCD_CONFIG_DEFAULT, NULL); } else if ((strncmp(argv[current_arg], "custom\0", 7) == 0) && (iDRAC_FLAG==0)) { current_arg++; @@ -524,7 +522,7 @@ ipmi_delloem_lcd_main(struct ipmi_intf * intf, int argc, char ** argv) return -1; } rc = ipmi_lcd_configure(intf, IPMI_DELL_LCD_CONFIG_USER_DEFINED, - line_number, argv[current_arg]); + argv[current_arg]); } else if (strncmp(argv[current_arg], "vkvm\0", 5) == 0) { current_arg++; if (argc <= current_arg) { @@ -1332,13 +1330,12 @@ ipmi_lcd_set_single_line_text(struct ipmi_intf * intf, char * text) * Description: This function sets lcd line text * Input: intf - ipmi interface * text - lcd string - * line_number- line number * Output: * Return: -1 on error * 0 if successful */ static int -ipmi_lcd_set_text(struct ipmi_intf * intf, char * text, int line_number) +ipmi_lcd_set_text(struct ipmi_intf * intf, char * text) { int rc = 0; IPMI_DELL_LCD_CAPS lcd_caps; @@ -1367,7 +1364,6 @@ ipmi_lcd_set_text(struct ipmi_intf * intf, char * text, int line_number) * Input: intf - ipmi interface * lcdquallifier- lcd quallifier * errordisp - error number - * line_number-line number * text - lcd string * Output: * Return: -1 on error @@ -1375,12 +1371,12 @@ ipmi_lcd_set_text(struct ipmi_intf * intf, char * text, int line_number) */ static int ipmi_lcd_configure_wh(struct ipmi_intf * intf, uint32_t mode, - uint16_t lcdquallifier, uint8_t errordisp, int8_t line_number, char * text) + uint16_t lcdquallifier, uint8_t errordisp, char * text) { int rc = 0; if (IPMI_DELL_LCD_CONFIG_USER_DEFINED == mode) { /* Any error was reported earlier. */ - rc = ipmi_lcd_set_text(intf, text, line_number); + rc = ipmi_lcd_set_text(intf, text); } if (rc == 0) { rc = ipmi_lcd_set_configure_command_wh(intf, mode ,lcdquallifier,errordisp); @@ -1393,19 +1389,17 @@ ipmi_lcd_configure_wh(struct ipmi_intf * intf, uint32_t mode, * Description: This function updates the current lcd configuration * Input: intf - ipmi interface * command- lcd command - * line_number-line number * text - lcd string * Output: * Return: -1 on error * 0 if successful */ static int -ipmi_lcd_configure(struct ipmi_intf * intf, int command, - int8_t line_number, char * text) +ipmi_lcd_configure(struct ipmi_intf * intf, int command, char * text) { int rc = 0; if (IPMI_DELL_LCD_CONFIG_USER_DEFINED == command) { - rc = ipmi_lcd_set_text(intf, text, line_number); + rc = ipmi_lcd_set_text(intf, text); } if (rc == 0) { rc = ipmi_lcd_set_configure_command(intf, command); @@ -1948,7 +1942,7 @@ ipmi_mac_usage(void) * * Description: This function processes the delloem lan command * Input: intf - ipmi interface - * argc - no of arguments + * argc - no of arguments (unused, left in for calling consistency) * argv - argument string array * Output: * @@ -1956,7 +1950,7 @@ ipmi_mac_usage(void) * -1 - failure */ static int -ipmi_delloem_lan_main(struct ipmi_intf * intf, int argc, char ** argv) +ipmi_delloem_lan_main(struct ipmi_intf * intf, int __UNUSED__(argc), char ** argv) { int rc = 0; int nic_selection = 0; @@ -3741,7 +3735,7 @@ ipmi_powermonitor_usage(void) * * Description: This function processes the delloem vFlash command * Input: intf - ipmi interface - * argc - no of arguments + * argc - no of arguments (unused) * argv - argument string array * Output: * @@ -3749,7 +3743,7 @@ ipmi_powermonitor_usage(void) * -1 - failure */ static int -ipmi_delloem_vFlash_main(struct ipmi_intf * intf, int argc, char ** argv) +ipmi_delloem_vFlash_main(struct ipmi_intf * intf, int __UNUSED__(argc), char ** argv) { int rc = 0; current_arg++; diff --git a/lib/ipmi_ekanalyzer.c b/lib/ipmi_ekanalyzer.c index 86c5550..ce9ff91 100644 --- a/lib/ipmi_ekanalyzer.c +++ b/lib/ipmi_ekanalyzer.c @@ -218,8 +218,7 @@ static void ipmi_ek_add_record2list( struct ipmi_ek_multi_header ** record, struct ipmi_ek_multi_header ** list_last ); static void ipmi_ek_display_record( struct ipmi_ek_multi_header * record, - struct ipmi_ek_multi_header * list_head, - struct ipmi_ek_multi_header * list_last ); + struct ipmi_ek_multi_header * list_head); static void ipmi_ek_remove_record_from_list( struct ipmi_ek_multi_header * record, @@ -236,7 +235,7 @@ static int ipmi_ekanalyzer_fru_file2structure( char * filename, *****************************************************************************/ static int ipmi_ek_matching_process( int * file_type, int index1, int index2, struct ipmi_ek_multi_header ** list_head, - struct ipmi_ek_multi_header ** list_last, char * opt, + char * opt, struct ipmi_ek_multi_header * pphysical ); static int ipmi_ek_get_resource_descriptor( int port_count, int index, @@ -456,7 +455,7 @@ ipmi_ek_get_file_type(char *argument) * ***************************************************************************/ int -ipmi_ekanalyzer_main(struct ipmi_intf *intf, int argc, char **argv) +ipmi_ekanalyzer_main(struct ipmi_intf *__UNUSED__(intf), int argc, char **argv) { int rc = ERROR_STATUS; int file_type[MAX_FILE_NUMBER]; @@ -513,7 +512,7 @@ ipmi_ekanalyzer_main(struct ipmi_intf *intf, int argc, char **argv) /* Convert from binary data into multi record structure */ rc = ipmi_ekanalyzer_fru_file2structure (filename[type_offset], &list_head, &list_record, &list_last ); - ipmi_ek_display_record(list_record, list_head, list_last); + ipmi_ek_display_record(list_record, list_head); /* Remove record of list */ while (list_head) { ipmi_ek_remove_record_from_list(list_head, @@ -1188,7 +1187,7 @@ ipmi_ekanalyzer_ekeying_match( int argc, char * opt, } return_value = ipmi_ek_matching_process( file_type, match_pair, num_file, list_head, - list_last, opt, pcarrier_p2p); + opt, pcarrier_p2p); } } } @@ -1224,8 +1223,6 @@ ipmi_ekanalyzer_ekeying_match( int argc, char * opt, * index2: position of the second record in the list of the record * ipmi_ek_multi_header ** list_head: pointer to the header of a * linked list that contain FRU multi record -* ipmi_ek_multi_header ** list_last: pointer to the tale of a -* linked list that contain FRU multi record * opt: string that contain display option such as "match", "unmatch", or * "all". * pphysical: a pointer that contain a carrier p2p connectivity record @@ -1241,7 +1238,7 @@ ipmi_ekanalyzer_ekeying_match( int argc, char * opt, ***************************************************************************/ static int ipmi_ek_matching_process( int * file_type, int index1, int index2, struct ipmi_ek_multi_header ** list_head, - struct ipmi_ek_multi_header ** list_last, char * opt, + char * opt, struct ipmi_ek_multi_header * pphysical ) { int result = ERROR_STATUS; @@ -2951,7 +2948,6 @@ ipmi_ek_display_product_info_area(FILE *input_file, long offset) * * Input: record: a pointer to current record * list_head: a pointer to header of the list -* list_last: a pointer to tale of the list * * Output: None * @@ -2962,8 +2958,7 @@ ipmi_ek_display_product_info_area(FILE *input_file, long offset) ***************************************************************************/ static void ipmi_ek_display_record(struct ipmi_ek_multi_header *record, - struct ipmi_ek_multi_header *list_head, - struct ipmi_ek_multi_header *list_last) + struct ipmi_ek_multi_header *list_head) { if (!list_head) { printf("***empty list***\n"); diff --git a/lib/ipmi_fru.c b/lib/ipmi_fru.c index 5cc5f92..1ffbb1e 100644 --- a/lib/ipmi_fru.c +++ b/lib/ipmi_fru.c @@ -1573,10 +1573,11 @@ typedef struct OemKontronInformationRecordV1{ */ -static void ipmi_fru_oemkontron_get( int argc, char ** argv,uint8_t * fru_data, - int off,int len, - struct fru_multirec_header *h, - struct fru_multirec_oem_header *oh) +static void ipmi_fru_oemkontron_get(int argc, + char ** argv, + uint8_t * fru_data, + int off, + struct fru_multirec_oem_header *oh) { static int badParams=FALSE; int start = off; @@ -3703,15 +3704,15 @@ ipmi_fru_get_multirec(struct ipmi_intf * intf, uint8_t id , if( suppliedIana == iana ) { lprintf(LOG_DEBUG, "Matching record found" ); - if( iana == IPMI_OEM_KONTRON ) { - ipmi_fru_oemkontron_get( argc,argv,fru_data, - i + sizeof(struct fru_multirec_header), - h->len, h, oh ); + if( iana == IPMI_OEM_KONTRON ) { + ipmi_fru_oemkontron_get(argc, argv, fru_data, + i + sizeof(struct fru_multirec_header), + oh); } /* FIXME: Add OEM record support here */ else{ printf(" OEM IANA (%s) Record not supported in this mode\n", - val2str( iana, ipmi_oem_info)); + val2str( iana, ipmi_oem_info)); error = 1; } } diff --git a/lib/ipmi_gendev.c b/lib/ipmi_gendev.c index 845f81a..fe648d0 100644 --- a/lib/ipmi_gendev.c +++ b/lib/ipmi_gendev.c @@ -71,7 +71,6 @@ typedef struct gendev_eeprom_info static int ipmi_gendev_get_eeprom_size( - struct ipmi_intf *intf, struct sdr_record_generic_locator *dev, t_gendev_eeprom_info *info ) @@ -191,7 +190,7 @@ ipmi_gendev_read_file( int eeprom_size; t_gendev_eeprom_info eeprom_info; - eeprom_size = ipmi_gendev_get_eeprom_size(intf, dev, &eeprom_info); + eeprom_size = ipmi_gendev_get_eeprom_size(dev, &eeprom_info); if(eeprom_size > 0) { @@ -362,7 +361,7 @@ ipmi_gendev_write_file( int eeprom_size; t_gendev_eeprom_info eeprom_info; - eeprom_size = ipmi_gendev_get_eeprom_size(intf, dev, &eeprom_info); + eeprom_size = ipmi_gendev_get_eeprom_size(dev, &eeprom_info); if(eeprom_size > 0) { diff --git a/lib/ipmi_hpmfwupg.c b/lib/ipmi_hpmfwupg.c index 8e98bdd..ac1d90f 100644 --- a/lib/ipmi_hpmfwupg.c +++ b/lib/ipmi_hpmfwupg.c @@ -113,7 +113,7 @@ int HpmFwupgActionUploadFirmware(struct HpmfwupgComponentBitMask components, int option, int *pFlagColdReset); int -HpmfwupgPreUpgradeCheck(struct ipmi_intf *intf, +HpmfwupgPreUpgradeCheck( struct HpmfwupgUpgradeCtx *pFwupgCtx, int componentMask, int option); @@ -503,10 +503,9 @@ HpmfwupgUpgrade(struct ipmi_intf *intf, char *imageFilename, int activate, lprintf(LOG_NOTICE, "\nPerforming upgrade stage:"); } if (option & VIEW_MODE) { - rc = HpmfwupgPreUpgradeCheck(intf, - &fwupgCtx,componentMask, VIEW_MODE); + rc = HpmfwupgPreUpgradeCheck(&fwupgCtx,componentMask, VIEW_MODE); } else { - rc = HpmfwupgPreUpgradeCheck(intf, &fwupgCtx, + rc = HpmfwupgPreUpgradeCheck(&fwupgCtx, componentMask, option); if (rc == HPMFWUPG_SUCCESS) { if (verbose) { @@ -830,7 +829,7 @@ HpmfwupgValidateActionRecordChecksum(struct HpmfwupgActionRecord *pActionRecord) * is same as target version. */ int -HpmfwupgPreUpgradeCheck(struct ipmi_intf *intf, +HpmfwupgPreUpgradeCheck( struct HpmfwupgUpgradeCtx *pFwupgCtx, int componentMask, int option) { diff --git a/lib/ipmi_kontronoem.c b/lib/ipmi_kontronoem.c index 8f459b3..d88484c 100644 --- a/lib/ipmi_kontronoem.c +++ b/lib/ipmi_kontronoem.c @@ -60,8 +60,7 @@ static void ipmi_kontron_help(void); static int ipmi_kontron_set_serial_number(struct ipmi_intf *intf); static int ipmi_kontron_set_mfg_date (struct ipmi_intf *intf); static void ipmi_kontron_nextboot_help(void); -static int ipmi_kontron_nextboot_set(struct ipmi_intf *intf, int argc, - char **argv); +static int ipmi_kontron_nextboot_set(struct ipmi_intf *intf, char **argv); static int ipmi_kontronoem_send_set_large_buffer(struct ipmi_intf *intf, unsigned char channel, unsigned char size); @@ -107,7 +106,7 @@ ipmi_kontronoem_main(struct ipmi_intf *intf, int argc, char **argv) ipmi_kontron_nextboot_help(); return (-1); } - rc = ipmi_kontron_nextboot_set(intf, (argc - 1), (argv + 1)); + rc = ipmi_kontron_nextboot_set(intf, (argv + 1)); if (rc == 0) { printf("Nextboot set successfully\n"); } else { @@ -656,7 +655,7 @@ ipmi_kontron_nextboot_help(void) * returns 1 if successful */ static int -ipmi_kontron_nextboot_set(struct ipmi_intf *intf, int argc, char **argv) +ipmi_kontron_nextboot_set(struct ipmi_intf *intf, char **argv) { struct ipmi_rs *rsp; struct ipmi_rq req; diff --git a/lib/ipmi_oem.c b/lib/ipmi_oem.c index 004c72d..04bbc8a 100644 --- a/lib/ipmi_oem.c +++ b/lib/ipmi_oem.c @@ -37,9 +37,9 @@ #include #include -static int ipmi_oem_supermicro(struct ipmi_intf * intf); -static int ipmi_oem_ibm(struct ipmi_intf * intf); -static int ipmi_oem_quanta(struct ipmi_intf * intf); +static int ipmi_oem_supermicro(struct ipmi_intf *intf); +static int ipmi_oem_ibm(struct ipmi_intf *intf); +static int ipmi_oem_quanta(struct ipmi_intf *intf); static struct ipmi_oem_handle ipmi_oem_list[] = { { @@ -82,16 +82,16 @@ static struct ipmi_oem_handle ipmi_oem_list[] = { /* Supermicro IPMIv2 BMCs use OEM authtype */ static int -ipmi_oem_supermicro(struct ipmi_intf * intf) +ipmi_oem_supermicro(struct ipmi_intf *intf) { ipmi_intf_session_set_authtype(intf, IPMI_SESSION_AUTHTYPE_OEM); return 0; } static int -ipmi_oem_ibm(struct ipmi_intf * intf) +ipmi_oem_ibm(struct ipmi_intf *__UNUSED__(intf)) { - char * filename = getenv("IPMI_OEM_IBM_DATAFILE"); + char *filename = getenv("IPMI_OEM_IBM_DATAFILE"); if (!filename) { lprintf(LOG_ERR, "Unable to read IPMI_OEM_IBM_DATAFILE from environment"); return -1; @@ -101,7 +101,7 @@ ipmi_oem_ibm(struct ipmi_intf * intf) /* Quanta IPMIv2 BMCs use OEM authtype */ static int -ipmi_oem_quanta(struct ipmi_intf * intf) +ipmi_oem_quanta(struct ipmi_intf *intf) { ipmi_intf_session_set_authtype(intf, IPMI_SESSION_AUTHTYPE_OEM); return 0; @@ -112,7 +112,7 @@ ipmi_oem_quanta(struct ipmi_intf * intf) void ipmi_oem_print(void) { - struct ipmi_oem_handle * oem; + struct ipmi_oem_handle *oem; lprintf(LOG_NOTICE, "\nOEM Support:"); for (oem=ipmi_oem_list; oem->name && oem->desc; oem++) { lprintf(LOG_NOTICE, "\t%-12s %s", oem->name, oem->desc); diff --git a/lib/ipmi_pef.c b/lib/ipmi_pef.c index db7446f..090c24d 100644 --- a/lib/ipmi_pef.c +++ b/lib/ipmi_pef.c @@ -603,7 +603,8 @@ _ipmi_set_pef_policy_entry(struct ipmi_intf *intf, uint8_t policy_id, } static void -ipmi_pef_print_oem_lan_dest(struct ipmi_intf *intf, uint8_t ch, uint8_t dest) +ipmi_pef_print_oem_lan_dest(struct ipmi_intf *intf, + uint8_t dest) { char address[128]; int len; @@ -866,7 +867,7 @@ ipmi_pef_print_serial_dest(struct ipmi_intf *intf, uint8_t ch, uint8_t dest) if (!dest || tbl_size == 0) /* Page alerting not supported */ return; if (dest > tbl_size) { - ipmi_pef_print_oem_lan_dest(intf, ch, dest - tbl_size); + ipmi_pef_print_oem_lan_dest(intf, dest - tbl_size); return; } @@ -904,7 +905,7 @@ ipmi_pef_print_serial_dest(struct ipmi_intf *intf, uint8_t ch, uint8_t dest) } static void -ipmi_pef_print_dest(struct ipmi_intf * intf, uint8_t ch, uint8_t dest) +ipmi_pef_print_dest(uint8_t dest) { /* // print generic alert destination info */ @@ -1330,7 +1331,7 @@ ipmi_pef2_list_policies(struct ipmi_intf *intf) dest); break; default: - ipmi_pef_print_dest(intf, channel_info.channel, dest); + ipmi_pef_print_dest(dest); break; } printf("\n"); diff --git a/lib/ipmi_picmg.c b/lib/ipmi_picmg.c index ef09de0..d443d42 100644 --- a/lib/ipmi_picmg.c +++ b/lib/ipmi_picmg.c @@ -656,7 +656,7 @@ ipmi_picmg_properties(struct ipmi_intf * intf, int show ) #define PICMG_FRU_ACTIVATE (unsigned char) 0x01 int -ipmi_picmg_fru_activation(struct ipmi_intf * intf, int argc, char ** argv, unsigned char state) +ipmi_picmg_fru_activation(struct ipmi_intf * intf, char ** argv, unsigned char state) { struct ipmi_rs * rsp; struct ipmi_rq req; @@ -690,7 +690,7 @@ ipmi_picmg_fru_activation(struct ipmi_intf * intf, int argc, char ** argv, unsig int -ipmi_picmg_fru_activation_policy_get(struct ipmi_intf * intf, int argc, char ** argv) +ipmi_picmg_fru_activation_policy_get(struct ipmi_intf * intf, char ** argv) { struct ipmi_rs * rsp; struct ipmi_rq req; @@ -729,7 +729,7 @@ ipmi_picmg_fru_activation_policy_get(struct ipmi_intf * intf, int argc, char ** } int -ipmi_picmg_fru_activation_policy_set(struct ipmi_intf * intf, int argc, char ** argv) +ipmi_picmg_fru_activation_policy_set(struct ipmi_intf * intf, char ** argv) { struct ipmi_rs * rsp; struct ipmi_rq req; @@ -1153,7 +1153,7 @@ ipmi_picmg_amc_portstate_set(struct ipmi_intf * intf, uint8_t channel, int -ipmi_picmg_get_led_properties(struct ipmi_intf * intf, int argc, char ** argv) +ipmi_picmg_get_led_properties(struct ipmi_intf * intf, char ** argv) { struct ipmi_rs * rsp; struct ipmi_rq req; @@ -1192,7 +1192,7 @@ ipmi_picmg_get_led_properties(struct ipmi_intf * intf, int argc, char ** argv) } int -ipmi_picmg_get_led_capabilities(struct ipmi_intf * intf, int argc, char ** argv) +ipmi_picmg_get_led_capabilities(struct ipmi_intf * intf, char ** argv) { int i; struct ipmi_rs * rsp; @@ -1242,7 +1242,7 @@ ipmi_picmg_get_led_capabilities(struct ipmi_intf * intf, int argc, char ** argv) } int -ipmi_picmg_get_led_state(struct ipmi_intf * intf, int argc, char ** argv) +ipmi_picmg_get_led_state(struct ipmi_intf * intf, char ** argv) { struct ipmi_rs * rsp; struct ipmi_rq req; @@ -1329,7 +1329,7 @@ ipmi_picmg_get_led_state(struct ipmi_intf * intf, int argc, char ** argv) } int -ipmi_picmg_set_led_state(struct ipmi_intf * intf, int argc, char ** argv) +ipmi_picmg_set_led_state(struct ipmi_intf * intf, char ** argv) { struct ipmi_rs * rsp; struct ipmi_rq req; @@ -1405,7 +1405,7 @@ ipmi_picmg_set_led_state(struct ipmi_intf * intf, int argc, char ** argv) } int -ipmi_picmg_get_power_level(struct ipmi_intf * intf, int argc, char ** argv) +ipmi_picmg_get_power_level(struct ipmi_intf * intf, char ** argv) { int i; struct ipmi_rs * rsp; @@ -1456,7 +1456,7 @@ ipmi_picmg_get_power_level(struct ipmi_intf * intf, int argc, char ** argv) } int -ipmi_picmg_set_power_level(struct ipmi_intf * intf, int argc, char ** argv) +ipmi_picmg_set_power_level(struct ipmi_intf * intf, char ** argv) { struct ipmi_rs * rsp; struct ipmi_rq req; @@ -1560,7 +1560,7 @@ ipmi_picmg_bused_resource(struct ipmi_intf * intf, t_picmg_bused_resource_mode m } int -ipmi_picmg_fru_control(struct ipmi_intf * intf, int argc, char ** argv) +ipmi_picmg_fru_control(struct ipmi_intf * intf, char ** argv) { struct ipmi_rs * rsp; struct ipmi_rq req; @@ -1807,7 +1807,7 @@ ipmi_picmg_main (struct ipmi_intf * intf, int argc, char ** argv) /* fru control command */ else if (!strncmp(argv[0], "frucontrol", 10)) { if (argc > 2) { - rc = ipmi_picmg_fru_control(intf, argc-1, &(argv[1])); + rc = ipmi_picmg_fru_control(intf, &(argv[1])); } else { lprintf(LOG_NOTICE, "usage: frucontrol