From mboxrd@z Thu Jan 1 00:00:00 1970 From: Goncalo Gomes Subject: [PATCH 4 of 6] xl: move vncviewer function closer to the start of file so it can be seen by create_domain Date: Mon, 7 May 2012 01:20:19 +0000 Message-ID: <0663afbb57f586cea07f.1336353619@dt29.uk.xensource.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xensource.com Cc: ian.campbell@citrix.com List-Id: xen-devel@lists.xenproject.org Signed-off-by: Goncalo Gomes diff -r 497a6061df08 -r 0663afbb57f5 tools/libxl/xl_cmdimpl.c --- a/tools/libxl/xl_cmdimpl.c Mon May 07 01:10:58 2012 +0000 +++ b/tools/libxl/xl_cmdimpl.c Mon May 07 01:10:58 2012 +0000 @@ -186,6 +186,14 @@ static void find_domain(const char *p) common_domname = was_name ? p : libxl_domid_to_name(ctx, domid); } +static int vncviewer(const char *domain_spec, int autopass) +{ + find_domain(domain_spec); + libxl_vncviewer_exec(ctx, domid, autopass); + fprintf(stderr, "Unable to execute vncviewer\n"); + return 1; +} + static int acquire_lock(void) { int rc; @@ -2170,14 +2178,6 @@ int main_console(int argc, char **argv) return 1; } -static int vncviewer(const char *domain_spec, int autopass) -{ - find_domain(domain_spec); - libxl_vncviewer_exec(ctx, domid, autopass); - fprintf(stderr, "Unable to execute vncviewer\n"); - return 1; -} - int main_vncviewer(int argc, char **argv) { static const struct option long_options[] = {