From: Dario Faggioli <raistlin@linux.it>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: Christoph Egger <Christoph.Egger@amd.com>,
Roger Pau Monne <roger.pau@citrix.com>,
Ian Jackson <Ian.Jackson@eu.citrix.com>,
"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [PATCH 1 of 1 v5] libxl: introduce LIBXL_DOMAIN_TYPE_INVALID
Date: Wed, 06 Jun 2012 13:15:16 +0200 [thread overview]
Message-ID: <1338981316.6152.37.camel@Solace> (raw)
In-Reply-To: <1338980214.32319.52.camel@zakaz.uk.xensource.com>
[-- Attachment #1.1: Type: text/plain, Size: 1557 bytes --]
On Wed, 2012-06-06 at 11:56 +0100, Ian Campbell wrote:
> On Wed, 2012-06-06 at 11:47 +0100, Ian Jackson wrote:
> > Dario Faggioli writes ("[PATCH 1 of 1 v5] libxl: introduce LIBXL_DOMAIN_TYPE_INVALID"):
> > > To avoid recent gcc complaining about:
> > > libxl.c: In function ‘libxl_primary_console_exec’:
> > > libxl.c:1233:9: error: case value ‘4294967295’ not in enumerated type ‘libxl_domain_type’ [-Werror=switch]
> > ...
> > > + if (type == LIBXL_DOMAIN_TYPE_INVALID) {
> > > + LIBXL__LOG(ctx, LIBXL__LOG_ERROR,
> > > + "invalid domain type for domain %d", domid);
> > > + rc = ERROR_INVAL;
> > > + goto remus_fail;
> >
> > This is not an expected error condition, is it ? ERROR_INVAL is for
> > libxl being passed impromper parameters. So I think this should be
> > ERROR_FAIL.
>
> Also perhaps the logging should be done in libxl__domain_type?
>
That makes sense to me...
> Unless
> there are too many legitimate occasions where INVALID might come up?
>
I might be wrong but I don't think so. There might be some more printing
than with this patch, but mostly before some 'default: abort();'
situation so...
Anyway, I'll do it and try to see how it behaves.
Thanks and Regards,
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
next prev parent reply other threads:[~2012-06-06 11:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-04 17:23 [PATCH 0 of 1 v5] Fix build failure with gcc's -Werror=switch Dario Faggioli
2012-06-04 17:23 ` [PATCH 1 of 1 v5] libxl: introduce LIBXL_DOMAIN_TYPE_INVALID Dario Faggioli
2012-06-06 10:43 ` Ian Jackson
2012-06-06 11:11 ` Dario Faggioli
2012-06-06 10:47 ` Ian Jackson
2012-06-06 10:56 ` Ian Campbell
2012-06-06 11:15 ` Dario Faggioli [this message]
2012-06-06 11:10 ` Dario Faggioli
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=1338981316.6152.37.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.