Displaying 8 results from an estimated 8 matches for "g_define_autoptr_cleanup_func".
2020 Jun 19
1
[v2v PATCH] libosinfo: declare autocleanup funcs with libosinfo < 1.8.0
...mic) \
- V2V_LIBOSINFO_VERSION_HEX >= MAKE_VERSION_HEX(maj, min, mic)
+ (V2V_LIBOSINFO_VERSION_HEX >= MAKE_VERSION_HEX(maj, min, mic))
+/*
+ * libosinfo 1.8.0 provides auto-cleanup functions for all its classes,
+ * so avoid declaring our own.
+ */
+#if !IS_LIBOSINFO_VERSION(1, 8, 0)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(OsinfoFilter, g_object_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(OsinfoLoader, g_object_unref)
/*
@@ -50,11 +55,13 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(OsinfoLoader, g_object_unref)
* avoid declaring this when:
* - libosinfo is >= 1.7.0 and < 1.8.0
* - glib is >= 2.63.3
+ * (the 1.8.0 check...
2020 Jun 01
1
[v2v PATCH v2] libosinfo: do not declare OsinfoList auto-cleanup in certain situations
..."safe" versions of libosinfo and glib.
Reported by: Kevin Locke.
---
v2v/libosinfo-c.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/v2v/libosinfo-c.c b/v2v/libosinfo-c.c
index 1ab6bb4d..e5327dff 100644
--- a/v2v/libosinfo-c.c
+++ b/v2v/libosinfo-c.c
@@ -44,7 +44,16 @@
G_DEFINE_AUTOPTR_CLEANUP_FUNC(OsinfoFilter, g_object_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(OsinfoLoader, g_object_unref)
+/*
+ * Because of a bug in OsinfoList in libosinfo 1.7.0 (fixed in 1.8.0),
+ * and a glib auto-cleanup addition for Module classes in 2.63.3,
+ * avoid declaring this when:
+ * - libosinfo is >= 1.7.0 and...
2020 Aug 05
1
[v2v PATCH] libosinfo: remove auto-cleanup for OsinfoList
...ywhere needed.
---
v2v/libosinfo-c.c | 18 +++++-------------
1 file changed, 5 insertions(+), 13 deletions(-)
diff --git a/v2v/libosinfo-c.c b/v2v/libosinfo-c.c
index 322e7d3d..75c2fae4 100644
--- a/v2v/libosinfo-c.c
+++ b/v2v/libosinfo-c.c
@@ -49,17 +49,6 @@
#if !IS_LIBOSINFO_VERSION(1, 8, 0)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(OsinfoFilter, g_object_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(OsinfoLoader, g_object_unref)
-/*
- * Because of a bug in OsinfoList in libosinfo 1.7.0 (fixed in 1.8.0),
- * and a glib auto-cleanup addition for Module classes in 2.63.3,
- * avoid declaring this when:
- * - libosinfo is >= 1.7.0 and...
2020 Jun 01
1
[v2v PATCH] libosinfo: declare OsinfoList auto-cleanup with glib < 2.63.3
...s have already auto-cleanup
functions declared for them.
Reported by: Kevin Locke.
---
v2v/libosinfo-c.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/v2v/libosinfo-c.c b/v2v/libosinfo-c.c
index 1ab6bb4d..e6827f76 100644
--- a/v2v/libosinfo-c.c
+++ b/v2v/libosinfo-c.c
@@ -44,7 +44,9 @@
G_DEFINE_AUTOPTR_CLEANUP_FUNC(OsinfoFilter, g_object_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(OsinfoLoader, g_object_unref)
+#if !GLIB_CHECK_VERSION(2, 63, 3)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(OsinfoList, g_object_unref)
+#endif
G_DEFINE_AUTOPTR_CLEANUP_FUNC(OsinfoOsList, g_object_unref)
typedef OsinfoDb *OsinfoDb_t;
--
2.25.4
2020 Jun 01
2
virt-v2v: error: redefinition of 'glib_autoptr_clear_OsinfoList'
...~~~~~~~~~~~~
/usr/include/glib-2.0/glib/gmacros.h:1061:3: note: in expansion of macro '_GLIB_DEFINE_AUTOPTR_CLEANUP_FUNCS'
1061 | _GLIB_DEFINE_AUTOPTR_CLEANUP_FUNCS(TypeName, TypeName, func)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libosinfo-c.c:47:1: note: in expansion of macro 'G_DEFINE_AUTOPTR_CLEANUP_FUNC'
47 | G_DEFINE_AUTOPTR_CLEANUP_FUNC(OsinfoList, g_object_unref)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/glib-2.0/glib/gmacros.h:1028:49: note: previous definition of 'glib_autoptr_clear_OsinfoList' was here
1028 | #define _GLIB_AUTOPTR_CLEAR_FUNC_NAME(TypeName) glib_autop...
2020 Jun 01
0
Re: virt-v2v: error: redefinition of 'glib_autoptr_clear_OsinfoList'
...sr/include/glib-2.0/glib/gmacros.h:1061:3: note: in expansion of macro '_GLIB_DEFINE_AUTOPTR_CLEANUP_FUNCS'
> 1061 | _GLIB_DEFINE_AUTOPTR_CLEANUP_FUNCS(TypeName, TypeName, func)
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> libosinfo-c.c:47:1: note: in expansion of macro 'G_DEFINE_AUTOPTR_CLEANUP_FUNC'
> 47 | G_DEFINE_AUTOPTR_CLEANUP_FUNC(OsinfoList, g_object_unref)
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /usr/include/glib-2.0/glib/gmacros.h:1028:49: note: previous definition of 'glib_autoptr_clear_OsinfoList' was here
> 1028 | #define _GLIB_AUTOPTR_CLEAR_FUNC_NAME(...
2020 Jan 22
4
[v2v PATCH 0/3] Use libosinfo for query device drivers
This patch series integrates libosinfo in virt-v2v to get the list of
files for Windows from libosinfo, if possible. The actual data is still
from virtio-win, just unpacked.
Pino Toscano (3):
build: require libosinfo
v2v: add a minimal libosinfo interface
v2v: try to get windows driver files from libosinfo
m4/guestfs-v2v.m4 | 3 +
v2v/Makefile.am | 9 +-
2020 Jan 28
4
[v2v PATCH v2 0/3] Use libosinfo for query device drivers
This patch series integrates libosinfo in virt-v2v to get the list of
files for Windows from libosinfo, if possible. The actual data is still
from virtio-win, just unpacked.
Changes from v1:
- adapt to use the priority in libosinfo 1.7.0+
- filter out non-pre-installable drivers
- collect all the drivers matching the requirements, not just the first,
sorting them by priority like libosinfo does