[libvirt PATCH 0/4] tests: switch to g_new0 (glib chronicles)
by Ján Tomko
With the exception of viralloctest.
Ján Tomko (4):
tests: virNumaGetPages: use g_new0 instead of VIR_ALLOC_N
tests: cpuTestLoadMultiXML: use g_new0 instead of VIR_ALLOC_N
tests: use g_new0 instead of VIR_ALLOC_N
tests: use g_new0 instead of VIR_ALLOC
tests/commandtest.c | 7 +++----
tests/cputest.c | 4 +++-
tests/domaincapstest.c | 10 ++++------
tests/fdstreamtest.c | 10 ++++------
tests/nodedevmdevctltest.c | 16 +++++-----------
tests/nwfilterxml2firewalltest.c | 3 +--
tests/qemublocktest.c | 9 +++------
tests/qemuhotplugtest.c | 3 +--
tests/qemumonitorjsontest.c | 12 ++++--------
tests/qemumonitortestutils.c | 22 ++++++----------------
tests/qemusecuritymock.c | 3 +--
tests/qemuxml2argvtest.c | 3 +--
tests/securityselinuxhelper.c | 3 +--
tests/securityselinuxlabeltest.c | 3 +--
tests/securityselinuxtest.c | 6 ++----
tests/testutils.c | 8 ++------
tests/testutilsqemu.c | 6 ++----
tests/vircgrouptest.c | 3 +--
tests/vircryptotest.c | 5 ++---
tests/virhostcputest.c | 3 +--
tests/virhostdevtest.c | 3 +--
tests/virnetdaemontest.c | 3 +--
tests/virnetmessagetest.c | 15 ++++++---------
tests/virnetserverclienttest.c | 3 +--
tests/virnetsockettest.c | 6 +-----
tests/virnettlshelpers.c | 3 +--
tests/virnumamock.c | 16 +++-------------
tests/virstringtest.c | 8 +++-----
tests/xlconfigtest.c | 3 +--
tests/xmconfigtest.c | 3 +--
30 files changed, 67 insertions(+), 135 deletions(-)
--
2.26.2
4 years, 2 months
[PATCH v2] docs/system: clarify deprecation schedule
by Stefan Hajnoczi
The sentence explaining the deprecation schedule is ambiguous. Make it
clear that a feature deprecated in the Nth release is guaranteed to
remain available in the N+1th release. Removal can occur in the N+2nd
release or later.
As an example of this in action, see commit
25956af3fe5dd0385ad8017bc768a6afe41e2a74 ("block: Finish deprecation of
'qemu-img convert -n -o'"). The feature was deprecated in QEMU 4.2.0. It
was present in the 5.0.0 release and removed in the 5.1.0 release.
Suggested-by: Daniel P. Berrangé <berrange(a)redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha(a)redhat.com>
---
v2:
* Use Dan's suggested wording [Daniel Berrange]
---
docs/system/deprecated.rst | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst
index 0cb8b01424..f2d5bd8ce1 100644
--- a/docs/system/deprecated.rst
+++ b/docs/system/deprecated.rst
@@ -3,10 +3,11 @@ Deprecated features
In general features are intended to be supported indefinitely once
introduced into QEMU. In the event that a feature needs to be removed,
-it will be listed in this section. The feature will remain functional
-for 2 releases prior to actual removal. Deprecated features may also
-generate warnings on the console when QEMU starts up, or if activated
-via a monitor command, however, this is not a mandatory requirement.
+it will be listed in this section. The feature will remain functional for the
+release in which it was deprecated and one further release. After these two
+releases, the feature is liable to be removed. Deprecated features may also
+generate warnings on the console when QEMU starts up, or if activated via a
+monitor command, however, this is not a mandatory requirement.
Prior to the 2.10.0 release there was no official policy on how
long features would be deprecated prior to their removal, nor
--
2.26.2
4 years, 2 months
[libvirt PATCH] gdbus: fix virGDBusCallMethodWithFD stub for non-UNIX
by Ján Tomko
Signed-off-by: Ján Tomko <jtomko(a)redhat.com>
Fixes: a961d93768f18c28979ca2841832cd7278bf95b8
---
Pushed as a build fix.
src/util/virgdbus.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/util/virgdbus.c b/src/util/virgdbus.c
index 837c8faf1f..cd9ca8d5d6 100644
--- a/src/util/virgdbus.c
+++ b/src/util/virgdbus.c
@@ -310,6 +310,7 @@ virGDBusCallMethodWithFD(GDBusConnection *conn,
int
virGDBusCallMethodWithFD(GDBusConnection *conn G_GNUC_UNUSED,
GVariant **reply G_GNUC_UNUSED,
+ const GVariantType *replyType G_GNUC_UNUSED,
GUnixFDList **replyFD G_GNUC_UNUSED,
virErrorPtr error G_GNUC_UNUSED,
const char *busName G_GNUC_UNUSED,
--
2.26.2
4 years, 2 months
[libvirt PATCH] virgdbus: add DBus reply format check
by Pavel Hrdina
We used to check the format of reply data with libdbus so we should do
the same with GLib DBus as well.
Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
At first I thought that this is not necessary as it is unlikely to
happen but after Jano found the bug with firewalld getZones function
and asked about checking return values I figured out that it will be
better to check it because if the returned message would have different
format it would be silently ignored.
src/rpc/virnetdaemon.c | 1 +
src/util/virfirewalld.c | 5 +++++
src/util/virgdbus.c | 8 ++++++--
src/util/virgdbus.h | 2 ++
src/util/virpolkit.c | 1 +
src/util/virsystemd.c | 7 +++++++
6 files changed, 22 insertions(+), 2 deletions(-)
diff --git a/src/rpc/virnetdaemon.c b/src/rpc/virnetdaemon.c
index 12d4d9bf87..f3a5e9f75c 100644
--- a/src/rpc/virnetdaemon.c
+++ b/src/rpc/virnetdaemon.c
@@ -487,6 +487,7 @@ virNetDaemonCallInhibit(virNetDaemonPtr dmn,
rc = virGDBusCallMethodWithFD(systemBus,
&reply,
+ G_VARIANT_TYPE("(h)"),
&replyFD,
NULL,
"org.freedesktop.login1",
diff --git a/src/util/virfirewalld.c b/src/util/virfirewalld.c
index 12448f0681..a94ac7c183 100644
--- a/src/util/virfirewalld.c
+++ b/src/util/virfirewalld.c
@@ -95,6 +95,7 @@ virFirewallDGetVersion(unsigned long *version)
if (virGDBusCallMethod(sysbus,
&reply,
+ G_VARIANT_TYPE("(v)"),
NULL,
VIR_FIREWALL_FIREWALLD_SERVICE,
"/org/fedoraproject/FirewallD1",
@@ -147,6 +148,7 @@ virFirewallDGetBackend(void)
if (virGDBusCallMethod(sysbus,
&reply,
+ G_VARIANT_TYPE("(v)"),
error,
VIR_FIREWALL_FIREWALLD_SERVICE,
"/org/fedoraproject/FirewallD1/config",
@@ -207,6 +209,7 @@ virFirewallDGetZones(char ***zones, size_t *nzones)
if (virGDBusCallMethod(sysbus,
&reply,
+ G_VARIANT_TYPE("(as)"),
NULL,
VIR_FIREWALL_FIREWALLD_SERVICE,
"/org/fedoraproject/FirewallD1",
@@ -295,6 +298,7 @@ virFirewallDApplyRule(virFirewallLayer layer,
if (virGDBusCallMethod(sysbus,
&reply,
+ G_VARIANT_TYPE("(s)"),
error,
VIR_FIREWALL_FIREWALLD_SERVICE,
"/org/fedoraproject/FirewallD1",
@@ -357,6 +361,7 @@ virFirewallDInterfaceSetZone(const char *iface,
message = g_variant_new("(ss)", zone, iface);
return virGDBusCallMethod(sysbus,
+ NULL,
NULL,
NULL,
VIR_FIREWALL_FIREWALLD_SERVICE,
diff --git a/src/util/virgdbus.c b/src/util/virgdbus.c
index 535b19f0a4..837c8faf1f 100644
--- a/src/util/virgdbus.c
+++ b/src/util/virgdbus.c
@@ -181,6 +181,7 @@ virGDBusCloseSystemBus(void)
* virGDBusCallMethod:
* @conn: a DBus connection
* @reply: pointer to receive reply message, or NULL
+ * @replyType: pointer to GVariantType to validate reply data, or NULL
* @error: libvirt error pointer or NULL
* @busName: bus identifier of the target service
* @objectPath: object path of the target service
@@ -198,6 +199,7 @@ virGDBusCloseSystemBus(void)
int
virGDBusCallMethod(GDBusConnection *conn,
GVariant **reply,
+ const GVariantType *replyType,
virErrorPtr error,
const char *busName,
const char *objectPath,
@@ -220,7 +222,7 @@ virGDBusCallMethod(GDBusConnection *conn,
ifaceName,
method,
data,
- NULL,
+ replyType,
G_DBUS_CALL_FLAGS_NONE,
VIR_DBUS_METHOD_CALL_TIMEOUT_MILIS,
NULL,
@@ -250,6 +252,7 @@ virGDBusCallMethod(GDBusConnection *conn,
int
virGDBusCallMethodWithFD(GDBusConnection *conn,
GVariant **reply,
+ const GVariantType *replyType,
GUnixFDList **replyFD,
virErrorPtr error,
const char *busName,
@@ -274,7 +277,7 @@ virGDBusCallMethodWithFD(GDBusConnection *conn,
ifaceName,
method,
data,
- NULL,
+ replyType,
G_DBUS_CALL_FLAGS_NONE,
VIR_DBUS_METHOD_CALL_TIMEOUT_MILIS,
dataFD,
@@ -342,6 +345,7 @@ virGDBusIsServiceInList(const char *listMethod,
rc = virGDBusCallMethod(conn,
&reply,
+ G_VARIANT_TYPE("(as)"),
NULL,
"org.freedesktop.DBus",
"/org/freedesktop/DBus",
diff --git a/src/util/virgdbus.h b/src/util/virgdbus.h
index 6ea717eea2..ca7073e27c 100644
--- a/src/util/virgdbus.h
+++ b/src/util/virgdbus.h
@@ -45,6 +45,7 @@ virGDBusCloseSystemBus(void);
int
virGDBusCallMethod(GDBusConnection *conn,
GVariant **reply,
+ const GVariantType *replyType,
virErrorPtr error,
const char *busName,
const char *objectPath,
@@ -55,6 +56,7 @@ virGDBusCallMethod(GDBusConnection *conn,
int
virGDBusCallMethodWithFD(GDBusConnection *conn,
GVariant **reply,
+ const GVariantType *replyType,
GUnixFDList **replyFD,
virErrorPtr error,
const char *busName,
diff --git a/src/util/virpolkit.c b/src/util/virpolkit.c
index 2ad00fd206..aad924a065 100644
--- a/src/util/virpolkit.c
+++ b/src/util/virpolkit.c
@@ -104,6 +104,7 @@ int virPolkitCheckAuth(const char *actionid,
if (virGDBusCallMethod(sysbus,
&reply,
+ G_VARIANT_TYPE("((bba{ss}))"),
NULL,
"org.freedesktop.PolicyKit1",
"/org/freedesktop/PolicyKit1/Authority",
diff --git a/src/util/virsystemd.c b/src/util/virsystemd.c
index 32c830c002..8456085476 100644
--- a/src/util/virsystemd.c
+++ b/src/util/virsystemd.c
@@ -214,6 +214,7 @@ virSystemdGetMachineNameByPID(pid_t pid)
if (virGDBusCallMethod(conn,
&reply,
+ G_VARIANT_TYPE("(o)"),
NULL,
"org.freedesktop.machine1",
"/org/freedesktop/machine1",
@@ -236,6 +237,7 @@ virSystemdGetMachineNameByPID(pid_t pid)
if (virGDBusCallMethod(conn,
&reply,
+ G_VARIANT_TYPE("(v)"),
NULL,
"org.freedesktop.machine1",
object,
@@ -384,6 +386,7 @@ int virSystemdCreateMachine(const char *name,
gprops);
rc = virGDBusCallMethod(conn,
+ NULL,
NULL,
error,
"org.freedesktop.machine1",
@@ -430,6 +433,7 @@ int virSystemdCreateMachine(const char *name,
gprops);
rc = virGDBusCallMethod(conn,
+ NULL,
NULL,
NULL,
"org.freedesktop.machine1",
@@ -457,6 +461,7 @@ int virSystemdCreateMachine(const char *name,
gprops);
rc = virGDBusCallMethod(conn,
+ NULL,
NULL,
NULL,
"org.freedesktop.systemd1",
@@ -507,6 +512,7 @@ int virSystemdTerminateMachine(const char *name)
VIR_DEBUG("Attempting to terminate machine via systemd");
if (virGDBusCallMethod(conn,
+ NULL,
NULL,
error,
"org.freedesktop.machine1",
@@ -592,6 +598,7 @@ virSystemdPMSupportTarget(const char *methodName, bool *result)
if (virGDBusCallMethod(conn,
&reply,
+ G_VARIANT_TYPE("(s)"),
NULL,
"org.freedesktop.login1",
"/org/freedesktop/login1",
--
2.26.2
4 years, 2 months
[PATCH v2] util: support PCI passthrough net device stats collection
by zhenwei pi
Collect PCI passthrough net device stats from kernel by netlink
API.
Currently, libvirt can not get PCI passthrough net device stats,
run command:
#virsh domifstat instance --interface=52:54:00:2d:b2:35
error: Failed to get interface stats instance 52:54:00:2d:b2:35
error: internal error: Interface name not provided
The PCI device(usually SR-IOV virtual function device) is detached
while it's used in PCI passthrough mode. And we can not parse this
device from /proc/net/dev any more.
In this patch, libvirt check net device is VF of not firstly, then
query virNetDevVFInterfaceStats(new API).
virNetDevVFInterfaceStats parses VFs info of all PFs, compares MAC
address until the two MAC addresses match.
'#ip -s link show' can get the same result. Instead of parsing the
output result, implement this feature by libnl API.
Notice that this feature deponds on driver of PF.
Test on Mellanox ConnectX-4 Lx, it works well.
Also test on Intel Corporation 82599ES, it works, but only get 0.
(ip-link command get the same result).
Signed-off-by: zhenwei pi <pizhenwei(a)bytedance.com>
---
src/libvirt_private.syms | 1 +
src/qemu/qemu_driver.c | 3 ++
src/util/virnetdev.c | 137 +++++++++++++++++++++++++++++++++++++++++++++++
src/util/virnetdev.h | 5 ++
4 files changed, 146 insertions(+)
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index bdbe3431b8..bcc40b8d69 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -2585,6 +2585,7 @@ virNetDevSetRcvMulti;
virNetDevSetupControl;
virNetDevSysfsFile;
virNetDevValidateConfig;
+virNetDevVFInterfaceStats;
# util/virnetdevbandwidth.h
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index ae715c01d7..f554010c40 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -10196,6 +10196,9 @@ qemuDomainInterfaceStats(virDomainPtr dom,
if (virDomainNetGetActualType(net) == VIR_DOMAIN_NET_TYPE_VHOSTUSER) {
if (virNetDevOpenvswitchInterfaceStats(net->ifname, stats) < 0)
goto cleanup;
+ } else if (virDomainNetGetActualType(net) == VIR_DOMAIN_NET_TYPE_HOSTDEV) {
+ if (virNetDevVFInterfaceStats(&net->mac, stats) < 0)
+ goto cleanup;
} else {
if (virNetDevTapInterfaceStats(net->ifname, stats,
!virDomainNetTypeSharesHostView(net)) < 0)
diff --git a/src/util/virnetdev.c b/src/util/virnetdev.c
index e1a4cc2bef..377f25aae7 100644
--- a/src/util/virnetdev.c
+++ b/src/util/virnetdev.c
@@ -1489,6 +1489,7 @@ static struct nla_policy ifla_vf_policy[IFLA_VF_MAX+1] = {
.maxlen = sizeof(struct ifla_vf_mac) },
[IFLA_VF_VLAN] = { .type = NLA_UNSPEC,
.maxlen = sizeof(struct ifla_vf_vlan) },
+ [IFLA_VF_STATS] = { .type = NLA_NESTED },
};
@@ -2265,6 +2266,132 @@ virNetDevSetNetConfig(const char *linkdev, int vf,
return 0;
}
+static struct nla_policy ifla_vfstats_policy[IFLA_VF_STATS_MAX+1] = {
+ [IFLA_VF_STATS_RX_PACKETS] = { .type = NLA_U64 },
+ [IFLA_VF_STATS_TX_PACKETS] = { .type = NLA_U64 },
+ [IFLA_VF_STATS_RX_BYTES] = { .type = NLA_U64 },
+ [IFLA_VF_STATS_TX_BYTES] = { .type = NLA_U64 },
+ [IFLA_VF_STATS_BROADCAST] = { .type = NLA_U64 },
+ [IFLA_VF_STATS_MULTICAST] = { .type = NLA_U64 },
+};
+
+static int
+virNetDevParseVfStats(struct nlattr **tb, virMacAddrPtr mac,
+ virDomainInterfaceStatsPtr stats)
+{
+ int ret = -1, len;
+ struct ifla_vf_mac *vf_lladdr;
+ struct nlattr *nla, *t[IFLA_VF_MAX+1];
+ struct nlattr *stb[IFLA_VF_STATS_MAX+1];
+
+ if (tb == NULL || mac == NULL || stats == NULL) {
+ return -1;
+ }
+
+ if (!tb[IFLA_VFINFO_LIST])
+ return -1;
+
+ len = nla_len(tb[IFLA_VFINFO_LIST]);
+
+ for (nla = nla_data(tb[IFLA_VFINFO_LIST]); nla_ok(nla, len);
+ nla = nla_next(nla, &len)) {
+ ret = nla_parse(t, IFLA_VF_MAX, nla_data(nla), nla_len(nla),
+ ifla_vf_policy);
+ if (ret < 0)
+ return -1;
+
+ if (t[IFLA_VF_MAC] == NULL) {
+ continue;
+ }
+
+ vf_lladdr = nla_data(t[IFLA_VF_MAC]);
+ if (virMacAddrCmpRaw(mac, vf_lladdr->mac)) {
+ continue;
+ }
+
+ if (t[IFLA_VF_STATS]) {
+ ret = nla_parse_nested(stb, IFLA_VF_STATS_MAX,
+ t[IFLA_VF_STATS],
+ ifla_vfstats_policy);
+ if (ret < 0)
+ return -1;
+
+ stats->rx_bytes = nla_get_u64(stb[IFLA_VF_STATS_RX_BYTES]);
+ stats->tx_bytes = nla_get_u64(stb[IFLA_VF_STATS_TX_BYTES]);
+ stats->rx_packets = nla_get_u64(stb[IFLA_VF_STATS_RX_PACKETS]);
+ stats->tx_packets = nla_get_u64(stb[IFLA_VF_STATS_TX_PACKETS]);
+ }
+ return 0;
+ }
+
+ return ret;
+}
+
+/**
+ * virNetDevVFInterfaceStats:
+ * @mac: MAC address of the VF interface
+ * @stats: returns stats of the VF interface
+ *
+ * Get the VF interface from kernel by netlink.
+ * Returns 0 on success, -1 on failure.
+ */
+int
+virNetDevVFInterfaceStats(virMacAddrPtr mac,
+ virDomainInterfaceStatsPtr stats)
+{
+ FILE *fp;
+ char line[256], *colon, *ifname;
+ int rc = -1;
+ void *nlData = NULL;
+ struct nlattr *tb[IFLA_MAX + 1] = {NULL, };
+ char *sysfsDevicePath = NULL;
+
+ fp = fopen("/proc/net/dev", "r");
+ if (!fp) {
+ virReportSystemError(errno, "%s",
+ _("Could not open /proc/net/dev"));
+ return -1;
+ }
+
+ /* get all PCI net devices, and parse VFs list from netlink API.
+ * compare MAC address, collect device stats if matching.
+ */
+ while (fgets(line, sizeof(line), fp)) {
+ /* The line looks like:
+ * " eth0:..."
+ * Split it at the colon. and strip blank from head.
+ */
+ colon = strchr(line, ':');
+ if (!colon)
+ continue;
+ *colon = '\0';
+ ifname = line;
+ while ((*ifname == ' ') && (ifname < colon))
+ ifname++;
+
+ if (virNetDevSysfsFile(&sysfsDevicePath, ifname, "device") < 0)
+ break;
+
+ if (virNetDevIsPCIDevice(sysfsDevicePath)) {
+ rc = virNetlinkDumpLink(ifname, -1, &nlData, tb, 0, 0);
+ if (rc < 0) {
+ rc = -1;
+ goto cleanup;
+ }
+
+ rc = virNetDevParseVfStats(tb, mac, stats);
+ VIR_FREE(nlData);
+ if (rc == 0)
+ goto cleanup;
+ }
+ VIR_FREE(sysfsDevicePath);
+ }
+
+ cleanup:
+ VIR_FREE(sysfsDevicePath);
+ VIR_FORCE_FCLOSE(fp);
+ return rc;
+}
#else /* defined(__linux__) && defined(WITH_LIBNL) && defined(IFLA_VF_MAX) */
@@ -2309,6 +2436,16 @@ virNetDevSetNetConfig(const char *linkdev G_GNUC_UNUSED,
}
+int
+virNetDevVFInterfaceStats(virMacAddrPtr mac G_GNUC_UNUSED,
+ virDomainInterfaceStatsPtr stats G_GNUC_UNUSED)
+{
+ virReportSystemError(ENOSYS, "%s",
+ _("Unable to get VF net device stats on this platform"));
+ return -1;
+}
+
+
#endif /* defined(__linux__) && defined(WITH_LIBNL) && defined(IFLA_VF_MAX) */
VIR_ENUM_IMPL(virNetDevIfState,
diff --git a/src/util/virnetdev.h b/src/util/virnetdev.h
index 5f581323ed..ff59d9d341 100644
--- a/src/util/virnetdev.h
+++ b/src/util/virnetdev.h
@@ -312,4 +312,9 @@ int virNetDevSysfsFile(char **pf_sysfs_device_link,
int virNetDevRunEthernetScript(const char *ifname, const char *script)
G_GNUC_NO_INLINE;
+int virNetDevVFInterfaceStats(virMacAddrPtr mac,
+ virDomainInterfaceStatsPtr stats)
+ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
+
+
G_DEFINE_AUTOPTR_CLEANUP_FUNC(virNetDevRxFilter, virNetDevRxFilterFree);
--
2.11.0
4 years, 2 months
[PATCH] Remove redundant check when storage pool is mounted
by Yi Li
virFileComparePaths just return 0 or 1 after commit 7b48bb8
so break while after virFileComparePaths return 1
Signed-off-by: Yi Li <yili(a)winhong.com>
---
src/storage/storage_backend_fs.c | 8 ++------
src/util/virfile.c | 1 -
2 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/src/storage/storage_backend_fs.c b/src/storage/storage_backend_fs.c
index 536e5cf952..30c2367df4 100644
--- a/src/storage/storage_backend_fs.c
+++ b/src/storage/storage_backend_fs.c
@@ -245,7 +245,6 @@ virStorageBackendFileSystemIsMounted(virStoragePoolObjPtr pool)
FILE *mtab;
struct mntent ent;
char buf[1024];
- int rc1, rc2;
g_autofree char *src = NULL;
if ((mtab = fopen(_PATH_MOUNTED, "r")) == NULL) {
@@ -262,11 +261,8 @@ virStorageBackendFileSystemIsMounted(virStoragePoolObjPtr pool)
/* compare both mount destinations and sources to be sure the mounted
* FS pool is really the one we're looking for
*/
- if ((rc1 = virFileComparePaths(ent.mnt_dir, def->target.path)) < 0 ||
- (rc2 = virFileComparePaths(ent.mnt_fsname, src)) < 0)
- goto cleanup;
-
- if (rc1 && rc2) {
+ if (virFileComparePaths(ent.mnt_dir, def->target.path) &&
+ virFileComparePaths(ent.mnt_fsname, src)) {
ret = 1;
goto cleanup;
}
diff --git a/src/util/virfile.c b/src/util/virfile.c
index 61d2c16072..e120d277d0 100644
--- a/src/util/virfile.c
+++ b/src/util/virfile.c
@@ -3884,7 +3884,6 @@ virFileCopyACLs(const char *src,
* Returns:
* 1 : Equal
* 0 : Non-Equal
- * -1 : Error
*/
int
virFileComparePaths(const char *p1, const char *p2)
--
2.25.3
4 years, 2 months
[PATCH v2 0/3] improve pSeries NVDIMM support
by Daniel Henrique Barboza
Hi,
This is a follow up of [1] after Andrea pushed the revert
patch as standalone.
Changes from v1:
- patch 2 (former 3): moved the auto-align code from
virDomainMemoryDefParseXML() to virDomainMemoryDefPostParse()
- patch 3 (former 4): updated NEWS.rst based on Andrea's
changes already upstream
[1] https://www.redhat.com/archives/libvir-list/2020-September/msg00864.html
Daniel Henrique Barboza (3):
conf, qemu: move qemuDomainNVDimmAlignSizePseries to domain_conf.c
domain_conf.c: auto-align pSeries NVDIMM in
virDomainMemoryDefPostParse()
NEWS.rst: update NVDIMM changes entry
NEWS.rst | 3 +-
src/conf/domain_conf.c | 59 ++++++++++++++++++-
src/conf/domain_conf.h | 3 +
src/libvirt_private.syms | 1 +
src/qemu/qemu_domain.c | 42 +------------
.../memory-hotplug-nvdimm-ppc64.xml | 2 +-
6 files changed, 67 insertions(+), 43 deletions(-)
--
2.26.2
4 years, 2 months
[libvirt PATCH] virfirewalld: fix g_variant_get call
by Pavel Hrdina
We need to pass pointer to `array`.
Reported-by: Ján Tomko <jtomko(a)redhat.com>
Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
src/util/virfirewalld.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/util/virfirewalld.c b/src/util/virfirewalld.c
index 69c8b73da0..12448f0681 100644
--- a/src/util/virfirewalld.c
+++ b/src/util/virfirewalld.c
@@ -215,7 +215,7 @@ virFirewallDGetZones(char ***zones, size_t *nzones)
NULL) < 0)
return -1;
- g_variant_get(reply, "(@as)", array);
+ g_variant_get(reply, "(@as)", &array);
*zones = g_variant_dup_strv(array, nzones);
return 0;
--
2.26.2
4 years, 2 months