]> xenbits.xensource.com Git - libvirt.git/commitdiff
virnetdevopenvswitch: Drop @brname arg from virNetDevOpenvswitchRemovePort()
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 11 Apr 2024 10:37:23 +0000 (12:37 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 12 Apr 2024 18:45:00 +0000 (20:45 +0200)
The @brname argument of virNetDevOpenvswitchRemovePort() is and
was unused ever since its introduction in v0.9.11-rc1~257. Just
remove it.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
src/hypervisor/domain_interface.c
src/util/virnetdevopenvswitch.c
src/util/virnetdevopenvswitch.h
src/util/virnetdevtap.c

index 00034120655574a9baa5c1823c3f59d3b0cdcd0c..ccf4cb94bddca0c267a3b4d1fffd316a19927b89 100644 (file)
@@ -386,7 +386,6 @@ void
 virDomainInterfaceVportRemove(virDomainNetDef *net)
 {
     const virNetDevVPortProfile *vport = virDomainNetGetActualVirtPortProfile(net);
-    const char *brname;
 
     if (!vport)
         return;
@@ -394,8 +393,7 @@ virDomainInterfaceVportRemove(virDomainNetDef *net)
     if (vport->virtPortType == VIR_NETDEV_VPORT_PROFILE_MIDONET) {
         ignore_value(virNetDevMidonetUnbindPort(vport));
     } else if (vport->virtPortType == VIR_NETDEV_VPORT_PROFILE_OPENVSWITCH) {
-        brname = virDomainNetGetActualBridgeName(net);
-        ignore_value(virNetDevOpenvswitchRemovePort(brname, net->ifname));
+        ignore_value(virNetDevOpenvswitchRemovePort(net->ifname));
     }
 }
 
index 7d1cd2517128bb781c46f75fcba5f76aec26a9c3..f1765ae1c87cfe2de9369d19ce447e344ea11c39 100644 (file)
@@ -206,7 +206,7 @@ int virNetDevOpenvswitchAddPort(const char *brname, const char *ifname,
  *
  * Returns 0 in case of success or -1 in case of failure.
  */
-int virNetDevOpenvswitchRemovePort(const char *brname G_GNUC_UNUSED, const char *ifname)
+int virNetDevOpenvswitchRemovePort(const char *ifname)
 {
     g_autofree char *errbuf = NULL;
     g_autoptr(virCommand) cmd = virNetDevOpenvswitchCreateCmd(&errbuf);
index e6ee985f1786e7dc4b6387a02a5b02ad448b6987..a20fb5b0299a90627a72748780f59f42f9e2643a 100644 (file)
@@ -38,8 +38,8 @@ int virNetDevOpenvswitchAddPort(const char *brname,
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
     G_GNUC_WARN_UNUSED_RESULT;
 
-int virNetDevOpenvswitchRemovePort(const char *brname, const char *ifname)
-    ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
+int virNetDevOpenvswitchRemovePort(const char *ifname)
+    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
 
 int virNetDevOpenvswitchInterfaceGetMaster(const char *ifname, char **master)
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
index 3bfd36fc2317c3091887a34d9a5ef76ecb406ab8..9a4866a4e4dfac417f594a40f94c54533f0276c1 100644 (file)
@@ -543,7 +543,7 @@ virNetDevTapReattachBridge(const char *tapname,
         int ret;
         VIR_INFO("Removing %s from %s", tapname, master);
         if (useOVS)
-            ret = virNetDevOpenvswitchRemovePort(master, tapname);
+            ret = virNetDevOpenvswitchRemovePort(tapname);
         else
             ret = virNetDevBridgeRemovePort(master, tapname);
         if (ret < 0)