Editing FRU if the length of the field is not equal the original field will return EXIT_FAILURE #81
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I think it's a bug
When editing FRU, if the length of the field being modified does not match the original field, "ipmi_fru_set_field_string_rebuild" will be executed. This function returns 1 if successfully, yet the current logic sets rc= -1, resulting in the ipmitool command returning EXIT_FAILURE as its exit code.
Please see the code in ipmitool/lib/ipmi_fru.c:

I if "ipmi_fru_set_field_string_rebuild" returns 1, rc will be set 1
Thanks for the catch. This should be fixed in #82.
Nonetheless, I strongly recommend using https://codeberg.org/IPMITool/frugen for FRU modification, as it is much more versatile and flexible, plus it better supports the FRU specification.
You can use
ipmitool fru readto read the binary file, then modify it withfrugen, then write it back withipmitool fru write.Probably, at some point in the future I will bring
libfrufromfrugentoipmitoolto replace the currently existing fru handling code, because to be honest, the currently existing code here is quite dirty.