Skip to content

Commit 5c7e80d

Browse files
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 <[email protected]>
1 parent 9b2334e commit 5c7e80d

8 files changed

+11
-13
lines changed

include/config.hpp

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#pragma once
2+
3+
static constexpr auto BIOS_PERSIST_PATH = "/var/lib/bios-settings-manager";

include/manager.hpp

+2-3
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
*/
1616
#pragma once
1717

18-
#include "config.h"
19-
2018
#include <sdbusplus/asio/object_server.hpp>
2119
#include <sdbusplus/server.hpp>
2220
#include <xyz/openbmc_project/BIOSConfig/Manager/server.hpp>
@@ -79,7 +77,8 @@ class Manager : public Base
7977
* @param[in] systemBus - bus connection
8078
*/
8179
Manager(sdbusplus::asio::object_server& objectServer,
82-
std::shared_ptr<sdbusplus::asio::connection>& systemBus);
80+
std::shared_ptr<sdbusplus::asio::connection>& systemBus,
81+
std::string persistPath);
8382

8483
/** @brief Set the BIOS attribute with a new value, the new value is added
8584
* to the PendingAttribute.

include/password.hpp

-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
// limitations under the License.
1515
*/
1616
#pragma once
17-
#include "config.h"
18-
1917
#include <openssl/evp.h>
2018
#include <openssl/hmac.h>
2119
#include <openssl/sha.h>

meson.build

-4
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ project(
1818
# project uses the same compiler, we can safely ignmore these info notes.
1919
add_project_arguments('-Wno-psabi', language: 'cpp')
2020

21-
conf_data = configuration_data()
22-
conf_data.set_quoted('BIOS_PERSIST_PATH', get_option('bios-persist-path'))
23-
configure_file(output: 'config.h', configuration: conf_data)
24-
2521
boost_args = [
2622
'-DBOOST_ALL_NO_LIB',
2723
'-DBOOST_ASIO_DISABLE_THREADS',

meson.options

-1
This file was deleted.

src/main.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
// limitations under the License.
1515
*/
1616

17+
#include "config.hpp"
1718
#include "manager.hpp"
1819
#include "password.hpp"
1920

@@ -38,7 +39,7 @@ int main()
3839
* Object path : /xyz/openbmc_project/bios_config/manager
3940
* Interface : xyz.openbmc_project.BIOSConfig.Manager
4041
*/
41-
bios_config::Manager manager(objectServer, systemBus);
42+
bios_config::Manager manager(objectServer, systemBus, BIOS_PERSIST_PATH);
4243

4344
/**
4445
* Password class is responsible for handling methods and signals under

src/manager.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -311,12 +311,13 @@ Manager::PendingAttributes Manager::pendingAttributes(PendingAttributes value)
311311
}
312312

313313
Manager::Manager(sdbusplus::asio::object_server& objectServer,
314-
std::shared_ptr<sdbusplus::asio::connection>& systemBus) :
314+
std::shared_ptr<sdbusplus::asio::connection>& systemBus,
315+
std::string persistPath) :
315316
sdbusplus::xyz::openbmc_project::BIOSConfig::server::Manager(
316317
*systemBus, objectPath),
317318
objServer(objectServer), systemBus(systemBus)
318319
{
319-
fs::path biosDir(BIOS_PERSIST_PATH);
320+
fs::path biosDir(persistPath);
320321
fs::create_directories(biosDir);
321322
biosFile = biosDir / biosPersistFile;
322323
deserialize(biosFile, *this);

src/password.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*/
1616
#include "password.hpp"
1717

18+
#include "config.hpp"
1819
#include "xyz/openbmc_project/BIOSConfig/Common/error.hpp"
1920
#include "xyz/openbmc_project/Common/error.hpp"
2021

0 commit comments

Comments
 (0)