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

Pino Toscano ptoscano at redhat.com
Tue Jul 26 08:45:33 UTC 2016


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;
-- 
2.7.4




More information about the Libguestfs mailing list