diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 5df9f7a8a16e5e79d368874f068a3a8497d52d57..9bf0dd2aeef52afa0f6972615871d1871e072da8 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -29521,7 +29521,7 @@ virDomainNetGetActualHostdev(virDomainNetDefPtr iface) return NULL; } -virNetDevVPortProfilePtr +const virNetDevVPortProfile * virDomainNetGetActualVirtPortProfile(const virDomainNetDef *iface) { switch (iface->type) { diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 2696c6f6a016aa1a7333fd8826852e4ebc045817..8f1040468b887adfef888458593c3c553d163c95 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -3213,7 +3213,7 @@ int virDomainNetGetActualBridgeMACTableManager(virDomainNetDefPtr iface); const char *virDomainNetGetActualDirectDev(virDomainNetDefPtr iface); int virDomainNetGetActualDirectMode(virDomainNetDefPtr iface); virDomainHostdevDefPtr virDomainNetGetActualHostdev(virDomainNetDefPtr iface); -virNetDevVPortProfilePtr +const virNetDevVPortProfile * virDomainNetGetActualVirtPortProfile(const virDomainNetDef *iface); const virNetDevBandwidth * virDomainNetGetActualBandwidth(const virDomainNetDef *iface); diff --git a/src/conf/netdev_vport_profile_conf.c b/src/conf/netdev_vport_profile_conf.c index 660478d1287b3c6802d64b57c97d96f759fbff7f..1dd8439adb03be721485bbbf0044b3c9609d7580 100644 --- a/src/conf/netdev_vport_profile_conf.c +++ b/src/conf/netdev_vport_profile_conf.c @@ -197,7 +197,7 @@ virNetDevVPortProfileParse(xmlNodePtr node, unsigned int flags) int -virNetDevVPortProfileFormat(virNetDevVPortProfilePtr virtPort, +virNetDevVPortProfileFormat(const virNetDevVPortProfile *virtPort, virBufferPtr buf) { enum virNetDevVPortProfile type; diff --git a/src/conf/netdev_vport_profile_conf.h b/src/conf/netdev_vport_profile_conf.h index a2989af81e2c415f1b091b2c4b9184e06f750d46..6a99a42ee8d460f9bab3ac20c79a56798b06d28d 100644 --- a/src/conf/netdev_vport_profile_conf.h +++ b/src/conf/netdev_vport_profile_conf.h @@ -40,5 +40,5 @@ virNetDevVPortProfilePtr virNetDevVPortProfileParse(xmlNodePtr node, unsigned int flags); int -virNetDevVPortProfileFormat(virNetDevVPortProfilePtr virtPort, +virNetDevVPortProfileFormat(const virNetDevVPortProfile *virtPort, virBufferPtr buf); diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c index ed461cd12df98500a16f7e66c694fb049d12a132..e6c6f5f6adfd9bec835f0591a145c4cae270c576 100644 --- a/src/libxl/libxl_conf.c +++ b/src/libxl/libxl_conf.c @@ -1203,7 +1203,7 @@ libxlMakeNic(virDomainDefPtr def, virNetworkPtr network = NULL; virConnectPtr conn = NULL; const virNetDevBandwidth *actual_bw; - virNetDevVPortProfilePtr port_profile; + const virNetDevVPortProfile *port_profile; const virNetDevVlan *virt_vlan; virBuffer buf = VIR_BUFFER_INITIALIZER; size_t i; diff --git a/src/libxl/xen_common.c b/src/libxl/xen_common.c index 07f7c3f704ecd566847bb50a21a9e1a4f709f9d7..8c07df80b6843cffd462fc064241d9e8ebd10c81 100644 --- a/src/libxl/xen_common.c +++ b/src/libxl/xen_common.c @@ -1667,7 +1667,7 @@ xenFormatNet(virConnectPtr conn, switch (net->type) { case VIR_DOMAIN_NET_TYPE_BRIDGE: { - virNetDevVPortProfilePtr port_profile = virDomainNetGetActualVirtPortProfile(net); + const virNetDevVPortProfile *port_profile = virDomainNetGetActualVirtPortProfile(net); const virNetDevVlan *virt_vlan = virDomainNetGetActualVlan(net); const char *script = net->script; size_t i; diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c index dda786d772e1753058cf76c33b37a94e2ab240e0..dcf48c981c42b060f58107e8d35c2febf156dd71 100644 --- a/src/lxc/lxc_driver.c +++ b/src/lxc/lxc_driver.c @@ -4331,7 +4331,7 @@ lxcDomainDetachDeviceNetLive(virDomainObjPtr vm, int detachidx, ret = -1; virDomainNetType actualType; virDomainNetDefPtr detach = NULL; - virNetDevVPortProfilePtr vport = NULL; + const virNetDevVPortProfile *vport = NULL; virErrorPtr save_err = NULL; if ((detachidx = virDomainNetFindIdx(vm->def, dev->data.net)) < 0) diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c index c91f372eb1fe9931dad66cf2808fd5f09734d4a2..cbcb3419311772b179a3f8b049783579c601f9bf 100644 --- a/src/lxc/lxc_process.c +++ b/src/lxc/lxc_process.c @@ -162,7 +162,7 @@ static void virLXCProcessCleanup(virLXCDriverPtr driver, { size_t i; virLXCDomainObjPrivatePtr priv = vm->privateData; - virNetDevVPortProfilePtr vport = NULL; + const virNetDevVPortProfile *vport = NULL; virLXCDriverConfigPtr cfg = virLXCDriverGetConfig(driver); virConnectPtr conn = NULL; @@ -282,7 +282,7 @@ virLXCProcessSetupInterfaceTap(virDomainDefPtr vm, { char *parentVeth; char *containerVeth = NULL; - virNetDevVPortProfilePtr vport = virDomainNetGetActualVirtPortProfile(net); + const virNetDevVPortProfile *vport = virDomainNetGetActualVirtPortProfile(net); VIR_DEBUG("calling vethCreate()"); parentVeth = net->ifname; @@ -334,7 +334,7 @@ char *virLXCProcessSetupInterfaceDirect(virConnectPtr conn, char *res_ifname = NULL; virLXCDriverPtr driver = conn->privateData; const virNetDevBandwidth *bw; - virNetDevVPortProfilePtr prof; + const virNetDevVPortProfile *prof; virLXCDriverConfigPtr cfg = virLXCDriverGetConfig(driver); const char *linkdev = virDomainNetGetActualDirectDev(net); unsigned int macvlan_create_flags = VIR_NETDEV_MACVLAN_CREATE_IFUP; @@ -633,7 +633,7 @@ static int virLXCProcessSetupInterfaces(virConnectPtr conn, virErrorPreserveLast(&save_err); for (i = 0; i < def->nnets; i++) { virDomainNetDefPtr iface = def->nets[i]; - virNetDevVPortProfilePtr vport = virDomainNetGetActualVirtPortProfile(iface); + const virNetDevVPortProfile *vport = virDomainNetGetActualVirtPortProfile(iface); if (vport && vport->virtPortType == VIR_NETDEV_VPORT_PROFILE_OPENVSWITCH) ignore_value(virNetDevOpenvswitchRemovePort( virDomainNetGetActualBridgeName(iface), diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 5db950c4fc66874baba2d9a65a3ecc82fa3e5c8a..1d2d6b3f55c482482dac73896528d1cbd04c9f72 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -5491,7 +5491,7 @@ qemuDomainValidateActualNetDef(const virDomainNetDef *net, * a element in the config) */ if (net->filter) { - virNetDevVPortProfilePtr vport = virDomainNetGetActualVirtPortProfile(net); + const virNetDevVPortProfile *vport = virDomainNetGetActualVirtPortProfile(net); if (!(actualType == VIR_DOMAIN_NET_TYPE_NETWORK || actualType == VIR_DOMAIN_NET_TYPE_BRIDGE || diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 7f3d7d8ed43e987c7429d13aeb172635c7f0b12b..d4eacaf099d836e3c959ed4c8af35aab34442796 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -1109,7 +1109,7 @@ qemuDomainAttachDeviceDiskLive(virQEMUDriverPtr driver, static void qemuDomainNetDeviceVportRemove(virDomainNetDefPtr net) { - virNetDevVPortProfilePtr vport = virDomainNetGetActualVirtPortProfile(net); + const virNetDevVPortProfile *vport = virDomainNetGetActualVirtPortProfile(net); const char *brname; if (!vport) diff --git a/src/qemu/qemu_migration_cookie.c b/src/qemu/qemu_migration_cookie.c index 6f567642424eb7d9c1b3dcfb40d0216998f99424..33b3529f8ce6e373f3887376b9fdb84b38be6b49 100644 --- a/src/qemu/qemu_migration_cookie.c +++ b/src/qemu/qemu_migration_cookie.c @@ -242,7 +242,7 @@ qemuMigrationCookieNetworkAlloc(virQEMUDriverPtr driver G_GNUC_UNUSED, for (i = 0; i < def->nnets; i++) { virDomainNetDefPtr netptr; - virNetDevVPortProfilePtr vport; + const virNetDevVPortProfile *vport; netptr = def->nets[i]; vport = virDomainNetGetActualVirtPortProfile(netptr); diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 161b3910e561fd4a649011afbc5b9e4e6d98ea1a..cb11da2401b5a8aff2d9d1a751c537fe1b3042ff 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -7328,7 +7328,7 @@ void qemuProcessStop(virQEMUDriverPtr driver, qemuDomainObjPrivatePtr priv = vm->privateData; virErrorPtr orig_err; virDomainDefPtr def = vm->def; - virNetDevVPortProfilePtr vport = NULL; + const virNetDevVPortProfile *vport = NULL; size_t i; char *timestamp; virQEMUDriverConfigPtr cfg = virQEMUDriverGetConfig(driver); diff --git a/src/util/virhostdev.c b/src/util/virhostdev.c index b3b9240731122654901cc214c116de68f29c479d..39e6b8f49fa62836c356995f7bacf16200bddd99 100644 --- a/src/util/virhostdev.c +++ b/src/util/virhostdev.c @@ -402,7 +402,7 @@ virHostdevIsVFIODevice(const virDomainHostdevDef *hostdev) static int virHostdevNetConfigVirtPortProfile(const char *linkdev, int vf, - virNetDevVPortProfilePtr virtPort, + const virNetDevVPortProfile *virtPort, const virMacAddr *macaddr, const unsigned char *uuid, bool associate) @@ -498,7 +498,7 @@ virHostdevSetNetConfig(virDomainHostdevDefPtr hostdev, { g_autofree char *linkdev = NULL; const virNetDevVlan *vlan; - virNetDevVPortProfilePtr virtPort; + const virNetDevVPortProfile *virtPort; int vf = -1; bool port_profile_associate = true; @@ -548,7 +548,7 @@ virHostdevRestoreNetConfig(virDomainHostdevDefPtr hostdev, g_autofree virMacAddrPtr MAC = NULL; g_autofree virMacAddrPtr adminMAC = NULL; g_autoptr(virNetDevVlan) vlan = NULL; - virNetDevVPortProfilePtr virtPort; + const virNetDevVPortProfile *virtPort; int vf = -1; bool port_profile_associate = false; diff --git a/src/util/virnetdevmacvlan.c b/src/util/virnetdevmacvlan.c index 9e6d6086391778e2af89cf8706ab5fc330f0f900..09efa04df11d9e0e19fa7b5b32f35ba17f7227c3 100644 --- a/src/util/virnetdevmacvlan.c +++ b/src/util/virnetdevmacvlan.c @@ -826,7 +826,7 @@ virNetDevMacVLanVPortProfileRegisterCallback(const char *ifname, const virMacAddr *macaddress, const char *linkdev, const unsigned char *vmuuid, - virNetDevVPortProfilePtr virtPortProfile, + const virNetDevVPortProfile *virtPortProfile, virNetDevVPortProfileOp vmOp) { virNetlinkCallbackDataPtr calld = NULL; @@ -895,7 +895,7 @@ virNetDevMacVLanCreateWithVPortProfile(const char *ifnameRequested, virNetDevMacVLanMode mode, const virNetDevVlan *vlan, const unsigned char *vmuuid, - virNetDevVPortProfilePtr virtPortProfile, + const virNetDevVPortProfile *virtPortProfile, char **ifnameResult, virNetDevVPortProfileOp vmOp, char *stateDir, @@ -1092,7 +1092,7 @@ int virNetDevMacVLanDeleteWithVPortProfile(const char *ifname, const virMacAddr *macaddr, const char *linkdev, int mode, - virNetDevVPortProfilePtr virtPortProfile, + const virNetDevVPortProfile *virtPortProfile, char *stateDir) { int ret = 0; @@ -1147,7 +1147,7 @@ int virNetDevMacVLanRestartWithVPortProfile(const char *cr_ifname, const virMacAddr *macaddress, const char *linkdev, const unsigned char *vmuuid, - virNetDevVPortProfilePtr virtPortProfile, + const virNetDevVPortProfile *virtPortProfile, virNetDevVPortProfileOp vmOp) { int rc = 0; @@ -1224,7 +1224,7 @@ int virNetDevMacVLanCreateWithVPortProfile(const char *ifname G_GNUC_UNUSED, virNetDevMacVLanMode mode G_GNUC_UNUSED, const virNetDevVlan *vlan G_GNUC_UNUSED, const unsigned char *vmuuid G_GNUC_UNUSED, - virNetDevVPortProfilePtr virtPortProfile G_GNUC_UNUSED, + const virNetDevVPortProfile *virtPortProfile G_GNUC_UNUSED, char **res_ifname G_GNUC_UNUSED, virNetDevVPortProfileOp vmop G_GNUC_UNUSED, char *stateDir G_GNUC_UNUSED, @@ -1241,7 +1241,7 @@ int virNetDevMacVLanDeleteWithVPortProfile(const char *ifname G_GNUC_UNUSED, const virMacAddr *macaddress G_GNUC_UNUSED, const char *linkdev G_GNUC_UNUSED, int mode G_GNUC_UNUSED, - virNetDevVPortProfilePtr virtPortProfile G_GNUC_UNUSED, + const virNetDevVPortProfile *virtPortProfile G_GNUC_UNUSED, char *stateDir G_GNUC_UNUSED) { virReportSystemError(ENOSYS, "%s", @@ -1253,7 +1253,7 @@ int virNetDevMacVLanRestartWithVPortProfile(const char *cr_ifname G_GNUC_UNUSED, const virMacAddr *macaddress G_GNUC_UNUSED, const char *linkdev G_GNUC_UNUSED, const unsigned char *vmuuid G_GNUC_UNUSED, - virNetDevVPortProfilePtr virtPortProfile G_GNUC_UNUSED, + const virNetDevVPortProfile *virtPortProfile G_GNUC_UNUSED, virNetDevVPortProfileOp vmOp G_GNUC_UNUSED) { virReportSystemError(ENOSYS, "%s", @@ -1265,7 +1265,7 @@ int virNetDevMacVLanVPortProfileRegisterCallback(const char *ifname G_GNUC_UNUSE const virMacAddr *macaddress G_GNUC_UNUSED, const char *linkdev G_GNUC_UNUSED, const unsigned char *vmuuid G_GNUC_UNUSED, - virNetDevVPortProfilePtr virtPortProfile G_GNUC_UNUSED, + const virNetDevVPortProfile *virtPortProfile G_GNUC_UNUSED, virNetDevVPortProfileOp vmOp G_GNUC_UNUSED) { virReportSystemError(ENOSYS, "%s", diff --git a/src/util/virnetdevmacvlan.h b/src/util/virnetdevmacvlan.h index f455ec3384ba6470f0fa033e854a9f0d3c4fd4f0..fc1bb018a20fe84d26954756d2e1ca60e51926ef 100644 --- a/src/util/virnetdevmacvlan.h +++ b/src/util/virnetdevmacvlan.h @@ -78,7 +78,7 @@ int virNetDevMacVLanCreateWithVPortProfile(const char *ifname, virNetDevMacVLanMode mode, const virNetDevVlan *vlan, const unsigned char *vmuuid, - virNetDevVPortProfilePtr virtPortProfile, + const virNetDevVPortProfile *virtPortProfile, char **res_ifname, virNetDevVPortProfileOp vmop, char *stateDir, @@ -101,7 +101,7 @@ int virNetDevMacVLanDeleteWithVPortProfile(const char *ifname, const virMacAddr *macaddress, const char *linkdev, int mode, - virNetDevVPortProfilePtr virtPortProfile, + const virNetDevVPortProfile *virtPortProfile, char *stateDir) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3) ATTRIBUTE_NONNULL(6) G_GNUC_WARN_UNUSED_RESULT; @@ -110,7 +110,7 @@ int virNetDevMacVLanRestartWithVPortProfile(const char *cr_ifname, const virMacAddr *macaddress, const char *linkdev, const unsigned char *vmuuid, - virNetDevVPortProfilePtr virtPortProfile, + const virNetDevVPortProfile *virtPortProfile, virNetDevVPortProfileOp vmOp) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3) ATTRIBUTE_NONNULL(4) G_GNUC_WARN_UNUSED_RESULT; @@ -119,7 +119,7 @@ int virNetDevMacVLanVPortProfileRegisterCallback(const char *ifname, const virMacAddr *macaddress, const char *linkdev, const unsigned char *vmuuid, - virNetDevVPortProfilePtr virtPortProfile, + const virNetDevVPortProfile *virtPortProfile, virNetDevVPortProfileOp vmOp) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3) ATTRIBUTE_NONNULL(4) G_GNUC_WARN_UNUSED_RESULT; diff --git a/src/util/virnetdevmidonet.c b/src/util/virnetdevmidonet.c index e50cceaef548a41ea964bd5226c859508ffa3515..354350ce1b764bf0d7738475ef0df39150c33e59 100644 --- a/src/util/virnetdevmidonet.c +++ b/src/util/virnetdevmidonet.c @@ -37,7 +37,7 @@ */ int virNetDevMidonetBindPort(const char *ifname, - virNetDevVPortProfilePtr virtualport) + const virNetDevVPortProfile *virtualport) { int ret = -1; virCommandPtr cmd = NULL; @@ -71,7 +71,7 @@ virNetDevMidonetBindPort(const char *ifname, * Returns 0 in case of success or -1 in case of failure. */ int -virNetDevMidonetUnbindPort(virNetDevVPortProfilePtr virtualport) +virNetDevMidonetUnbindPort(const virNetDevVPortProfile *virtualport) { int ret = -1; virCommandPtr cmd = NULL; diff --git a/src/util/virnetdevmidonet.h b/src/util/virnetdevmidonet.h index 61927c3edd5c9172c9da205756965566ebb8682e..87ac3d74a18c6a63873ee100f6ccd81b869e0ead 100644 --- a/src/util/virnetdevmidonet.h +++ b/src/util/virnetdevmidonet.h @@ -23,8 +23,8 @@ int virNetDevMidonetBindPort(const char *ifname, - virNetDevVPortProfilePtr virtualport) + const virNetDevVPortProfile *virtualport) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT; -int virNetDevMidonetUnbindPort(virNetDevVPortProfilePtr virtualport) +int virNetDevMidonetUnbindPort(const virNetDevVPortProfile *virtualport) ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT; diff --git a/src/util/virnetdevopenvswitch.c b/src/util/virnetdevopenvswitch.c index 34524375b39aaccad13ec9e6a0a53189b4341d86..f961777411ded1bb278ee81a18fd1691780fc608 100644 --- a/src/util/virnetdevopenvswitch.c +++ b/src/util/virnetdevopenvswitch.c @@ -132,7 +132,7 @@ virNetDevOpenvswitchConstructVlans(virCommandPtr cmd, const virNetDevVlan *virtV int virNetDevOpenvswitchAddPort(const char *brname, const char *ifname, const virMacAddr *macaddr, const unsigned char *vmuuid, - virNetDevVPortProfilePtr ovsport, + const virNetDevVPortProfile *ovsport, const virNetDevVlan *virtVlan) { char macaddrstr[VIR_MAC_STRING_BUFLEN]; diff --git a/src/util/virnetdevopenvswitch.h b/src/util/virnetdevopenvswitch.h index dddb21a5a2516188f1358a98ec09a56e0cb511a4..c9ea5920588f96e20357774b92319eb445e955a3 100644 --- a/src/util/virnetdevopenvswitch.h +++ b/src/util/virnetdevopenvswitch.h @@ -32,7 +32,7 @@ int virNetDevOpenvswitchAddPort(const char *brname, const char *ifname, const virMacAddr *macaddr, const unsigned char *vmuuid, - virNetDevVPortProfilePtr ovsport, + const virNetDevVPortProfile *ovsport, const virNetDevVlan *virtVlan) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3) G_GNUC_WARN_UNUSED_RESULT; diff --git a/src/util/virnetdevtap.c b/src/util/virnetdevtap.c index e733f6a0bf60edd32c91ffc8efb1cae75a66aed7..e3cf44c5cb4c5f361c3247fbf41f7f5e7c20ac83 100644 --- a/src/util/virnetdevtap.c +++ b/src/util/virnetdevtap.c @@ -499,7 +499,7 @@ virNetDevTapAttachBridge(const char *tapname, const char *brname, const virMacAddr *macaddr, const unsigned char *vmuuid, - virNetDevVPortProfilePtr virtPortProfile, + const virNetDevVPortProfile *virtPortProfile, const virNetDevVlan *virtVlan, unsigned int mtu, unsigned int *actualMTU) @@ -571,7 +571,7 @@ virNetDevTapReattachBridge(const char *tapname, const char *brname, const virMacAddr *macaddr, const unsigned char *vmuuid, - virNetDevVPortProfilePtr virtPortProfile, + const virNetDevVPortProfile *virtPortProfile, const virNetDevVlan *virtVlan, unsigned int mtu, unsigned int *actualMTU) @@ -657,7 +657,7 @@ int virNetDevTapCreateInBridgePort(const char *brname, const char *tunpath, int *tapfd, size_t tapfdSize, - virNetDevVPortProfilePtr virtPortProfile, + const virNetDevVPortProfile *virtPortProfile, const virNetDevVlan *virtVlan, virNetDevCoalescePtr coalesce, unsigned int mtu, diff --git a/src/util/virnetdevtap.h b/src/util/virnetdevtap.h index 4fc734fd5e288f661752480f5ecc3625d2b12d26..cae8e618614e8d1cf13b26bebbc9623c2ac20ec7 100644 --- a/src/util/virnetdevtap.h +++ b/src/util/virnetdevtap.h @@ -63,7 +63,7 @@ virNetDevTapAttachBridge(const char *tapname, const char *brname, const virMacAddr *macaddr, const unsigned char *vmuuid, - virNetDevVPortProfilePtr virtPortProfile, + const virNetDevVPortProfile *virtPortProfile, const virNetDevVlan *virtVlan, unsigned int mtu, unsigned int *actualMTU) @@ -75,7 +75,7 @@ virNetDevTapReattachBridge(const char *tapname, const char *brname, const virMacAddr *macaddr, const unsigned char *vmuuid, - virNetDevVPortProfilePtr virtPortProfile, + const virNetDevVPortProfile *virtPortProfile, const virNetDevVlan *virtVlan, unsigned int mtu, unsigned int *actualMTU) @@ -89,7 +89,7 @@ int virNetDevTapCreateInBridgePort(const char *brname, const char *tunpath, int *tapfd, size_t tapfdSize, - virNetDevVPortProfilePtr virtPortProfile, + const virNetDevVPortProfile *virtPortProfile, const virNetDevVlan *virtVlan, virNetDevCoalescePtr coalesce, unsigned int mtu, diff --git a/src/util/virnetdevvportprofile.c b/src/util/virnetdevvportprofile.c index 6442c2a2cfa3d5fbcc7ed63be4fe70d637724a11..593bd6e2d64b31fbaca30cabd0dbf1a736c79cda 100644 --- a/src/util/virnetdevvportprofile.c +++ b/src/util/virnetdevvportprofile.c @@ -85,7 +85,7 @@ enum virNetDevVPortProfileLinkOp { #endif bool -virNetDevVPortProfileEqual(virNetDevVPortProfilePtr a, virNetDevVPortProfilePtr b) +virNetDevVPortProfileEqual(const virNetDevVPortProfile *a, const virNetDevVPortProfile *b) { /* NULL resistant */ if (!a && !b) @@ -226,7 +226,7 @@ virNetDevVPortProfileCheckComplete(virNetDevVPortProfilePtr virtport, * an error is logged and -1 is returned. */ int -virNetDevVPortProfileCheckNoExtras(virNetDevVPortProfilePtr virtport) +virNetDevVPortProfileCheckNoExtras(const virNetDevVPortProfile *virtport) { const char *extra = NULL; @@ -283,7 +283,7 @@ virNetDevVPortProfileCheckNoExtras(virNetDevVPortProfilePtr virtport) */ static int virNetDevVPortProfileMerge(virNetDevVPortProfilePtr orig, - virNetDevVPortProfilePtr mods) + const virNetDevVPortProfile *mods) { enum virNetDevVPortProfile otype; @@ -423,9 +423,9 @@ virNetDevVPortProfileMerge(virNetDevVPortProfilePtr orig, */ int virNetDevVPortProfileMerge3(virNetDevVPortProfilePtr *result, - virNetDevVPortProfilePtr fromInterface, - virNetDevVPortProfilePtr fromNetwork, - virNetDevVPortProfilePtr fromPortgroup) + const virNetDevVPortProfile *fromInterface, + const virNetDevVPortProfile *fromNetwork, + const virNetDevVPortProfile *fromPortgroup) { int ret = -1; *result = NULL; diff --git a/src/util/virnetdevvportprofile.h b/src/util/virnetdevvportprofile.h index 5fdd019a09bac2aff5fa6d1c9fbce29fddbf01be..88a42a18168b06a8ff0084b81ae072589c784e9d 100644 --- a/src/util/virnetdevvportprofile.h +++ b/src/util/virnetdevvportprofile.h @@ -77,19 +77,19 @@ struct _virNetDevVPortProfile { }; -bool virNetDevVPortProfileEqual(virNetDevVPortProfilePtr a, - virNetDevVPortProfilePtr b); +bool virNetDevVPortProfileEqual(const virNetDevVPortProfile *a, + const virNetDevVPortProfile *b); int virNetDevVPortProfileCopy(virNetDevVPortProfilePtr *dst, const virNetDevVPortProfile *src); int virNetDevVPortProfileCheckComplete(virNetDevVPortProfilePtr virtport, bool generateMissing); -int virNetDevVPortProfileCheckNoExtras(virNetDevVPortProfilePtr virtport); +int virNetDevVPortProfileCheckNoExtras(const virNetDevVPortProfile *virtport); int virNetDevVPortProfileMerge3(virNetDevVPortProfilePtr *result, - virNetDevVPortProfilePtr fromInterface, - virNetDevVPortProfilePtr fromNetwork, - virNetDevVPortProfilePtr fromPortgroup); + const virNetDevVPortProfile *fromInterface, + const virNetDevVPortProfile *fromNetwork, + const virNetDevVPortProfile *fromPortgroup); int virNetDevVPortProfileAssociate(const char *ifname, const virNetDevVPortProfile *virtPort, diff --git a/tests/bhyvexml2argvmock.c b/tests/bhyvexml2argvmock.c index ac4ffe8596b224736e0477d71e72f28d4047b2fd..2a552f9f4706b25ba6c1a29de5ded27295f06e9e 100644 --- a/tests/bhyvexml2argvmock.c +++ b/tests/bhyvexml2argvmock.c @@ -26,7 +26,7 @@ int virNetDevTapCreateInBridgePort(const char *brname G_GNUC_UNUSED, const char *tunpath G_GNUC_UNUSED, int *tapfd G_GNUC_UNUSED, size_t tapfdSize G_GNUC_UNUSED, - virNetDevVPortProfilePtr virtPortProfile G_GNUC_UNUSED, + const virNetDevVPortProfile *virtPortProfile G_GNUC_UNUSED, const virNetDevVlan *virtVlan G_GNUC_UNUSED, virNetDevCoalescePtr coalesce G_GNUC_UNUSED, unsigned int mtu G_GNUC_UNUSED,