aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-09-20 23:31:35 +0200
committerMax Kellermann <max@duempel.org>2009-09-20 23:31:35 +0200
commita86f9b80357e30823ce9d3d486adcf4cd4e781dc (patch)
tree6bbe109a30b5ad7483514df2a477c79991e30c3a /src/main.c
parent32f212cb860d5cd91e952e4802c151101cc9c8c0 (diff)
downloadmpd-a86f9b80357e30823ce9d3d486adcf4cd4e781dc.tar.gz
mpd-a86f9b80357e30823ce9d3d486adcf4cd4e781dc.tar.xz
mpd-a86f9b80357e30823ce9d3d486adcf4cd4e781dc.zip
cmdline: removed options --create-db and --no-create-db
Both options are deprecated, and should not be used anymore. Many users get confused by their presence.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/main.c b/src/main.c
index f7b3d2979..a0385733c 100644
--- a/src/main.c
+++ b/src/main.c
@@ -123,7 +123,7 @@ glue_mapper_init(void)
* process has been daemonized.
*/
static bool
-glue_db_init_and_load(const struct options *options)
+glue_db_init_and_load(void)
{
const char *path = config_get_path(CONF_DB_FILE);
bool ret;
@@ -142,19 +142,11 @@ glue_db_init_and_load(const struct options *options)
db_init(path);
- if (options->create_db > 0)
- /* don't attempt to load the old database */
- return false;
-
ret = db_load(&error);
if (!ret) {
g_warning("Failed to load database: %s", error->message);
g_error_free(error);
- if (options->create_db < 0)
- g_error("can't open db file and using "
- "\"--no-create-db\" command line option");
-
if (!db_check())
exit(EXIT_FAILURE);
@@ -331,7 +323,7 @@ int main(int argc, char *argv[])
decoder_plugin_init_all();
update_global_init();
- create_db = !glue_db_init_and_load(&options);
+ create_db = !glue_db_init_and_load();
glue_sticker_init();
@@ -356,8 +348,8 @@ int main(int argc, char *argv[])
player_create();
if (create_db) {
- /* the database failed to load, or MPD was started
- with --create-db: recreate a new database */
+ /* the database failed to load: recreate the
+ database */
unsigned job = directory_update_init(NULL);
if (job == 0)
g_error("directory update failed");