Commit 3a4a430f authored by Max Kellermann's avatar Max Kellermann

fs/Config: use struct ConfigData

parent 36db40b2
...@@ -547,7 +547,7 @@ try { ...@@ -547,7 +547,7 @@ try {
static int static int
mpd_main_after_fork(const ConfigData &raw_config, const Config &config) mpd_main_after_fork(const ConfigData &raw_config, const Config &config)
try { try {
ConfigureFS(); ConfigureFS(raw_config);
glue_mapper_init(raw_config); glue_mapper_init(raw_config);
......
...@@ -20,15 +20,17 @@ ...@@ -20,15 +20,17 @@
#include "config.h" #include "config.h"
#include "Config.hxx" #include "Config.hxx"
#include "Charset.hxx" #include "Charset.hxx"
#include "config/Global.hxx" #include "config/Data.hxx"
void void
ConfigureFS() ConfigureFS(const ConfigData &config)
{ {
#ifdef HAVE_FS_CHARSET #ifdef HAVE_FS_CHARSET
const char *charset = config_get_string(ConfigOption::FS_CHARSET); const char *charset = config.GetString(ConfigOption::FS_CHARSET);
if (charset != nullptr) if (charset != nullptr)
SetFSCharset(charset); SetFSCharset(charset);
#else
(void)config;
#endif #endif
} }
......
...@@ -22,13 +22,15 @@ ...@@ -22,13 +22,15 @@
#include "check.h" #include "check.h"
struct ConfigData;
/** /**
* Performs global one-time initialization of this class. * Performs global one-time initialization of this class.
* *
* Throws std::runtime_error on error. * Throws std::runtime_error on error.
*/ */
void void
ConfigureFS(); ConfigureFS(const ConfigData &config);
void void
DeinitFS(); DeinitFS();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment