mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
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 <stefano.stabellini@eu.citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
This commit is contained in:
1 parent
bdd0754138
commit
bb86668db5
1 file changed
+2
-1
@@ -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;
|
||||
}
|
||||
|
||||
|
||||