diff options
author | Max Kellermann <max@duempel.org> | 2009-01-01 18:26:59 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-01-01 18:26:59 +0100 |
commit | 65f037eb323c5229e6655da4f562f7a98fd30eee (patch) | |
tree | 2a85510b75eaee0b44e05b58453b317d00879093 /src/cmdline.c | |
parent | b3e2635ac1d6cb46ae5a41e4c9760127453e49db (diff) | |
download | mpd-65f037eb323c5229e6655da4f562f7a98fd30eee.tar.gz mpd-65f037eb323c5229e6655da4f562f7a98fd30eee.tar.xz mpd-65f037eb323c5229e6655da4f562f7a98fd30eee.zip |
cmdline: exit after --version
Don't start the daemon when MPD is called with "--version".
Diffstat (limited to '')
-rw-r--r-- | src/cmdline.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cmdline.c b/src/cmdline.c index e01521005..35adb2a8d 100644 --- a/src/cmdline.c +++ b/src/cmdline.c @@ -35,6 +35,7 @@ #define SYSTEM_CONFIG_FILE_LOCATION "/etc/mpd.conf" #define USER_CONFIG_FILE_LOCATION ".mpdconf" +G_GNUC_NORETURN static void version(void) { puts(PACKAGE " (MPD: Music Player Daemon) " VERSION " \n" @@ -63,6 +64,8 @@ static void version(void) archive_plugin_init_all(); archive_plugin_print_all_suffixes(stdout); #endif + + exit(EXIT_SUCCESS); } #if GLIB_MAJOR_VERSION > 2 || (GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION >= 12) |