Deepak Kodihalli | 6b492fb | 2017-03-18 01:09:28 -0500 | [diff] [blame] | 1 | #include <phosphor-logging/log.hpp> |
| 2 | #include <exception> |
| 3 | #include "occ_pass_through.hpp" |
Deepak Kodihalli | 92a6341 | 2017-03-17 05:01:00 -0500 | [diff] [blame] | 4 | |
| 5 | int main(int argc, char* argv[]) |
| 6 | { |
Deepak Kodihalli | 6b492fb | 2017-03-18 01:09:28 -0500 | [diff] [blame] | 7 | try |
Deepak Kodihalli | 92a6341 | 2017-03-17 05:01:00 -0500 | [diff] [blame] | 8 | { |
Deepak Kodihalli | fd358d1 | 2017-05-08 07:11:22 -0500 | [diff] [blame^] | 9 | 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 Kodihalli | 6b492fb | 2017-03-18 01:09:28 -0500 | [diff] [blame] | 22 | } |
| 23 | catch (const std::exception& e) |
| 24 | { |
| 25 | using namespace phosphor::logging; |
| 26 | log<level::ERR>(e.what()); |
| 27 | return -1; |
Deepak Kodihalli | 92a6341 | 2017-03-17 05:01:00 -0500 | [diff] [blame] | 28 | } |
| 29 | |
| 30 | return 0; |
| 31 | } |