From 15d79b5ea95ba28ebf6d8bb7542d86702edc1e8f Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Fri, 14 Oct 2011 01:05:04 +0200 Subject: [PATCH] Add the Opensuse logo ( thanks to Vincent Untz ) Like Ubuntu one, it may not be always present. --- src/inspect_icon.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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.8.3.1