Re: [libvirt-designer 2/4] virtxml: Switch to use osinfo_db_identify_media

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 22.01.2013 16:48, Christophe Fergeau wrote:
> virtxml is using osinfo_db_guess_os_from_media for that which
> is deprecated.
> ---
>  examples/virtxml.c | 11 ++++-------
>  1 file changed, 4 insertions(+), 7 deletions(-)
> 
> diff --git a/examples/virtxml.c b/examples/virtxml.c
> index 18b0456..d719e5f 100644
> --- a/examples/virtxml.c
> +++ b/examples/virtxml.c
> @@ -364,7 +364,6 @@ guess_os_from_disk(GList *disk_list)
>          char *path = (char *) list_it->data;
>          char *sep = strchr(path, ',');
>          OsinfoMedia *media = NULL;
> -        OsinfoMedia *matched_media = NULL;
>  
>          if (sep)
>              path = g_strndup(path, sep-path);
> @@ -373,15 +372,13 @@ guess_os_from_disk(GList *disk_list)
>          if (!media)
>              continue;
>  
> -        ret = osinfo_db_guess_os_from_media(db, media, &matched_media);
> +        if (osinfo_db_identify_media(db, media)) {

The osinfo_db_identify_media API was introduced in libosinfo-0.2.3 if I
am not mistaken. However, in configure.ac we still require the 0.0.5
version.

> +            g_object_get(G_OBJECT(media), "os", &ret, NULL);
> +            break;
> +        }
>  
>          if (sep)
>              g_free(path);
> -
> -        if (ret) {
> -            g_object_ref(ret);
> -            break;
> -        }
>      }
>  
>      return ret;
> 


ACK if you squash this in:

diff --git a/configure.ac b/configure.ac
index f6937c9..a9c5c34 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10,7 +10,7 @@ AC_CANONICAL_HOST

 AM_SILENT_RULES([yes])

-LIBOSINFO_REQUIRED=0.0.5
+LIBOSINFO_REQUIRED=0.2.3
 LIBVIRT_GCONFIG_REQUIRED=0.0.9
 LIBVIRT_GOBJECT_REQUIRED=0.1.3
 GOBJECT_INTROSPECTION_REQUIRED=0.10.8



Michal

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]