xref: /openbmc/phosphor-inventory-manager/app.cpp (revision 51aff45e80ec084fb86c634ef84f6ce0a0bb5624)
173b776bdSBrad Bishop /**
273b776bdSBrad Bishop  * Copyright © 2016 IBM Corporation
373b776bdSBrad Bishop  *
473b776bdSBrad Bishop  * Licensed under the Apache License, Version 2.0 (the "License");
573b776bdSBrad Bishop  * you may not use this file except in compliance with the License.
673b776bdSBrad Bishop  * You may obtain a copy of the License at
773b776bdSBrad Bishop  *
873b776bdSBrad Bishop  *     http://www.apache.org/licenses/LICENSE-2.0
973b776bdSBrad Bishop  *
1073b776bdSBrad Bishop  * Unless required by applicable law or agreed to in writing, software
1173b776bdSBrad Bishop  * distributed under the License is distributed on an "AS IS" BASIS,
1273b776bdSBrad Bishop  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1373b776bdSBrad Bishop  * See the License for the specific language governing permissions and
1473b776bdSBrad Bishop  * limitations under the License.
1573b776bdSBrad Bishop  */
1649aefb31SBrad Bishop #include "config.h"
17a680d1efSPatrick Venture 
1849aefb31SBrad Bishop #include "manager.hpp"
19a680d1efSPatrick Venture 
20a83db30eSBrad Bishop #include <sdbusplus/bus.hpp>
21a83db30eSBrad Bishop 
2273b776bdSBrad Bishop #include <cstdlib>
2349aefb31SBrad Bishop #include <exception>
24a680d1efSPatrick Venture #include <iostream>
2573b776bdSBrad Bishop 
main(int,char **)26*23314a5cSGeorge Liu int main(int /* argc */, char** /* argv[] */)
2773b776bdSBrad Bishop {
28ec2709feSPatrick Williams     phosphor::inventory::manager::Manager manager(sdbusplus::bus::new_system(),
29ec2709feSPatrick Williams                                                   INVENTORY_ROOT);
3020c9435cSBrad Bishop     manager.run(BUSNAME);
3173b776bdSBrad Bishop     exit(EXIT_SUCCESS);
32ec2709feSPatrick Williams 
33ec2709feSPatrick Williams     return 0;
3449aefb31SBrad Bishop }
35