xl: call libxl_vncviewer_exec in main_vncviewer
authorWei Liu <wei.liu2@citrix.com>
Mon, 27 Feb 2017 17:35:32 +0000 (17:35 +0000)
committerWei Liu <wei.liu2@citrix.com>
Tue, 28 Feb 2017 10:40:07 +0000 (10:40 +0000)
We will need to move main_vncviewer to a different file where it has no
access to the helper vncviewer.

Call libxl_vncviewer_exec directly.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/xl/xl_cmdimpl.c

index 26fd4ab0f56f53e65f53b9c2408ec3f29c995fdd..a42b972d60f6038a06f167f5064da1ca35067587 100644 (file)
@@ -1120,9 +1120,10 @@ int main_vncviewer(int argc, char **argv)
 
     domid = find_domain(argv[optind]);
 
-    if (vncviewer(domid, autopass))
-        return EXIT_FAILURE;
-    return EXIT_SUCCESS;
+    libxl_vncviewer_exec(ctx, domid, autopass);
+    fprintf(stderr, "Unable to execute vncviewer\n");
+
+    return EXIT_FAILURE;
 }
 
 static void pause_domain(uint32_t domid)