From: Dario Faggioli <raistlin@linux.it>
To: Roger Pau Monne <roger.pau@citrix.com>
Cc: Christoph Egger <Christoph.Egger@amd.com>,
Ian Jackson <Ian.Jackson@eu.citrix.com>,
Ian Campbell <Ian.Campbell@citrix.com>,
"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [PATCH v2] libxl: introduce LIBXL_DOMAIN_TYPE_INVALID
Date: Thu, 24 May 2012 14:51:21 +0200 [thread overview]
Message-ID: <1337863881.13601.27.camel@Solace> (raw)
In-Reply-To: <4FBE1AEE.8000003@citrix.com>
[-- Attachment #1.1: Type: text/plain, Size: 1756 bytes --]
On Thu, 2012-05-24 at 12:26 +0100, Roger Pau Monne wrote:
> Thanks for the patch I've tried it and works ok, so the below comment is
> just a suggestion about error handling.
>
Cool. :-)
> > Signed-off-by: Dario Faggioli<dario.faggioli@citrix.com>
> > Signed-off-by: Christoph Egger<Christoph.Egger@amd.com>
> > --- a/tools/libxl/libxl_dm.c
> > +++ b/tools/libxl/libxl_dm.c
> > @@ -257,6 +257,8 @@ static char ** libxl__build_device_model
> > for (i = 0; b_info->extra_hvm&& b_info->extra_hvm[i] != NULL; i++)
> > flexarray_append(dm_args, b_info->extra_hvm[i]);
> > break;
> > + case LIBXL_DOMAIN_TYPE_INVALID:
> > + break;
> > }
> > flexarray_append(dm_args, NULL);
> > return (char **) flexarray_contents(dm_args);
> > @@ -505,6 +507,8 @@ static char ** libxl__build_device_model
> > for (i = 0; b_info->extra_hvm&& b_info->extra_hvm[i] != NULL; i++)
> > flexarray_append(dm_args, b_info->extra_hvm[i]);
> > break;
> > + case LIBXL_DOMAIN_TYPE_INVALID:
> > + break;
> > }
>
> I think we should use "default" here (and on the previous one), print an
> error message, and probably return NULL. I guess we are going to get an
> error at some point later, so I think it's better to catch it here.
>
I agree and, as it was the first time I saw that file/code, so I totally
you on this! :-P
Will repost right now.
Thanks,
Dario
--
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://retis.sssup.it/people/faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
prev parent reply other threads:[~2012-05-24 12:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-23 15:27 [PATCH v2] libxl: introduce LIBXL_DOMAIN_TYPE_INVALID Dario Faggioli
2012-05-24 11:26 ` Roger Pau Monne
2012-05-24 12:51 ` Dario Faggioli [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=1337863881.13601.27.camel@Solace \
--to=raistlin@linux.it \
--cc=Christoph.Egger@amd.com \
--cc=Ian.Campbell@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=roger.pau@citrix.com \
--cc=xen-devel@lists.xen.org \
/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.