make domain_create() return a proper error code
authorJan Beulich <jbeulich@suse.com>
Mon, 3 Sep 2012 07:40:38 +0000 (09:40 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 3 Sep 2012 07:40:38 +0000 (09:40 +0200)
commit8e66050e3223a9aa55ca29ec32b2e78c3e69e085
tree22bf4997c2366565228de8bb0a31c0eaf4873be5
parentf1297904185f73262522b6277252bfb699644766
make domain_create() return a proper error code

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@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
xen/arch/arm/setup.c
xen/arch/x86/mm.c
xen/arch/x86/setup.c
xen/common/cpupool.c
xen/common/domain.c
xen/common/domctl.c
xen/common/schedule.c
xen/include/xen/err.h [new file with mode: 0644]