mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-11 19:17:22 +00:00
ID: 65 - Fixes for configure.in for cross compilation
Fixed some printf() formatting warnings in 'lib/ipmi_fru.c'. Commit for Dan Gora
This commit is contained in:
parent
8b7969a46f
commit
2e5fbc878b
@ -2882,7 +2882,7 @@ static void ipmi_fru_picmg_ext_print(uint8_t * fru_data, int off, int length)
|
|||||||
/* direct desc */
|
/* direct desc */
|
||||||
for(j=0; j<direct_cnt; j++){
|
for(j=0; j<direct_cnt; j++){
|
||||||
unsigned char feature, family, accuracy;
|
unsigned char feature, family, accuracy;
|
||||||
unsigned long freq, min_freq, max_freq;
|
unsigned int freq, min_freq, max_freq;
|
||||||
|
|
||||||
feature = fru_data[offset++];
|
feature = fru_data[offset++];
|
||||||
family = fru_data[offset++];
|
family = fru_data[offset++];
|
||||||
@ -5202,36 +5202,33 @@ ipmi_fru_set_field_string_rebuild(struct ipmi_intf * intf, uint8_t fruId,
|
|||||||
/* Do not requires any change in other section */
|
/* Do not requires any change in other section */
|
||||||
|
|
||||||
/* Change field length */
|
/* Change field length */
|
||||||
printf("Updating Field : '%s' with '%s' ... (Length from '%x' to '%x')\n",
|
printf(
|
||||||
fru_area, f_string, *(fru_data_old + fru_field_offset_tmp), (0xc0 + strlen(f_string)));
|
"Updating Field : '%s' with '%s' ... (Length from '%d' to '%d')\n",
|
||||||
|
fru_area, f_string,
|
||||||
|
(int)*(fru_data_old + fru_field_offset_tmp),
|
||||||
|
(int)(0xc0 + strlen(f_string)));
|
||||||
*(fru_data_new + fru_field_offset_tmp) = (0xc0 + strlen(f_string));
|
*(fru_data_new + fru_field_offset_tmp) = (0xc0 + strlen(f_string));
|
||||||
memcpy(fru_data_new + fru_field_offset_tmp + 1, f_string, strlen(f_string));
|
memcpy(fru_data_new + fru_field_offset_tmp + 1, f_string, strlen(f_string));
|
||||||
|
|
||||||
/* Copy remaing bytes in section */
|
/* Copy remaing bytes in section */
|
||||||
#ifdef DBG_RESIZE_FRU
|
#ifdef DBG_RESIZE_FRU
|
||||||
printf("Copying remaining of sections: %u \n",
|
printf("Copying remaining of sections: %d \n",
|
||||||
(
|
(int)((fru_data_old + header_offset + fru_section_len - 1) -
|
||||||
(fru_data_old + header_offset + fru_section_len - 1)
|
(fru_data_old + fru_field_offset_tmp + strlen(f_string) + 1)));
|
||||||
-
|
#endif
|
||||||
(fru_data_old + fru_field_offset_tmp + strlen(f_string) + 1)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
memcpy(
|
memcpy((fru_data_new + fru_field_offset_tmp + 1 +
|
||||||
(fru_data_new + fru_field_offset_tmp + 1 + strlen(f_string)),
|
strlen(f_string)),
|
||||||
(fru_data_old + fru_field_offset_tmp + 1 + strlen(fru_area)),
|
(fru_data_old + fru_field_offset_tmp + 1 +
|
||||||
(
|
strlen(fru_area)),
|
||||||
(fru_data_old + header_offset + fru_section_len - 1)
|
((fru_data_old + header_offset + fru_section_len - 1) -
|
||||||
-
|
(fru_data_old + fru_field_offset_tmp + strlen(f_string) + 1)));
|
||||||
(fru_data_old + fru_field_offset_tmp + strlen(f_string) + 1)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
/* Add Padding if required */
|
/* Add Padding if required */
|
||||||
for(counter = 0; counter < padding_len; counter ++)
|
for(counter = 0; counter < padding_len; counter ++)
|
||||||
{
|
{
|
||||||
*(fru_data_new + header_offset + fru_section_len - 1 - padding_len+ counter) = 0;
|
*(fru_data_new + header_offset + fru_section_len - 1 -
|
||||||
|
padding_len + counter) = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Calculate New Checksum */
|
/* Calculate New Checksum */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user