libvirt/89237d53-conf-expose-virDomainSCSIDriveAddressIsUsed.patch
James Fehlig 25a1844db7 Accepting request 696099 from home:jfehlig:branches:Virtualization
- qemu: fix CDROM media change when using virDomainAttachDevice
  89237d53-conf-expose-virDomainSCSIDriveAddressIsUsed.patch,
  ee2c5ef3-test-scsi-disk.patch,
  ddc72f99-qemu-check-dup-drive-address.patch,
  22dc3e94-revert-f1d65853.patch
  boo#1132127

OBS-URL: https://build.opensuse.org/request/show/696099
OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=748
2019-04-19 20:47:19 +00:00

55 lines
2.0 KiB
Diff

commit 89237d534f0fe950d06a2081089154160c6c2224
Author: Michal Privoznik <mprivozn@redhat.com>
Date: Thu Apr 11 15:44:14 2019 +0200
conf: Expose virDomainSCSIDriveAddressIsUsed
This function checks if given drive address is already present in
passed domain definition. Expose the function as it will be used
shortly.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Tested-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
Index: libvirt-5.2.0/src/conf/domain_conf.c
===================================================================
--- libvirt-5.2.0.orig/src/conf/domain_conf.c
+++ libvirt-5.2.0/src/conf/domain_conf.c
@@ -4644,7 +4644,7 @@ virDomainDriveAddressIsUsedByHostdev(con
* Return true if the SCSI drive address is already in use, false
* otherwise.
*/
-static bool
+bool
virDomainSCSIDriveAddressIsUsed(const virDomainDef *def,
const virDomainDeviceDriveAddress *addr)
{
Index: libvirt-5.2.0/src/conf/domain_conf.h
===================================================================
--- libvirt-5.2.0.orig/src/conf/domain_conf.h
+++ libvirt-5.2.0/src/conf/domain_conf.h
@@ -2697,6 +2697,10 @@ virDomainXMLNamespacePtr
virDomainXMLOptionGetNamespace(virDomainXMLOptionPtr xmlopt)
ATTRIBUTE_NONNULL(1);
+bool
+virDomainSCSIDriveAddressIsUsed(const virDomainDef *def,
+ const virDomainDeviceDriveAddress *addr);
+
int virDomainDefPostParse(virDomainDefPtr def,
virCapsPtr caps,
unsigned int parseFlags,
Index: libvirt-5.2.0/src/libvirt_private.syms
===================================================================
--- libvirt-5.2.0.orig/src/libvirt_private.syms
+++ libvirt-5.2.0/src/libvirt_private.syms
@@ -534,6 +534,7 @@ virDomainRunningReasonTypeToString;
virDomainSaveConfig;
virDomainSaveStatus;
virDomainSaveXML;
+virDomainSCSIDriveAddressIsUsed;
virDomainSeclabelTypeFromString;
virDomainSeclabelTypeToString;
virDomainShmemDefEquals;