diff options
author | William Jon McCann <jmccann@redhat.com> | 2008-04-01 00:05:10 +0000 |
---|---|---|
committer | William Jon McCann <mccann@src.gnome.org> | 2008-04-01 00:05:10 +0000 |
commit | 7f6f613d315e72918dff68e9cee387adf354139b (patch) | |
tree | 509b627a47eec15cf4b5dff972b79f8f61470eff /utils | |
parent | 3e35dc69f6aad546332107261838b40adf428ae4 (diff) | |
download | gdm-7f6f613d315e72918dff68e9cee387adf354139b.tar.gz |
Add --version command line option.
2008-03-31 William Jon McCann <jmccann@redhat.com>
* utils/gdmflexiserver.c: (main):
Add --version command line option.
svn path=/trunk/; revision=6083
Diffstat (limited to 'utils')
-rw-r--r-- | utils/gdmflexiserver.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/utils/gdmflexiserver.c b/utils/gdmflexiserver.c index e57f6436..cfebea36 100644 --- a/utils/gdmflexiserver.c +++ b/utils/gdmflexiserver.c @@ -52,6 +52,7 @@ static gboolean debug_in = FALSE; static gboolean authenticate = FALSE; static gboolean startnew = FALSE; static gboolean monte_carlo_pi = FALSE; +static gboolean show_version = FALSE; static char **args_remaining = NULL; /* Keep all config options for compatibility even if they are noops */ @@ -63,6 +64,7 @@ GOptionEntry options [] = { { "authenticate", 'a', 0, G_OPTION_ARG_NONE, &authenticate, N_("Authenticate before running --command"), NULL }, { "startnew", 's', 0, G_OPTION_ARG_NONE, &startnew, N_("Start new flexible session; do not show popup"), NULL }, { "monte-carlo-pi", 0, 0, G_OPTION_ARG_NONE, &monte_carlo_pi, NULL, NULL }, + { "version", 0, 0, G_OPTION_ARG_NONE, &show_version, N_("Version of this application"), NULL }, { G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_STRING_ARRAY, &args_remaining, NULL, NULL }, { NULL } }; @@ -690,6 +692,12 @@ main (int argc, char *argv[]) g_option_context_parse (ctx, &argc, &argv, NULL); g_option_context_free (ctx); + + if (show_version) { + g_print ("%s %s\n", argv [0], VERSION); + exit (1); + } + /* don't support commands */ if (send_command != NULL) { g_warning ("No longer supported"); |