summaryrefslogtreecommitdiffstats
path: root/item_updater_main.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Refactor: Fix issues found by cppcheckLei YU2019-03-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Resolve several issues found by cppcheck: [msl_verify.hpp:28]: (style) Class 'MinimumShipLevel' has a constructor with 1 argument that is not explicit. [ubi/watch.hpp:21]: (warning) Assignment of function parameter has no effect outside the function. Did you forget dereferencing it? [item_updater_main.cpp:22] -> [item_updater_main.cpp:49]: (style) Local variable rc shadows outer symbol [serialize.cpp:19]: (performance) Function parameter 'versionId' should be passed by const reference. [ubi/watch.hpp:43]: (style) Struct 'CustomFd' has a constructor with 1 argument that is not explicit. [serialize.cpp:52]: (performance) Function parameter 'versionId' should be passed by const reference. [serialize.cpp:116]: (performance) Function parameter 'versionId' should be passed by const reference. [activation.cpp:115] -> [activation.cpp:152]: (style) Local variable mapperResponseMsg shadows outer symbol [version.hpp:114]: (performance) Variable 'eraseCallback' is assigned in constructor body. Consider performing initialization in initialization list. [image_verify.hpp:53]: (style) Struct 'CustomFd' has a constructor with 1 argument that is not explicit. [ubi/item_updater_ubi.cpp:192]: (performance) Function parameter 'versionId' should be passed by const reference. [ubi/item_updater_ubi.cpp:203]: (performance) Function parameter 'versionId' should be passed by const reference. Tested: Verify the code compiles and cppcheck does not report the above issues. Change-Id: I096392a2a7a283fe198c9c29185125e61295e10f Signed-off-by: Lei YU <mine260309@gmail.com>
* Static layout: Add dummy item_updaterLei YU2019-03-131-0/+4
| | | | | | | | | This commit only adds the functions without implementation. Tested: Verify the code compiles with or without static layout. Change-Id: Id57640b367f9594d07e6780d446479eb7ac06007 Signed-off-by: Lei YU <mine260309@gmail.com>
* Refactor: Move watch to ubiLei YU2019-03-071-1/+3
| | | | | | | | | | watch is ubi specific functions, move it to ubi dir. Tested: On the last commit of the patch series, run code update and factory reset on Witherspoon and all work fine. Change-Id: Ia7f6b6de845ddd40e2a32ad626d3b7af9074c7f3 Signed-off-by: Lei YU <mine260309@gmail.com>
* Refactor: Split item_updater to common and ubiLei YU2019-03-071-2/+6
| | | | | | | | | | | | | | | | | | | | | | | The existing item_updater is highly coupled with ubifs. It will support static layout and ubi in future. So split the functions in to common ones and ubi specific ones, and move the ubi specific code in ubi dir. 1. Keep common functions and make them virtual for extension. createActiveAssociation() updateFunctionalAssociation() removeAssociation() erase() 2. Create ubi/item_updater_ubi and move other functions into it. 3. Change updateFunctionalAssociation() parameter for future use. To support static layout, a new item_updater_static will be written. Tested: On the last commit of the patch series, run code update and factory reset on Witherspoon and all work fine. Change-Id: I4cc55b31ee3f37c5b27168611305dee8ce02880a Signed-off-by: Lei YU <mine260309@gmail.com>
* clang-format: Update to match docs repoGunnar Mills2018-09-111-4/+6
| | | | | | | | Update the .clang-format file. Now includes header sorting and updating PointerAlignment. Change-Id: I7119c12f1cc0a461cb7e4576dff6a02dcc95cbc4 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Enable clang code formatAdriana Kobylak2018-03-021-5/+3
| | | | | Change-Id: I4490e930459a7eab6f6dd15198418c5314755d3f Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
* Call updateFunctionalAssociation on symlink changeGunnar Mills2017-09-291-5/+38
| | | | | | | | | | | Call updateFunctionalAssociation, to change the functional association to the new "running" PNOR image, on a symlink change. The symlink change occurs on chassis poweron. Look at the RO symlink, /var/lib/phosphor-software-manager/pnor/ro, for a symlink change. Change-Id: I2c673635af55da1c642e6d96ab6e12951b3a4fd3 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Implement host factory reset in item_updaterMichael Tritz2017-05-241-1/+1
| | | | | | | | | | | This commit implements a factory reset interface for the host. This factory reset is accomplished by clearing all read/write PNOR partitions. Resolves openbmc/openbmc#1574 Change-Id: Ia2c9bd9cf829520bc724abb48aa2df3163f7d78a Signed-off-by: Michael Tritz <mtritz@us.ibm.com>
* Activation: Override the set property functionsAdriana Kobylak2017-04-191-1/+1
| | | | | | | | Create override functions so that actions can be taken based on the value that the properties are being set to. Change-Id: I70e9519246662d516a109af91f4456fb4f001c4f Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
* Create Activation dbus objectAdriana Kobylak2017-03-251-0/+23
Monitor the creation of new software version dbus objects and create an activation dbus object SOFTWARE_OBJPATH/<ID>. Save them in a persistent map with the corresponding version id, add the real version id number to the map and to the dbus object path once that's available. Change-Id: I35c2f211bbefc44a066aafa1760f725399215e69 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
OpenPOWER on IntegriCloud