CentOS 8 is represented with a simpler "centos8" osinfo ID.
---
lib/inspect-osinfo.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lib/inspect-osinfo.c b/lib/inspect-osinfo.c
index 90b7ffd86..ba07e4564 100644
--- a/lib/inspect-osinfo.c
+++ b/lib/inspect-osinfo.c
@@ -40,7 +40,9 @@ guestfs_impl_inspect_get_osinfo (guestfs_h *g, const char *root)
if (STREQ (type, "linux")) {
if (STREQ (distro, "centos")) {
- if (major >= 7)
+ if (major >= 8)
+ return safe_asprintf (g, "%s%d", distro, major);
+ else if (major == 7)
return safe_asprintf (g, "%s%d.0", distro, major);
else if (major == 6)
return safe_asprintf (g, "%s%d.%d", distro, major, minor);
--
2.23.0