mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-10 18:47:22 +00:00
Fix 2 minor bugs in output. 1) if a field didn't exist, we weren't
updating our offset. This caused subsequent fields to not be displayed. 2) Add missing field "Board Mfg". I think this was just an oversight during a rewrite.
This commit is contained in:
parent
bc17282c3a
commit
3d29ed01a5
@ -96,7 +96,10 @@ get_fru_area_str(uint8_t * data, uint32_t * offset)
|
||||
}
|
||||
|
||||
if (size < 1)
|
||||
{
|
||||
*offset = off;
|
||||
return NULL;
|
||||
}
|
||||
str = malloc(size+1);
|
||||
if (str == NULL)
|
||||
return NULL;
|
||||
@ -351,6 +354,13 @@ fru_area_print_board(struct ipmi_intf * intf, struct fru_info * fru,
|
||||
i++; /* skip fru board language */
|
||||
i += 3; /* skip mfg. date time */
|
||||
|
||||
|
||||
fru_area = get_fru_area_str(fru_data, &i);
|
||||
if (fru_area != NULL && strlen(fru_area) > 0) {
|
||||
printf(" Board Mfg : %s\n", fru_area);
|
||||
free(fru_area);
|
||||
}
|
||||
|
||||
fru_area = get_fru_area_str(fru_data, &i);
|
||||
if (fru_area != NULL && strlen(fru_area) > 0) {
|
||||
printf(" Board Product : %s\n", fru_area);
|
||||
|
Loading…
x
Reference in New Issue
Block a user