This exact code is duplicated in qemuDomainDetachNetDevice(). --- New patch in V2. (yeah, I just noticed the movement of the virDomainHostdevXX() declarations in this patch; I guess I was rearranging for consistent ordering. If this concerns anyone, I can squash it out before I push.) src/conf/domain_conf.c | 2 +- src/conf/domain_conf.h | 5 +++-- src/libvirt_private.syms | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 7135024..b994718 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -7084,7 +7084,7 @@ int virDomainNetIndexByMac(virDomainDefPtr def, const unsigned char *mac) return -1; } -static void virDomainNetRemove(virDomainDefPtr def, size_t i) +void virDomainNetRemove(virDomainDefPtr def, size_t i) { virDomainNetDefPtr net = def->nets[i]; diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 6ab5f32..a9426b3 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -1902,12 +1902,13 @@ int virDomainDiskRemoveByName(virDomainDefPtr def, const char *name); int virDomainNetIndexByMac(virDomainDefPtr def, const unsigned char *mac); int virDomainNetInsert(virDomainDefPtr def, virDomainNetDefPtr net); +void virDomainNetRemove(virDomainDefPtr def, size_t i); int virDomainNetRemoveByMac(virDomainDefPtr def, const unsigned char *mac); -int virDomainHostdevInsert(virDomainDefPtr def, virDomainHostdevDefPtr hostdev); -void virDomainHostdevRemove(virDomainDefPtr def, size_t i); int virDomainHostdevFind(virDomainDefPtr def, virDomainHostdevDefPtr match, virDomainHostdevDefPtr *found); +int virDomainHostdevInsert(virDomainDefPtr def, virDomainHostdevDefPtr hostdev); +void virDomainHostdevRemove(virDomainDefPtr def, size_t i); int virDomainGraphicsListenGetType(virDomainGraphicsDefPtr def, size_t ii) ATTRIBUTE_NONNULL(1); diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index de02634..d50d191 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -389,6 +389,7 @@ virDomainNetGetActualType; virDomainNetGetActualVirtPortProfile; virDomainNetIndexByMac; virDomainNetInsert; +virDomainNetRemove; virDomainNetRemoveByMac; virDomainNetTypeToString; virDomainNostateReasonTypeFromString; -- 1.7.7.6 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list