On Tue, Jul 19, 2016 at 10:30:45AM -0400, John Ferlan wrote:
Move qemuDeviceDriveHostAlias from qemu_command and rename to qemuAssignDeviceDiskDriveAlias in qemu_alias. Also change the parameter to just be the disk->info.alias (e.g. srcalias) Includes some innocent bystanders that seem to need QEMU_DRIVE_HOST_PREFIX which requires include qemu_alias.h instead of qemu_command.h Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx> --- src/qemu/qemu_alias.c | 17 +++++++++++++++++ src/qemu/qemu_alias.h | 4 ++++ src/qemu/qemu_command.c | 11 ----------- src/qemu/qemu_command.h | 1 - src/qemu/qemu_hotplug.c | 4 ++-- src/qemu/qemu_migration.c | 2 +- src/qemu/qemu_monitor_json.c | 2 +- src/qemu/qemu_monitor_text.c | 2 +- 8 files changed, 26 insertions(+), 17 deletions(-) diff --git a/src/qemu/qemu_alias.c b/src/qemu/qemu_alias.c index 51a654a..70cd9f1 100644 --- a/src/qemu/qemu_alias.c +++ b/src/qemu/qemu_alias.c @@ -170,6 +170,23 @@ qemuAssignDeviceControllerAlias(virDomainDefPtr domainDef, return virAsprintf(&controller->info.alias, "%s%d", prefix, controller->idx); } +/* qemuAssignDeviceDiskDriveAlias: + * @srcalias: Disk source alias + * + * Generate and return an alias for the device disk '-drive'
The other Assign* functions fill out the alias in device info. This one just returns the string. Also, most of the functions in this file do not have a prefix derived from the file name, they start with qemuAssign instead of qemuAlias I propose qemuAliasDiskDrive or qemuAliasDiskDriveStr. Jan -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list