remove meson.options
The only option in this repository is configuring the location
of the persistent file location. This is not ever leveraged
by anyone. Reduce the complexity of maintaining a meson.option
to hold a string and just move it to a constant in a header.
Change-Id: I066d88d2831d1d04fd53b47e26cd6fbcabf863d2
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/include/config.hpp b/include/config.hpp
new file mode 100644
index 0000000..41b2a49
--- /dev/null
+++ b/include/config.hpp
@@ -0,0 +1,3 @@
+#pragma once
+
+static constexpr auto BIOS_PERSIST_PATH = "/var/lib/bios-settings-manager";
diff --git a/include/manager.hpp b/include/manager.hpp
index 680ad6d..9c4bd50 100644
--- a/include/manager.hpp
+++ b/include/manager.hpp
@@ -15,8 +15,6 @@
*/
#pragma once
-#include "config.h"
-
#include <sdbusplus/asio/object_server.hpp>
#include <sdbusplus/server.hpp>
#include <xyz/openbmc_project/BIOSConfig/Manager/server.hpp>
@@ -79,7 +77,8 @@
* @param[in] systemBus - bus connection
*/
Manager(sdbusplus::asio::object_server& objectServer,
- std::shared_ptr<sdbusplus::asio::connection>& systemBus);
+ std::shared_ptr<sdbusplus::asio::connection>& systemBus,
+ std::string persistPath);
/** @brief Set the BIOS attribute with a new value, the new value is added
* to the PendingAttribute.
diff --git a/include/password.hpp b/include/password.hpp
index 358c4ef..2b320a5 100644
--- a/include/password.hpp
+++ b/include/password.hpp
@@ -14,8 +14,6 @@
// limitations under the License.
*/
#pragma once
-#include "config.h"
-
#include <openssl/evp.h>
#include <openssl/hmac.h>
#include <openssl/sha.h>
diff --git a/meson.build b/meson.build
index fb4f8f5..1314efe 100644
--- a/meson.build
+++ b/meson.build
@@ -18,10 +18,6 @@
# project uses the same compiler, we can safely ignmore these info notes.
add_project_arguments('-Wno-psabi', language: 'cpp')
-conf_data = configuration_data()
-conf_data.set_quoted('BIOS_PERSIST_PATH', get_option('bios-persist-path'))
-configure_file(output: 'config.h', configuration: conf_data)
-
boost_args = [
'-DBOOST_ALL_NO_LIB',
'-DBOOST_ASIO_DISABLE_THREADS',
diff --git a/meson.options b/meson.options
deleted file mode 100644
index f125e96..0000000
--- a/meson.options
+++ /dev/null
@@ -1 +0,0 @@
-option('bios-persist-path', type : 'string', description : 'The filesystem path to persist the bios-settings-manager object', value : '/var/lib/bios-settings-manager')
\ No newline at end of file
diff --git a/src/main.cpp b/src/main.cpp
index 6e2a963..8c2d78b 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -14,6 +14,7 @@
// limitations under the License.
*/
+#include "config.hpp"
#include "manager.hpp"
#include "password.hpp"
@@ -38,7 +39,7 @@
* Object path : /xyz/openbmc_project/bios_config/manager
* Interface : xyz.openbmc_project.BIOSConfig.Manager
*/
- bios_config::Manager manager(objectServer, systemBus);
+ bios_config::Manager manager(objectServer, systemBus, BIOS_PERSIST_PATH);
/**
* Password class is responsible for handling methods and signals under
diff --git a/src/manager.cpp b/src/manager.cpp
index 3cb96f5..5d771ea 100644
--- a/src/manager.cpp
+++ b/src/manager.cpp
@@ -311,12 +311,13 @@
}
Manager::Manager(sdbusplus::asio::object_server& objectServer,
- std::shared_ptr<sdbusplus::asio::connection>& systemBus) :
+ std::shared_ptr<sdbusplus::asio::connection>& systemBus,
+ std::string persistPath) :
sdbusplus::xyz::openbmc_project::BIOSConfig::server::Manager(
*systemBus, objectPath),
objServer(objectServer), systemBus(systemBus)
{
- fs::path biosDir(BIOS_PERSIST_PATH);
+ fs::path biosDir(persistPath);
fs::create_directories(biosDir);
biosFile = biosDir / biosPersistFile;
deserialize(biosFile, *this);
diff --git a/src/password.cpp b/src/password.cpp
index c5d9d6e..03aeb79 100644
--- a/src/password.cpp
+++ b/src/password.cpp
@@ -15,6 +15,7 @@
*/
#include "password.hpp"
+#include "config.hpp"
#include "xyz/openbmc_project/BIOSConfig/Common/error.hpp"
#include "xyz/openbmc_project/Common/error.hpp"