add cmd line option for server vnc port
[ovirt-viewer.git] / main.c
diff --git a/main.c b/main.c
index 23af6fa..dd26c93 100644 (file)
--- a/main.c
+++ b/main.c
@@ -75,6 +75,7 @@ static GSList *vmlist = NULL;
 /*  internal.h shared constructs */
 const char* hostname;
 struct vm* vm_in_focus;
+int ovirt_server_vnc_port = 5900;
 
 /* Private functions. */
 static void start_ui (void);
@@ -200,6 +201,8 @@ static const char *help_msg =
   "Use '" PACKAGE " --help' to see a list of available command line options";
 
 static const GOptionEntry options[] = {
+  { "port", 'p', 0, G_OPTION_ARG_INT, &ovirt_server_vnc_port,
+    "set port which to connect to server via vnc", NULL },
   { "cainfo", 0, 0, G_OPTION_ARG_STRING, &cainfo,
     "set the path of the CA certificate bundle", NULL },
   { "check-certificate", 0, 0, G_OPTION_ARG_NONE, &check_cert,