From: Michael Scherer <misc(a)zarb.org>
Like Ubuntu one, it may not be always present.
---
src/inspect_icon.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/src/inspect_icon.c b/src/inspect_icon.c
index d04e2d4..7d08a00 100644
--- a/src/inspect_icon.c
+++ b/src/inspect_icon.c
@@ -55,6 +55,7 @@ static char *icon_rhel (guestfs_h *g, struct inspect_fs *fs, size_t
*size_r);
static char *icon_debian (guestfs_h *g, struct inspect_fs *fs, size_t *size_r);
static char *icon_ubuntu (guestfs_h *g, struct inspect_fs *fs, size_t *size_r);
static char *icon_mageia (guestfs_h *g, struct inspect_fs *fs, size_t *size_r);
+static char *icon_opensuse (guestfs_h *g, struct inspect_fs *fs, size_t *size_r);
static char *icon_windows (guestfs_h *g, struct inspect_fs *fs, size_t *size_r);
/* Dummy static object. */
@@ -136,6 +137,10 @@ guestfs__inspect_get_icon (guestfs_h *g, const char *root, size_t
*size_r,
r = icon_mageia (g, fs, &size);
break;
+ case OS_DISTRO_OPENSUSE:
+ r = icon_opensuse(g, fs, &size);
+ break;
+
/* These are just to keep gcc warnings happy. */
case OS_DISTRO_ARCHLINUX:
case OS_DISTRO_GENTOO:
@@ -309,6 +314,15 @@ icon_mageia (guestfs_h *g, struct inspect_fs *fs, size_t *size_r)
{
return get_png (g, fs, MAGEIA_ICON, size_r, 2048);
}
+
+#define OPENSUSE_ICON "/usr/share/icons/hicolor/24x24/apps/distributor.png"
+
+static char *
+icon_opensuse (guestfs_h *g, struct inspect_fs *fs, size_t *size_r)
+{
+ return get_png (g, fs, OPENSUSE_ICON, size_r, 2048);
+}
+
/* Windows, as usual, has to be much more complicated and stupid than
* anything else.
*
--
1.7.1