[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen staging] libxl_domain: Cleanup libxl__destroy_domid
commit c1ad418bc6810c234adbd6da42c37ae196bdecee Author: Anthony PERARD <anthony.perard@xxxxxxxxxx> AuthorDate: Tue Jun 4 16:35:22 2019 +0100 Commit: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> CommitDate: Fri Sep 20 10:41:01 2019 +0100 libxl_domain: Cleanup libxl__destroy_domid - dom_path isn't used anymore in that function, remove it. - Use `r' to store return value of external calls. - Use `CTX', no need for a local `ctx'. Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx> Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> --- tools/libxl/libxl_domain.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/tools/libxl/libxl_domain.c b/tools/libxl/libxl_domain.c index aee621b0a5..11a29b235b 100644 --- a/tools/libxl/libxl_domain.c +++ b/tools/libxl/libxl_domain.c @@ -1023,14 +1023,13 @@ static void domain_destroy_domid_cb(libxl__egc *egc, void libxl__destroy_domid(libxl__egc *egc, libxl__destroy_domid_state *dis) { STATE_AO_GC(dis->ao); - libxl_ctx *ctx = CTX; uint32_t domid = dis->domid; - char *dom_path; int rc, dm_present; + int r; libxl__ev_child_init(&dis->destroyer); - rc = libxl_domain_info(ctx, NULL, domid); + rc = libxl_domain_info(CTX, NULL, domid); switch(rc) { case 0: break; @@ -1058,17 +1057,12 @@ void libxl__destroy_domid(libxl__egc *egc, libxl__destroy_domid_state *dis) abort(); } - dom_path = libxl__xs_get_dompath(gc, domid); - if (!dom_path) { - rc = ERROR_FAIL; - goto out; - } - if (libxl__device_pci_destroy_all(gc, domid) < 0) LOGD(ERROR, domid, "Pci shutdown failed"); - rc = xc_domain_pause(ctx->xch, domid); - if (rc < 0) { - LOGEVD(ERROR, rc, domid, "xc_domain_pause failed"); + r = xc_domain_pause(CTX->xch, domid); + if (r < 0) { + LOGEVD(ERROR, r, domid, "xc_domain_pause failed"); + rc = ERROR_FAIL; } if (dm_present) { -- generated by git-patchbot for /home/xen/git/xen.git#staging _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |