From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH 5 of 6] xl: Add vncviewer options to create and restore Date: Tue, 8 May 2012 11:04:20 +0100 Message-ID: <1336471460.14542.42.camel@zakaz.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: Goncalo Gomes Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On Mon, 2012-05-07 at 02:20 +0100, Goncalo Gomes wrote: > @@ -1734,6 +1739,14 @@ start: > if (!daemonize && !monitor) > goto out; > > + if (vnc || (libxl_defbool_val(d_config.b_info.vncviewer) == 1)) { I think this can be just "if (vnc)", per my previous comment about including this in the libxl API. > + char *domspec = libxl_domid_to_name(ctx, domid); Error out if this fails? But... vncviewer will immediately call "find_domain(domain_spec)" to turn this back into a domid. I think you'd be better to make that function take a domid and pull the find_domain call up into main_vncviewer. > + if (domspec) { > + vncviewer(domspec, vncautopass); > + free(domsec); > + } > + } > + > if (need_daemon) { > char *fullname, *name; > pid_t child1, got_child; Ian.