From: ZhouPeng <zpengxen@gmail.com>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: "Xen-Devel (E-mail)" <xen-devel@lists.xensource.com>,
Ian Jackson <Ian.Jackson@eu.citrix.com>,
Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>
Subject: Re: [PATCH 1/3] libxl:refactor stdvga option support v2
Date: Thu, 28 Jun 2012 09:42:08 +0800 [thread overview]
Message-ID: <CAAh7U5MXH+M-wgCW4dHUsSFsTux_wA=QARR_uZugHyL9rs3ejA@mail.gmail.com> (raw)
In-Reply-To: <1340810891.29172.50.camel@zakaz.uk.xensource.com>
On Wed, Jun 27, 2012 at 11:28 PM, Ian Campbell <Ian.Campbell@citrix.com> wrote:
>> diff -r 592d15bd4d5e tools/libxl/xl_cmdimpl.c
>> --- a/tools/libxl/xl_cmdimpl.c Fri May 18 16:19:21 2012 +0100
>> +++ b/tools/libxl/xl_cmdimpl.c Wed Jun 27 20:06:39 2012 +0800
>> @@ -1256,7 +1256,10 @@ skip_vfb:
>> #undef parse_extra_args
>>
>> if (c_info->type == LIBXL_DOMAIN_TYPE_HVM) {
>> - xlu_cfg_get_defbool(config, "stdvga", &b_info->u.hvm.stdvga, 0);
>> + if (!xlu_cfg_get_long(config, "stdvga", &l, 0))
>> + if (l)
>> + b_info->u.hvm.vga.kind = LIBXL_VGA_INTERFACE_TYPE_STD;
>
> I think this needs to be:
> if (!xlu_cfg_get_long(config, "stdvga", &l, 0))
> b_info->u.hvm.vga.kind = l ? \
> LIBXL_VGA_INTERFACE_TYPE_STD : \
> LIBXL_VGA_INTERFACE_TYPE_CIRRUS;
>
> so that both "stdvga=0" and "stdvga=1" result in what the user asked for
> without relying on the libxl default remaining CIRRUS.
IMHO, this make simple to be complex.
I think the check and set-default later in libxl_create.c as a whole is enough.
+ if (!b_info->u.hvm.vga.kind)
+ b_info->u.hvm.vga.kind = LIBXL_VGA_INTERFACE_TYPE_CIRRUS;
'as a whole' here, I means if more vga type added in the future, we
don't need to set the default
one by one, redundantly.
> Ian.
>
--
Zhou Peng
next prev parent reply other threads:[~2012-06-28 1:42 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-05 11:19 [PATCH 1/3] libxl:refactor stdvga option support v2 ZhouPeng
2012-06-06 10:50 ` Ian Jackson
2012-06-06 11:10 ` ZhouPeng
2012-06-06 11:47 ` Ian Campbell
2012-06-07 2:34 ` ZhouPeng
2012-06-20 18:38 ` Ian Campbell
2012-06-27 12:16 ` ZhouPeng
2012-06-27 15:28 ` Ian Campbell
2012-06-28 1:42 ` ZhouPeng [this message]
2012-06-28 5:33 ` Ian Campbell
2012-06-28 7:56 ` ZhouPeng
2012-06-28 8:40 ` Ian Campbell
2012-06-29 16:32 ` Ian Jackson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAAh7U5MXH+M-wgCW4dHUsSFsTux_wA=QARR_uZugHyL9rs3ejA@mail.gmail.com' \
--to=zpengxen@gmail.com \
--cc=Ian.Campbell@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=Stefano.Stabellini@eu.citrix.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).