summaryrefslogtreecommitdiffstats
path: root/serialize.cpp
Commit message (Collapse)AuthorAgeFilesLines
* PNOR Serialize: Change create_directory to create_directoriesMichael Tritz2017-09-181-1/+1
| | | | | | | | | | | Core dumps were observed when serialize attempts to create the directory /var/lib/obmc/openpower-pnor-code-mgmt because the parent directory /var/lib/obmc did not exist. This commit changes the create_directory call to create_directories so that any missing parent directories will be created. Change-Id: I051fb854b4bf770abec8e0f03f74c194339cc227 Signed-off-by: Michael Tritz <mtritz@us.ibm.com>
* PNOR: Store a redundant copy of the priority persistence fileMichael Tritz2017-08-181-10/+36
| | | | | | | | | | | | | | In this commit, the priority persistence functionality is extended by storing a second copy of each persistence file in the RW volume for its version. Upon a reboot, the corresponding restoration from file checks the second location if necessary. Resolves openbmc/openbmc#2133 Change-Id: Ie1926ad8500d49e7ec7cf71bd703664ac23c6a7a Signed-off-by: Michael Tritz <mtritz@us.ibm.com>
* Fix for restoreFromFile cereal exceptionMichael Tritz2017-08-181-3/+12
| | | | | | | | | | | This commit provides a fix for an issue in which the cereal restoreFromFile() would crash the host software updater in the event that a priority persistence file is empty. Resolves openbmc/openbmc#2091 Change-Id: Icca5d68ef250e2662cd02075c6ba731e4ab768b0 Signed-off-by: Michael Tritz <mtritz@us.ibm.com>
* Change persistence file format from binary to JSONMichael Tritz2017-08-021-7/+7
| | | | | | | | | This commit changes the storage format for the PNOR activation persistence file from binary to JSON so that it is human-readable and parseable. Change-Id: I7ad6bd9c34284cccd281707052b962c069f50676 Signed-off-by: Michael Tritz <mtritz@us.ibm.com>
* PNOR: Restore RedundancyPriority on resetMichael Tritz2017-07-301-0/+51
This commit extends the functionality of the PNOR software updater by preserving RedundancyPriority values through any kind of reset. This is accomplished by storing priority values in serial files in /var/lib/obmc/openpower-pnor-code-mgmt/ using the Cereal library. Each time a priority value is modified, the value in the corresponding version file is adjusted. When the item updater resets, it reads back the priority values from these files. Resolves openbmc/openbmc#2040 Change-Id: I908431801e541a1e5b39bcf49ae057f7e340eecc Signed-off-by: Michael Tritz <mtritz@us.ibm.com>
OpenPOWER on IntegriCloud