[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] libxl: remove force parameter from libxl_domain_destroy
# HG changeset patch # User Roger Pau Monne <roger.pau@xxxxxxxxxxxxx> # Date 1323971746 -3600 # Node ID 19c84db90a02659497f91f827a927c031a6304b7 # Parent 9af0490f8910ce93a4d48338386b5c859949e35b libxl: remove force parameter from libxl_domain_destroy Since a destroy is considered a forced shutdown, there's no point in passing a force parameter. All the occurences of this function have been replaced with the proper syntax. Signed-off-by: Roger Pau Monne <roger.pau@xxxxxxxxxxxxx> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com> Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> --- diff -r 9af0490f8910 -r 19c84db90a02 tools/libxl/libxl.c --- a/tools/libxl/libxl.c Thu Dec 15 18:55:46 2011 +0100 +++ b/tools/libxl/libxl.c Thu Dec 15 18:55:46 2011 +0100 @@ -723,7 +723,7 @@ return 1; } -int libxl_domain_destroy(libxl_ctx *ctx, uint32_t domid, int force) +int libxl_domain_destroy(libxl_ctx *ctx, uint32_t domid) { GC_INIT(ctx); libxl_dominfo dominfo; @@ -772,7 +772,7 @@ libxl__qmp_cleanup(gc, domid); } - if (libxl__devices_destroy(gc, domid, force) < 0) + if (libxl__devices_destroy(gc, domid, 1) < 0) LIBXL__LOG(ctx, LIBXL__LOG_ERROR, "libxl__devices_destroy failed for %d", domid); diff -r 9af0490f8910 -r 19c84db90a02 tools/libxl/libxl.h --- a/tools/libxl/libxl.h Thu Dec 15 18:55:46 2011 +0100 +++ b/tools/libxl/libxl.h Thu Dec 15 18:55:46 2011 +0100 @@ -269,7 +269,7 @@ uint32_t domid, int fd); int libxl_domain_resume(libxl_ctx *ctx, uint32_t domid); int libxl_domain_shutdown(libxl_ctx *ctx, uint32_t domid, int req); -int libxl_domain_destroy(libxl_ctx *ctx, uint32_t domid, int force); +int libxl_domain_destroy(libxl_ctx *ctx, uint32_t domid); int libxl_domain_preserve(libxl_ctx *ctx, uint32_t domid, libxl_domain_create_info *info, const char *name_suffix, libxl_uuid new_uuid); /* get max. number of cpus supported by hypervisor */ diff -r 9af0490f8910 -r 19c84db90a02 tools/libxl/libxl_create.c --- a/tools/libxl/libxl_create.c Thu Dec 15 18:55:46 2011 +0100 +++ b/tools/libxl/libxl_create.c Thu Dec 15 18:55:46 2011 +0100 @@ -662,7 +662,7 @@ error_out: if (domid) - libxl_domain_destroy(ctx, domid, 0); + libxl_domain_destroy(ctx, domid); return ret; } diff -r 9af0490f8910 -r 19c84db90a02 tools/libxl/libxl_dm.c --- a/tools/libxl/libxl_dm.c Thu Dec 15 18:55:46 2011 +0100 +++ b/tools/libxl/libxl_dm.c Thu Dec 15 18:55:46 2011 +0100 @@ -938,7 +938,7 @@ goto out; } LIBXL__LOG(ctx, LIBXL__LOG_DEBUG, "Device model is a stubdom, domid=%d", stubdomid); - ret = libxl_domain_destroy(ctx, stubdomid, 0); + ret = libxl_domain_destroy(ctx, stubdomid); if (ret) goto out; diff -r 9af0490f8910 -r 19c84db90a02 tools/libxl/xl_cmdimpl.c --- a/tools/libxl/xl_cmdimpl.c Thu Dec 15 18:55:46 2011 +0100 +++ b/tools/libxl/xl_cmdimpl.c Thu Dec 15 18:55:46 2011 +0100 @@ -1283,7 +1283,7 @@ /* fall-through */ case LIBXL_ACTION_ON_SHUTDOWN_DESTROY: LOG("Domain %d needs to be cleaned up: destroying the domain", domid); - libxl_domain_destroy(ctx, domid, 0); + libxl_domain_destroy(ctx, domid); break; case LIBXL_ACTION_ON_SHUTDOWN_COREDUMP_DESTROY: @@ -1786,7 +1786,7 @@ error_out: release_lock(); if (libxl_domid_valid_guest(domid)) - libxl_domain_destroy(ctx, domid, 0); + libxl_domain_destroy(ctx, domid); out: if (logfile != 2) @@ -2256,7 +2256,7 @@ fprintf(stderr, "Cannot destroy privileged domain 0.\n\n"); exit(-1); } - rc = libxl_domain_destroy(ctx, domid, 0); + rc = libxl_domain_destroy(ctx, domid); if (rc) { fprintf(stderr,"destroy failed (rc=%d)\n",rc); exit(-1); } } @@ -2502,7 +2502,7 @@ if (checkpoint) libxl_domain_unpause(ctx, domid); else - libxl_domain_destroy(ctx, domid, 0); + libxl_domain_destroy(ctx, domid); exit(0); } @@ -2735,7 +2735,7 @@ } fprintf(stderr, "migration sender: Target reports successful startup.\n"); - libxl_domain_destroy(ctx, domid, 1); /* bang! */ + libxl_domain_destroy(ctx, domid); /* bang! */ fprintf(stderr, "Migration successful.\n"); exit(0); @@ -2852,7 +2852,7 @@ if (rc) { fprintf(stderr, "migration target: Failure, destroying our copy.\n"); - rc2 = libxl_domain_destroy(ctx, domid, 1); + rc2 = libxl_domain_destroy(ctx, domid); if (rc2) { fprintf(stderr, "migration target: Failed to destroy our copy" " (code %d).\n", rc2); diff -r 9af0490f8910 -r 19c84db90a02 tools/python/xen/lowlevel/xl/xl.c --- a/tools/python/xen/lowlevel/xl/xl.c Thu Dec 15 18:55:46 2011 +0100 +++ b/tools/python/xen/lowlevel/xl/xl.c Thu Dec 15 18:55:46 2011 +0100 @@ -437,10 +437,10 @@ static PyObject *pyxl_domain_destroy(XlObject *self, PyObject *args) { - int domid, force = 1; - if ( !PyArg_ParseTuple(args, "i|i", &domid, &force) ) + int domid; + if ( !PyArg_ParseTuple(args, "i", &domid) ) return NULL; - if ( libxl_domain_destroy(self->ctx, domid, force) ) { + if ( libxl_domain_destroy(self->ctx, domid) ) { PyErr_SetString(xl_error_obj, "cannot destroy domain"); return NULL; } _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |