On 28.02.2012 21:14, Laine Stump wrote:
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);
Maybe my brain is too small for this, but this looks useless to me.
However, not a show stopper.
ACK
Michal