[PATCH 0/3] introduces two new helper functions: vshFindDisk is to find the disk XML node in xml doc with the type (indicates it's normal disk or changeable disk). VshPrepareDiskXML is to prepare the disk XML for disk changing commands' use, such as detach-disk. The purpose of this patch is to prepare for upcoming new command "change-disk", which will use the two helper functions too. Please see [PATCH 3/3] for a overall description of the new command. v2 - v3 * Update vshFindDisk to support search the disk node with both the source path and target name. * Change names of the two new enums ([PATCH 1/3]). * Use virXMLParseStringCtxt instead of xmlReadDoc * Use VIR_ALLOC_N instead of vshCalloc. * [PATCH 3/4] and [PATCH 4/4] are merged into [PATCH 3/3] * Change option "--target" into "--path". * Defaults to use "--update" if none of "--eject", "--insert", and "--update" is specified. * Update docs to be consistent with the changes on codes. * Other nits. v3 - v4: * No changes. Osier Yang (3) virsh: Two new helper functions for disk device changes virsh: Use vshFindDisk and vshPrepareDiskXML in virsh: New command cmdChangeMedia tools/virsh.c | 418 ++++++++++++++++++++++++++++++++++++++++++++++++------- tools/virsh.pod | 33 ++++- 2 files changed, 395 insertions(+), 56 deletions(-) Regards, Osier -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list