commit | 687e75e256d326d841a4fcc71bf3c2c2dd6b0442 | [log] [tgz] |
---|---|---|
author | Adriana Kobylak <anoo@us.ibm.com> | Thu Nov 07 11:23:25 2019 -0600 |
committer | Adriana Kobylak <anoo@us.ibm.com> | Tue Nov 19 14:24:39 2019 -0600 |
tree | a11ae3e185002228fa974a6934c474211d73972a | |
parent | 9eb631da18b9ea58fd3e5b965f930289655db570 [diff] |
serialize: Store priority in directory instead of file Currently the priority value is stored in <persist_dir>/<version_id>. There is a need to persist the version purpose as well, because it can be BMC or System. To achieve this, we can either store the priority and purpose on different files under a single directory, or store both values in the current single file. Proposing to implement the former because cereal is not designed to append data to a serialized file, therefore it'd be necessary to store all the values every time a file is saved, and would make it confusing having to somehow pass the priority and purpose values when updating the priority. This would get more complicated as more files were added to be persisted. Also the purpose only needs to be updated once, and doesn't change, so makes sense to store different values that are stored at different times in different files. Proposed change: - Store the values under <persiste_dir>/<version_id>/<property_name>. - Change the persist directory to /var/lib/phosphor-bmc-code-mgmt/ instead of /var/lib/obmc/phosphor-bmc-code-mgmt/. This allows for this change from file to directory to be backward compatible because the current code fails to do a remove if the version_id is a directory. This would also make the path consistent with the general guidelines (see https://lists.ozlabs.org/pipermail/openbmc/2019-November/019388.html) as the /var/lib/obmc/ directory is being deprecated eventually. - Change the function names to specify they apply to priority values. Tested: Verified the properties were stored in a directory, and updates and downgrades handled the values correctly, since if the value is not found in a file/directory, there's a backup value in U-Boot. Change-Id: I244334af51721385c748fe06d2e3d029ede1d138 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
Phosphor BMC Code Management provides a set of system software management applications. More information can be found at Software Architecture
To build this package, do the following steps: 1. ./bootstrap.sh 2. ./configure ${CONFIGURE_FLAGS} 3. make To clean the repository run `./bootstrap.sh clean`.