Commit 9f0f4e36 authored by Zeeshan Ali's avatar Zeeshan Ali

main: Add --version cmdline option

parent 3ec26a43
......@@ -30,10 +30,18 @@
#define BUS_NAME "org.freedesktop.GeoClue2"
/* Commandline options */
static gboolean version;
static gint inactivity_timeout = 0;
static GOptionEntry entries[] =
{
{ "version",
0,
0,
G_OPTION_ARG_NONE,
&version,
N_("Display version number"),
NULL },
{ "timeout",
't',
0,
......@@ -138,6 +146,11 @@ main (int argc, char **argv)
exit (-1);
}
if (version) {
g_print ("%s\n", PACKAGE_VERSION);
exit (0);
}
owner_id = g_bus_own_name (G_BUS_TYPE_SYSTEM,
BUS_NAME,
G_BUS_NAME_OWNER_FLAGS_NONE,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment