1// SPDX-License-Identifier: GPL-3.0-or-later
2
3#include "blockdev_manager.hpp"
4#include "libsm.h"
5
6#include <iostream>
7
8int main(int argc, char **argv)
9{
10 MOS_UNUSED(argc);
11 MOS_UNUSED(argv);
12
13 std::cout << "Block Device Manager for MOS" << std::endl;
14 BlockManager manager;
15
16 if (!register_blockdevfs())
17 {
18 std::cerr << "Failed to register blockdevfs" << std::endl;
19 ReportServiceState(status: UnitStatus::Failed, message: "Failed to register blockdevfs");
20 return 1;
21 }
22
23 ReportServiceState(status: UnitStatus::Started, message: "manager started");
24 manager.run();
25
26 std::cout << "Block Device Manager exiting" << std::endl;
27 return 0;
28}
29