diff --git a/docs/guestfs-release-notes-1.56.pod b/docs/guestfs-release-notes-1.56.pod index 68c6aec57..6336b385b 100644 --- a/docs/guestfs-release-notes-1.56.pod +++ b/docs/guestfs-release-notes-1.56.pod @@ -23,6 +23,9 @@ Inspecting guests that have duplicated root mountpoints now works. Inspection of SUSE Linux guests using btrfs snapshots now ignore snapshots that mirror content in the root filesystem. +Inspection of SUSE Linux >= 15 now returns the correct osinfo short +name (eg. C<"sle15">) (thanks Ming Xie). + =head2 API New C and C APIs which allow you to capture @@ -155,6 +158,10 @@ Lost error when opening wrong format of image readonly [rhel-10.1] RFE: Investigate & do something useful with btrfsvol:...snapshots in SUSE Linux guests +=item L + +libguestfs generates the wrong osinfo for SLES 15 guests [rhel-9.6] + =item L 1.54.0: gdisk/test-expand-gpt.pl fails diff --git a/lib/inspect-osinfo.c b/lib/inspect-osinfo.c index f792d771a..1fc2f59ab 100644 --- a/lib/inspect-osinfo.c +++ b/lib/inspect-osinfo.c @@ -62,10 +62,11 @@ guestfs_impl_inspect_get_osinfo (guestfs_h *g, const char *root) else if (STREQ (distro, "fedora") || STREQ (distro, "mageia")) return safe_asprintf (g, "%s%d", distro, major); else if (STREQ (distro, "sles")) { + const char *base = major >= 15 ? "sle" : "sles"; if (minor == 0) - return safe_asprintf (g, "%s%d", distro, major); + return safe_asprintf (g, "%s%d", base, major); else - return safe_asprintf (g, "%s%dsp%d", distro, major, minor); + return safe_asprintf (g, "%s%dsp%d", base, major, minor); } else if (STREQ (distro, "ubuntu")) return safe_asprintf (g, "%s%d.%02d", distro, major, minor);