Closed daym closed 2 years ago
Indeed, it would be better. Adding...
There are serde attributes commented out for struct Parameter; these should be deleted, or if the derivations are actually needed, is this restriction needed there too?
The macro make_accessors!
, which is used on struct Parameter
, automatically takes care of it nowadays--so none of those manual serde attributes need to be specified. I've thus now cleared out the commented-out attributes.
Some not-that-necessary background: The on-disk-Parameters
in the apcb are actually stored like this (in sequence): key1, key2, key3, ..., keyN, value1, value2, value3, ..., valueN. Needless to say, that isn't user-friendly, so struct Parameter
is used to pretend to the user that they are (key1, value1), (key2, value2), ..., (keyN, valueN), with Parameter
being (key1, value1)
or similar.
Likewise, struct SlinkConfig, struct CustomSerdeRdimmDdr4Voltages, struct CustomSerdeUdimmDdr4Voltages, struct CustomSerdeLrdimmDdr4Voltages, struct CustomSerdeErrorOutControlBeepCode, struct CustomSerdeDdrPostPackageRepairElement, and maybe others I missed?
Ok, added all it to all the relevant structs and enums now, and added a test.
Also tested it using amd-host-image-builder--result: bitwise identical img before and afterwards.
Fixes https://github.com/oxidecomputer/amd-apcb/issues/27.