diff options
author | Adriana Kobylak <anoo@us.ibm.com> | 2017-03-15 12:34:32 -0500 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2017-03-25 01:55:02 +0000 |
commit | 2d8fa225478de6001b3d20aaa0058a4be2e80d3d (patch) | |
tree | 8bef4a88f076c4667ce43428438549d49c57f5af /item_updater_main.cpp | |
parent | 2f27b74e848329ae7730fb564223fa002061e2f4 (diff) | |
download | openpower-pnor-code-mgmt-2d8fa225478de6001b3d20aaa0058a4be2e80d3d.tar.gz openpower-pnor-code-mgmt-2d8fa225478de6001b3d20aaa0058a4be2e80d3d.zip |
Create Activation dbus object
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>
Diffstat (limited to 'item_updater_main.cpp')
-rwxr-xr-x | item_updater_main.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/item_updater_main.cpp b/item_updater_main.cpp new file mode 100755 index 000000000..b4ff17775 --- /dev/null +++ b/item_updater_main.cpp @@ -0,0 +1,23 @@ +#include <sdbusplus/bus.hpp> +#include <sdbusplus/server/manager.hpp> +#include "config.h" +#include "item_updater.hpp" + +int main(int argc, char* argv[]) +{ + auto bus = sdbusplus::bus::new_default(); + + // Add sdbusplus ObjectManager. + sdbusplus::server::manager::manager objManager(bus, SOFTWARE_OBJPATH); + + openpower::software::manager::ItemUpdater updater(bus); + + bus.request_name(BUSNAME_UPDATER); + + while (true) + { + bus.process_discard(); + bus.wait(); + } + return 0; +} |