switch fmt::format to use std::format
fmt::format is supported in the c++ std. This will
help to remove fmt package dependency.
Change-Id: Ia3f5c607a348f062a0f112d5eae8b51ecc23fd37
Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com>
diff --git a/procedures/phal/import_devtree.cpp b/procedures/phal/import_devtree.cpp
index d1cff3e..78d45c2 100644
--- a/procedures/phal/import_devtree.cpp
+++ b/procedures/phal/import_devtree.cpp
@@ -4,7 +4,6 @@
#include "extensions/phal/pdbg_utils.hpp"
#include "registration.hpp"
-#include <fmt/format.h>
#include <sys/wait.h>
#include <unistd.h>
@@ -14,6 +13,7 @@
#include <xyz/openbmc_project/Common/error.hpp>
#include <filesystem>
+#include <format>
namespace openpower
{
@@ -52,7 +52,7 @@
execl("/bin/sh", "sh", "-c", cmd.c_str(), 0);
auto error = errno;
- log<level::ERR>(fmt::format("Error occurred during attributes import "
+ log<level::ERR>(std::format("Error occurred during attributes import "
"execution, errno({})",
error)
.c_str());
@@ -84,7 +84,7 @@
}
catch (const fs::filesystem_error& e)
{ // Log message and continue. Data already applied successfully.
- log<level::ERR>(fmt::format("File({}) delete failed Error:({})",
+ log<level::ERR>(std::format("File({}) delete failed Error:({})",
DEVTREE_EXP_FILE, e.what())
.c_str());
}