From: Ingo Molnar Subject: Re: [PATCH 5/5] kvm tools: Initialize and use VESA and VNC Date: Mon, 23 May 2011 11:32:16 +0200 Message-ID: <20110523093216.GA28562@elte.hu> References: <1306140291-17493-1-git-send-email-levinsasha928@gmail.com> <1306140291-17493-5-git-send-email-levinsasha928@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: penberg@kernel.org, john@jfloren.net, kvm@vger.kernel.org, asias.hejun@gmail.com, gorcunov@gmail.com, prasadjoshi124@gmail.com To: Sasha Levin Return-path: Received: from mx2.mail.elte.hu ([157.181.151.9]:42065 "EHLO mx2.mail.elte.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751649Ab1EWJc1 (ORCPT ); Mon, 23 May 2011 05:32:27 -0400 Content-Disposition: inline In-Reply-To: <1306140291-17493-5-git-send-email-levinsasha928@gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: * Sasha Levin wrote: > @@ -598,6 +608,13 @@ int kvm_cmd_run(int argc, const char **argv, const char *prefix) > > kvm__init_ram(kvm); > > + if (vnc) { > + pthread_t thread; > + > + vesa__init(kvm); > + pthread_create(&thread, NULL, vesa__dovnc, kvm); > + } > + This should be encapsulated better, it should probably be all be done within vesa__init() and the only kv_cmd_run() exposure should be: vesa__init(kvm); vesa__init() would wrap to an empty inline function if the library prereqs are not present. Thanks, Ingo