[Libguestfs] [PATCH] osinfo: map "sled" as "sles"

Richard W.M. Jones rjones at redhat.com
Tue Jul 26 10:17:47 UTC 2016


On Tue, Jul 26, 2016 at 10:45:33AM +0200, Pino Toscano wrote:
> The "sles" distribution string in libguestfs represents both SLES and
> SLED, so map the osinfo descriptions of "sled" distributions as "sles".
> ---
>  src/osinfo.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/osinfo.c b/src/osinfo.c
> index 907580e..7fdaf1c 100644
> --- a/src/osinfo.c
> +++ b/src/osinfo.c
> @@ -625,7 +625,7 @@ parse_distro (guestfs_h *g, xmlNodePtr node, struct osinfo *osinfo)
>        osinfo->distro = OS_DISTRO_OPENSUSE;
>      else if (STREQ (content, "rhel"))
>        osinfo->distro = OS_DISTRO_RHEL;
> -    else if (STREQ (content, "sles"))
> +    else if (STREQ (content, "sled") || STREQ (content, "sles"))
>        osinfo->distro = OS_DISTRO_SLES;
>      else if (STREQ (content, "ubuntu"))
>        osinfo->distro = OS_DISTRO_UBUNTU;

ACK.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://libguestfs.org




More information about the Libguestfs mailing list