diff options
author | Lei YU <mine260309@gmail.com> | 2019-03-01 16:03:53 +0800 |
---|---|---|
committer | Lei YU <mine260309@gmail.com> | 2019-03-13 11:01:53 +0800 |
commit | 716de5b8e3867fb829a2c1e39ade2b8f6aa1fa39 (patch) | |
tree | 800b067a0ede4da694731fa2ada022d12da9da5f /static/item_updater_static.hpp | |
parent | ed1c1dc53ef867a24a57a692334c24506dd470c6 (diff) | |
download | openpower-pnor-code-mgmt-716de5b8e3867fb829a2c1e39ade2b8f6aa1fa39.tar.gz openpower-pnor-code-mgmt-716de5b8e3867fb829a2c1e39ade2b8f6aa1fa39.zip |
test: Add sources of static PNOR
Add sources in static dir to test.
It generates a link error about duplcated GardReset::reset().
Then an issue is found that GardReset::~GardReset() is not virtual,
this will casuse the destructor not calling its super class' dtor.
To fix the above link error, add GardReset[Ubi|Static] to make
ubi/static specific implementation in its own class.
Tested: Verify the test build works fine.
Change-Id: I41bd4d522e8b9c4053283c0cf4373807ef4f2d1c
Signed-off-by: Lei YU <mine260309@gmail.com>
Diffstat (limited to 'static/item_updater_static.hpp')
-rw-r--r-- | static/item_updater_static.hpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/static/item_updater_static.hpp b/static/item_updater_static.hpp index c3f273d37..40f616bcb 100644 --- a/static/item_updater_static.hpp +++ b/static/item_updater_static.hpp @@ -9,6 +9,19 @@ namespace software namespace updater { +class GardResetStatic : public GardReset +{ + public: + using GardReset::GardReset; + virtual ~GardResetStatic() = default; + + protected: + /** + * @brief GARD factory reset - clears the PNOR GARD partition. + */ + void reset() override; +}; + /** @class ItemUpdaterStatic * @brief Manages the activation of the host version items for static layout */ @@ -19,7 +32,7 @@ class ItemUpdaterStatic : public ItemUpdater ItemUpdater(bus, path) { processPNORImage(); - gardReset = std::make_unique<GardReset>(bus, GARD_PATH); + gardReset = std::make_unique<GardResetStatic>(bus, GARD_PATH); volatileEnable = std::make_unique<ObjectEnable>(bus, volatilePath); // Emit deferred signal. |