blob: 4b73e5155d7c7412370d0cd59a6dc1c5ec8d98bc [file] [log] [blame]
Deepak Kodihalli6b492fb2017-03-18 01:09:28 -05001#include <phosphor-logging/log.hpp>
2#include <exception>
3#include "occ_pass_through.hpp"
Deepak Kodihalli92a63412017-03-17 05:01:00 -05004
5int main(int argc, char* argv[])
6{
Deepak Kodihalli6b492fb2017-03-18 01:09:28 -05007 try
Deepak Kodihalli92a63412017-03-17 05:01:00 -05008 {
Deepak Kodihallifd358d12017-05-08 07:11:22 -05009 auto bus = sdbusplus::bus::new_default();
10 bus.request_name(OCC_PASS_THROUGH_BUSNAME);
11
12 sdbusplus::server::manager::manager objManager(bus,
13 OCC_PASS_THROUGH_ROOT);
14
15 open_power::occ::pass_through::manager::Manager mgr(bus);
16
17 while (true)
18 {
19 bus.process_discard();
20 bus.wait();
21 }
Deepak Kodihalli6b492fb2017-03-18 01:09:28 -050022 }
23 catch (const std::exception& e)
24 {
25 using namespace phosphor::logging;
26 log<level::ERR>(e.what());
27 return -1;
Deepak Kodihalli92a63412017-03-17 05:01:00 -050028 }
29
30 return 0;
31}