Sometimes the only thing we need is the pointer to virDomainDiskDef and
having to call virDomainDiskIndexBy* APIs, storing the disk index, and
looking it up in the disks array is ugly. After this patch, we can just
call virDomainDiskBy* and get the pointer in one step.
Jiri Denemark (2):
Add wrappers for virDomainDiskIndexBy*
Use virDomainDiskByName where appropriate
src/conf/domain_conf.c | 20 +++++++++++++++
src/conf/domain_conf.h | 8 ++++++
src/libvirt_private.syms | 2 ++
src/libxl/libxl_driver.c | 4 +--
src/lxc/lxc_driver.c | 10 +++-----
src/qemu/qemu_agent.c | 9 ++++---
src/qemu/qemu_blockjob.c | 5 ++--
src/qemu/qemu_driver.c | 62 ++++++++++++++++++-----------------------------
src/qemu/qemu_migration.c | 6 ++---
src/qemu/qemu_process.c | 23 ++++--------------
10 files changed, 72 insertions(+), 77 deletions(-)
--
2.4.1