[Libguestfs] [PATCH 5/5] inspect: correct osinfo ID for ALT Linux >= 8

Richard W.M. Jones rjones at redhat.com
Wed Apr 3 12:24:10 UTC 2019


On Tue, Apr 02, 2019 at 02:56:30PM +0200, Pino Toscano wrote:
> ALT Linux 8.x has different IDs in osinfo-db, so return the proper IDs
> for the newest stable series.
> ---
>  lib/inspect-osinfo.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/lib/inspect-osinfo.c b/lib/inspect-osinfo.c
> index 51612bad1..90b7ffd86 100644
> --- a/lib/inspect-osinfo.c
> +++ b/lib/inspect-osinfo.c
> @@ -62,6 +62,11 @@ guestfs_impl_inspect_get_osinfo (guestfs_h *g, const char *root)
>      else if (STREQ (distro, "archlinux") || STREQ (distro, "gentoo")
>               || STREQ (distro, "voidlinux"))
>        return safe_strdup (g, distro);
> +    else if (STREQ (distro, "altlinux")) {
> +      if (major >= 8)
> +        return safe_asprintf (g, "alt%d.%d", major, minor);
> +      return safe_asprintf (g, "%s%d.%d", distro, major, minor);
> +    }

ACK series.

Thanks,

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine.  Supports Linux and Windows.
http://people.redhat.com/~rjones/virt-df/




More information about the Libguestfs mailing list