cmdline: exit after --version

Don't start the daemon when MPD is called with "--version".
This commit is contained in:
Max Kellermann
2009-01-01 18:26:59 +01:00
parent b3e2635ac1
commit 65f037eb32

View File

@@ -35,6 +35,7 @@
#define SYSTEM_CONFIG_FILE_LOCATION "/etc/mpd.conf" #define SYSTEM_CONFIG_FILE_LOCATION "/etc/mpd.conf"
#define USER_CONFIG_FILE_LOCATION ".mpdconf" #define USER_CONFIG_FILE_LOCATION ".mpdconf"
G_GNUC_NORETURN
static void version(void) static void version(void)
{ {
puts(PACKAGE " (MPD: Music Player Daemon) " VERSION " \n" puts(PACKAGE " (MPD: Music Player Daemon) " VERSION " \n"
@@ -63,6 +64,8 @@ static void version(void)
archive_plugin_init_all(); archive_plugin_init_all();
archive_plugin_print_all_suffixes(stdout); archive_plugin_print_all_suffixes(stdout);
#endif #endif
exit(EXIT_SUCCESS);
} }
#if GLIB_MAJOR_VERSION > 2 || (GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION >= 12) #if GLIB_MAJOR_VERSION > 2 || (GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION >= 12)