From: Fabio Fantoni <fabio.fantoni@heliman.it>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
Ian Jackson <Ian.Jackson@eu.citrix.com>,
Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>,
"fantonifabio@tiscali.it" <fantonifabio@tiscali.it>
Subject: Re: [PATCH] tools/libxl: Added vga parameter for hvm domUs
Date: Mon, 18 Feb 2013 11:51:10 +0100 [thread overview]
Message-ID: <5122079E.1090600@heliman.it> (raw)
In-Reply-To: <1361182012.31407.122.camel@zakaz.uk.xensource.com>
Il 18/02/2013 11:06, Ian Campbell ha scritto:
> On Fri, 2013-02-15 at 21:54 +0000, Fabio Fantoni wrote:
>> Il 15/02/2013 16:48, Ian Jackson ha scritto:
>>> fantonifabio@tiscali.it writes ("[Xen-devel] [PATCH] tools/libxl: Added vga parameter for hvm domUs"):
>>>> From: Fabio Fantoni <fabio.fantoni@heliman.it>
>>>>
>>>> Usage:
>>>> vga="stdvga"|"cirrus"
>>>>
>>>> - Default option is cirrus.
>>>> - Prints error and exit if unknown value is passed.
>>>> - stdvga parameter is now deprecated.
>>>> - Updated xl.cfg man.
>>>>
>>>> Required patch: Improve videoram setting v5
>>>> Is prerequisite for patch: Add qxl support v9
>>> The code looks good to me, but there are a couple of formatting
>>> problems. Your wrapping of the longer lines is odd (particularly, you
>>> fail to indent the continuations), and there's a spurious space after
>>> xlu_cfg_get_string. Can you please repost following the style used
>>> elsewhere ?
>>>
>>> Thanks,
>>> Ian.
>> Sorry.
>> Can you explain me the error of indentation did I do please?
> The spurious space after xlu_cfg_get_string, e.g.
> xlu_cfg_get_string (config,
> should have been
> xlu_cfg_get_string(config,
>
> However, I count 44 instances with the space and 3 without in this file,
> so I think you can be forgiven. This extra space has been there from day
> one...
>
> The more important one IMHO is:
>
> + if (!strcmp(buf, "stdvga")) {
> + b_info->u.hvm.vga.kind
> + = LIBXL_VGA_INTERFACE_TYPE_STD;
>
> I noticed this when I reviewed but when I looked at the file I concluded
> you were just copying a prevailing style so I let it slide. Looking
> again I think I was looking at the file with this patch applied, which
> makes that logic rather circular ;-)
>
> It seems like you were trying to avoid going over the 80 column limit,
> although in this case it doesn't seem like the line would actually be
> that long. If wrapping is required then it would be more normal to
> indent as:
>
> + if (!strcmp(buf, "stdvga")) {
> + b_info->u.hvm.vga.kind
> + = LIBXL_VGA_INTERFACE_TYPE_STD;
>
> (i.e indent the wrapped line by one level). However given that all these
> things fit on one line using at most 72 columns:
>
> 8<------
> xl: fix line wrapping oddness
>
> These lines are strangely wrapped and in any case fit within 80 columns
> when unwrapped.
>
> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
>
> diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
> index 003b129..a80cda6 100644
> --- a/tools/libxl/xl_cmdimpl.c
> +++ b/tools/libxl/xl_cmdimpl.c
> @@ -1476,14 +1476,11 @@ skip_vfb:
> if (c_info->type == LIBXL_DOMAIN_TYPE_HVM) {
> if (!xlu_cfg_get_string (config, "vga", &buf, 0)) {
> if (!strcmp(buf, "stdvga")) {
> - b_info->u.hvm.vga.kind
> - = LIBXL_VGA_INTERFACE_TYPE_STD;
> + b_info->u.hvm.vga.kind = LIBXL_VGA_INTERFACE_TYPE_STD;
> } else if (!strcmp(buf, "cirrus")) {
> - b_info->u.hvm.vga.kind
> - = LIBXL_VGA_INTERFACE_TYPE_CIRRUS;
> + b_info->u.hvm.vga.kind = LIBXL_VGA_INTERFACE_TYPE_CIRRUS;
> } else {
> - fprintf(stderr,
> - "Unknown vga \"%s\" specified\n", buf);
> + fprintf(stderr, "Unknown vga \"%s\" specified\n", buf);
> exit(1);
> }
> } else if (!xlu_cfg_get_long(config, "stdvga", &l, 0))
>
>
>
>
Sorry for my coding style errors, I saw this mail only after posting v10
of qxl patch, I'll do v11 after posting your coding style fix.
prev parent reply other threads:[~2013-02-18 10:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-11 10:57 [PATCH] tools/libxl: Added vga parameter for hvm domUs fantonifabio
2013-02-15 12:26 ` Stefano Stabellini
2013-02-15 13:45 ` Ian Campbell
2013-02-15 15:48 ` Ian Jackson
2013-02-15 16:00 ` Ian Campbell
2013-02-15 21:54 ` Fabio Fantoni
2013-02-18 10:06 ` Ian Campbell
2013-02-18 10:51 ` Fabio Fantoni [this message]
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=5122079E.1090600@heliman.it \
--to=fabio.fantoni@heliman.it \
--cc=Ian.Campbell@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=Stefano.Stabellini@eu.citrix.com \
--cc=fantonifabio@tiscali.it \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.