From: Stefano Stabellini Date: Tue, 29 May 2012 15:36:53 +0000 (+0100) Subject: xl: destroy the disk on successful removal during block-detach X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~8394 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=bb86668db55fa24f275c8f56ddd4dcb44cd413fe;p=xen.git xl: destroy the disk on successful removal during block-detach main_blockdetach needs to call libxl_device_disk_destroy so that all the disk related entries are properly removed from xenstore. Signed-off-by: Stefano Stabellini Acked-by: Ian Jackson Committed-by: Ian Campbell --- diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c index 259b065487..040cefcc35 100644 --- a/tools/libxl/xl_cmdimpl.c +++ b/tools/libxl/xl_cmdimpl.c @@ -5405,7 +5405,8 @@ int main_blockdetach(int argc, char **argv) } if (libxl_device_disk_remove(ctx, domid, &disk, 0)) { fprintf(stderr, "libxl_device_disk_remove failed.\n"); - } + } else + libxl_device_disk_destroy(ctx, domid, &disk); return 0; }