blob: 449bea38a33644f4254ecc9985777dfad83dc9c7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
#include <phosphor-logging/log.hpp>
#include <exception>
#include "occ_manager.hpp"
#include "config.h"
int main(int argc, char* argv[])
{
try
{
auto bus = sdbusplus::bus::new_default();
bus.request_name(OCC_CONTROL_BUSNAME);
sdbusplus::server::manager::manager objManager(bus,
OCC_CONTROL_ROOT);
open_power::occ::Manager mgr(bus);
while (true)
{
bus.process_discard();
bus.wait();
}
}
catch (const std::exception& e)
{
using namespace phosphor::logging;
log<level::ERR>(e.what());
return -1;
}
return 0;
}
|