aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAvuton Olrich <avuton@gmail.com>2009-02-25 15:30:52 -0800
committerAvuton Olrich <avuton@gmail.com>2009-02-25 15:30:52 -0800
commitde075474268d07a8a3232b4ab817181072ef3515 (patch)
tree9f92c66d6677995026a0705fdd0adee9b37bd6cb /src
parenta4cf7b7dfd303d8f36cef7ba0b5da7f7e4d0bba6 (diff)
downloadmpd-de075474268d07a8a3232b4ab817181072ef3515.tar.gz
mpd-de075474268d07a8a3232b4ab817181072ef3515.tar.xz
mpd-de075474268d07a8a3232b4ab817181072ef3515.zip
cmdline: Add --no-config to explicitly set daemon default options.
Diffstat (limited to '')
-rw-r--r--src/cmdline.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/cmdline.c b/src/cmdline.c
index 43fe46de0..23b61609f 100644
--- a/src/cmdline.c
+++ b/src/cmdline.c
@@ -81,7 +81,8 @@ void parseOptions(int argc, char **argv, Options *options)
GOptionContext *context;
bool ret;
static gboolean option_version,
- option_create_db, option_no_create_db, option_no_daemon;
+ option_create_db, option_no_create_db, option_no_daemon,
+ option_no_config;
const GOptionEntry entries[] = {
{ "version", 'V', 0, G_OPTION_ARG_NONE, &option_version,
"print version number", NULL },
@@ -97,6 +98,8 @@ void parseOptions(int argc, char **argv, Options *options)
"print messages to stderr", NULL },
{ "verbose", 'v', 0, G_OPTION_ARG_NONE, &options->verbose,
"verbose logging", NULL },
+ { "no-config", 0, 0, G_OPTION_ARG_NONE, &option_no_config,
+ "don't read from config", NULL },
{ .long_name = NULL }
};
@@ -138,7 +141,9 @@ void parseOptions(int argc, char **argv, Options *options)
options->daemon = !option_no_daemon;
- if (argc <= 1) {
+ if (option_no_config) {
+ g_debug("Ignoring config, using daemon defaults\n");
+ } else if (argc <= 1) {
/* default configuration file path */
char *path1;
char *path2;