diff options
author | Roger Pau Monne <roger.pau@citrix.com> | 2012-05-11 18:59:03 +0100 |
---|---|---|
committer | Roger Pau Monne <roger.pau@citrix.com> | 2012-05-11 18:59:03 +0100 |
commit | 456639bbab924d8641dbca4468ac8998428c3e92 (patch) | |
tree | 0393971beff6f9ffc29a7a25e66367182ac53df3 /tools/libxl/libxl_create.c | |
parent | 0a69ea908d2e368b1abdefece32913b047bff958 (diff) | |
download | xen-456639bbab924d8641dbca4468ac8998428c3e92.tar.gz xen-456639bbab924d8641dbca4468ac8998428c3e92.tar.bz2 xen-456639bbab924d8641dbca4468ac8998428c3e92.zip |
libxl: set guest_domid even if libxl__domain_make fails
This is needed in order to perform the domain destruction if
libxl__domain_make fails.
Also move doc comment about error behaviour of libxl__domain_make from
implementation to declaration.
Signed-off-by: Roger Pau Monne <roger.pau@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Diffstat (limited to 'tools/libxl/libxl_create.c')
-rw-r--r-- | tools/libxl/libxl_create.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c index 9ce107a689..50755379fa 100644 --- a/tools/libxl/libxl_create.c +++ b/tools/libxl/libxl_create.c @@ -396,8 +396,6 @@ out: int libxl__domain_make(libxl__gc *gc, libxl_domain_create_info *info, uint32_t *domid) - /* on entry, libxl_domid_valid_guest(domid) must be false; - * on exit (even error exit), domid may be valid and refer to a domain */ { libxl_ctx *ctx = libxl__gc_owner(gc); int flags, ret, rc; @@ -600,6 +598,7 @@ static void initiate_domain_create(libxl__egc *egc, ret = libxl__domain_make(gc, &d_config->c_info, &domid); if (ret) { LIBXL__LOG(ctx, LIBXL__LOG_ERROR, "cannot make domain: %d", ret); + dcs->guest_domid = domid; ret = ERROR_FAIL; goto error_out; } |