From: Ian Jackson Subject: Re: [PATCH] xl: create VFB for PV guest when VNC is specified Date: Mon, 16 Dec 2013 17:07:59 +0000 Message-ID: <21167.13167.921354.670449@mariner.uk.xensource.com> References: <1387212158-15338-1-git-send-email-wei.liu2@citrix.com> <1387213054.21086.40.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1387213054.21086.40.camel@kazak.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: Wei Liu , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org Ian Campbell writes ("Re: [PATCH] xl: create VFB for PV guest when VNC is specified"): > I think what Ian was suggesting was a single macro which could expand an > arbitrary array given as a parameter, rather than this, which is pretty > fuggly. e.g. > vfb = ARRAY_EXTEND(d_config->vfbs, d_config->num_vfbs) > or something (making liberal use of typeof() etc). Perhaps even > vfb = ARRAY_EXTEND(d_config, vfbs) > and some cpp token pasting. Exactly. > Once you have that you can use it for both vkb and vfb. > > I think you would be better off skipping the ->devid set, but if you > want to keep it you'd want to call it something more suitable like > NEW_DEVICE() perhaps. > > You don't need to use the new macro everywhere right now during code > freeze but we can flip everything in 4.5. Right. > > @@ -1608,6 +1624,47 @@ skip_vfb: > > > > #undef parse_extra_args > > > > +#define parse_top_level_vnc_options(enable,listen,passwd,display,unused) \ > > I think this could be a function, which is would be preferable to a > macro if possible. Absolutely. Ian.