Convert project to meson and C++20
Converting build system from CMake to Meson and C++20.
Signed-off-by: Hieu Huynh <hieuh@os.amperecomputing.com>
Change-Id: Ieaf98401328b77683fce14222512bdecec9be908
diff --git a/src/oemcommands.cpp b/src/oemcommands.cpp
index f55c16e..deea8e2 100644
--- a/src/oemcommands.cpp
+++ b/src/oemcommands.cpp
@@ -65,6 +65,7 @@
{
std::string cmd;
std::string cmdOutput;
+ int ret;
try
{
/* Check the mode of NTP in the system, set the system time in case the
@@ -80,7 +81,12 @@
else
{
/* Sync time from RTC to BMC using hwclock */
- system("hwclock --hctosys");
+ ret = system("hwclock --hctosys");
+ if (ret == -1)
+ {
+ log<level::INFO>("Can not set the system time");
+ return responseFailure();
+ }
}
}
catch(const std::exception& e)