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

Re: [Libguestfs] [PATCH 2/2] inspect: Use new inspect_list_applications2 API call



On Thu, Nov 01, 2012 at 12:17:26PM -0400, John Eckersberg wrote:
> ---
>  inspector/virt-inspector.c | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/inspector/virt-inspector.c b/inspector/virt-inspector.c
> index 8b06fa7..fc74191 100644
> --- a/inspector/virt-inspector.c
> +++ b/inspector/virt-inspector.c
> @@ -705,13 +705,13 @@ output_drive_mappings (xmlTextWriterPtr xo, char *root)
>  static void
>  output_applications (xmlTextWriterPtr xo, char *root)
>  {
> -  struct guestfs_application_list *apps;
> +  struct guestfs_application2_list *apps;
>    size_t i;
>  
>    /* This returns an empty list if we simply couldn't determine the
>     * applications, so if it returns NULL then it's a real error.
>     */
> -  apps = guestfs_inspect_list_applications (g, root);
> +  apps = guestfs_inspect_list_applications2 (g, root);
>    if (apps == NULL)
>      exit (EXIT_FAILURE);
>  
> @@ -747,6 +747,10 @@ output_applications (xmlTextWriterPtr xo, char *root)
>        XMLERROR (-1,
>          xmlTextWriterWriteElement (xo, BAD_CAST "release",
>                                     BAD_CAST apps->val[i].app_release));
> +    if (apps->val[i].app_arch && apps->val[i].app_arch[0])
> +      XMLERROR (-1,
> +        xmlTextWriterWriteElement (xo, BAD_CAST "arch",
> +                                   BAD_CAST apps->val[i].app_arch));
>      if (apps->val[i].app_install_path && apps->val[i].app_install_path[0])
>        XMLERROR (-1,
>          xmlTextWriterWriteElement (xo, BAD_CAST "install_path",
> @@ -777,7 +781,7 @@ output_applications (xmlTextWriterPtr xo, char *root)
>  
>    XMLERROR (-1, xmlTextWriterEndElement (xo));
>  
> -  guestfs_free_application_list (apps);
> +  guestfs_free_application2_list (apps);
>  }
>  
>  static void
> -- 
> 1.7.11.7

Yup, this is fine, but will need quite a bit of modification
when s/app/app2/.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://et.redhat.com/~rjones/virt-top


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