mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
lib: Add osinfo information for Windows Server 2022 Datacenter
Windows Server 2022 preview is identified as <osinfo>win2k16</osinfo>. Although current osinfo-db does not have an entry "win2k22", return this instead. osinfo-db issue to add win2k22: https://gitlab.com/libosinfo/osinfo-db/-/issues/82 Inspection information for the guest: type: windows distro: windows product_name: Windows Server 2022 Datacenter product_variant: Server version: 10.0 arch: x86_64 Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1997446 Reported-by: Yongkui Guo
This commit is contained in:
@@ -132,7 +132,9 @@ guestfs_impl_inspect_get_osinfo (guestfs_h *g, const char *root)
|
||||
switch (minor) {
|
||||
case 0:
|
||||
if (strstr (product_variant, "Server")) {
|
||||
if (strstr (product_name, "2019"))
|
||||
if (strstr (product_name, "2022"))
|
||||
return safe_strdup (g, "win2k22");
|
||||
else if (strstr (product_name, "2019"))
|
||||
return safe_strdup (g, "win2k19");
|
||||
else
|
||||
return safe_strdup (g, "win2k16");
|
||||
|
||||
Reference in New Issue
Block a user