inspect: revamp icon extraction for *SUSE guests

Newer versions do not have the 24px distributor.png icon; OTOH they have
the 48px version, so look for that one before the 24px one.

Also, bump the size limit to 10K, as newer versions of the icon are
bigger than 3K.
This commit is contained in:
Pino Toscano
2019-02-06 15:19:53 +01:00
parent 6ff95acc72
commit f41a75cea6

View File

@@ -354,12 +354,16 @@ icon_mageia (guestfs_h *g, size_t *size_r)
return get_png (g, MAGEIA_ICON, size_r, 10240);
}
#define OPENSUSE_ICON "/usr/share/icons/hicolor/24x24/apps/distributor.png"
static char *
icon_opensuse (guestfs_h *g, size_t *size_r)
{
return get_png (g, OPENSUSE_ICON, size_r, 2048);
const char *icons[] = {
"/usr/share/icons/hicolor/48x48/apps/distributor.png",
"/usr/share/icons/hicolor/24x24/apps/distributor.png",
NULL
};
return find_png (g, icons, size_r, 10240);
}
#if CAN_DO_CIRROS