CommandLine: rename struct options

This commit is contained in:
Max Kellermann 2021-11-05 08:56:28 +01:00
parent 23d4a2d6a5
commit 8754d705a1
3 changed files with 8 additions and 7 deletions

View File

@ -334,7 +334,7 @@ bool ConfigLoader::TryFile(const AllocatedPath &base_path, Path path)
} }
void void
ParseCommandLine(int argc, char **argv, struct options &options, ParseCommandLine(int argc, char **argv, CommandLineOptions &options,
ConfigData &config) ConfigData &config)
{ {
bool use_config_file = true; bool use_config_file = true;

View File

@ -22,7 +22,7 @@
struct ConfigData; struct ConfigData;
struct options { struct CommandLineOptions {
bool kill = false; bool kill = false;
bool daemon = true; bool daemon = true;
@ -35,7 +35,7 @@ struct options {
}; };
void void
ParseCommandLine(int argc, char **argv, struct options &options, ParseCommandLine(int argc, char **argv, CommandLineOptions &options,
ConfigData &config); ConfigData &config);
#endif #endif

View File

@ -142,7 +142,7 @@ struct Config {
#ifdef ENABLE_DAEMON #ifdef ENABLE_DAEMON
static void static void
glue_daemonize_init(const struct options &options, glue_daemonize_init(const CommandLineOptions &options,
const ConfigData &config) const ConfigData &config)
{ {
daemonize_init(config.GetString(ConfigOption::USER), daemonize_init(config.GetString(ConfigOption::USER),
@ -361,7 +361,8 @@ Instance::BeginShutdownPartitions() noexcept
} }
static inline void static inline void
MainConfigured(const struct options &options, const ConfigData &raw_config) MainConfigured(const CommandLineOptions &options,
const ConfigData &raw_config)
{ {
#ifdef ENABLE_DAEMON #ifdef ENABLE_DAEMON
daemonize_close_stdin(); daemonize_close_stdin();
@ -582,7 +583,7 @@ MainConfigured(const struct options &options, const ConfigData &raw_config)
static void static void
AndroidMain() AndroidMain()
{ {
struct options options; CommandLineOptions options;
ConfigData raw_config; ConfigData raw_config;
const auto sdcard = Environment::getExternalStorageDirectory(); const auto sdcard = Environment::getExternalStorageDirectory();
@ -642,7 +643,7 @@ Java_org_musicpd_Bridge_pause(JNIEnv *, jclass)
static inline void static inline void
MainOrThrow(int argc, char *argv[]) MainOrThrow(int argc, char *argv[])
{ {
struct options options; CommandLineOptions options;
ConfigData raw_config; ConfigData raw_config;
ParseCommandLine(argc, argv, options, raw_config); ParseCommandLine(argc, argv, options, raw_config);