[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] make domain_create() return a proper error code
On Mon, 2012-09-03 at 07:57 +0100, Jan Beulich wrote: > While triggered by the XSA-9 fix, this really is of more general use; > that fix just pointed out very sharply that the current situation > with all domain creation failures reported to user (tools) space as > -ENOMEM is very unfortunate (actively misleading users _and_ support > personnel). > > Pull over the pointer <-> error code conversion infrastructure from > Linux, and use it in domain_create() and all it callers. > > Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> > > --- a/xen/arch/arm/setup.c > +++ b/xen/arch/arm/setup.c > @@ -26,6 +26,7 @@ > #include <xen/serial.h> > #include <xen/sched.h> > #include <xen/console.h> > +#include <xen/err.h> > #include <xen/init.h> > #include <xen/irq.h> > #include <xen/mm.h> > @@ -237,7 +238,7 @@ void __init start_xen(unsigned long boot > > /* Create initial domain 0. */ > dom0 = domain_create(0, 0, 0); > - if ( dom0 == NULL ) > + if ( IS_ERR(dom0) ) > printk("domain_create failed\n"); > if ( (dom0 == NULL) || (alloc_dom0_vcpu0() == NULL) ) You probably wanted to change this one too? I'm not sure the first message really buys much -- I'd be happy to nuke it too. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |