[Pkg-libvirt-commits] [libguestfs] 68/116: inspection: Get icons from RHEL and CentOS 7 (RHBZ#1164619).

Hilko Bengen bengen at moszumanska.debian.org
Wed Nov 26 22:05:18 UTC 2014


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to annotated tag debian/1%1.29.10-1
in repository libguestfs.

commit c8a608ecf8576bb754749db982714fa35cedfbe4
Author: Richard W.M. Jones <rjones at redhat.com>
Date:   Mon Nov 17 10:25:33 2014 +0000

    inspection: Get icons from RHEL and CentOS 7 (RHBZ#1164619).
---
 src/inspect-icon.c | 22 +++++++++++++---------
 1 file changed, 13 insertions(+), 9 deletions(-)

diff --git a/src/inspect-icon.c b/src/inspect-icon.c
index 9871fde..32aa6e5 100644
--- a/src/inspect-icon.c
+++ b/src/inspect-icon.c
@@ -304,24 +304,28 @@ icon_fedora (guestfs_h *g, struct inspect_fs *fs, size_t *size_r)
  * RHEL 5, 6:
  * As above, but the file has been optimized to about 16K.
  *
+ * In RHEL 7 the logos were completely broken (RHBZ#1063300).
+ *
  * Conveniently the RHEL clones also have the same file with the
  * same name, but containing their own logos.  Sense prevails!
  */
-#define SHADOWMAN_ICON "/usr/share/pixmaps/redhat/shadowman-transparent.png"
-
 static char *
 icon_rhel (guestfs_h *g, struct inspect_fs *fs, size_t *size_r)
 {
   size_t max_size = 0;
+  const char *shadowman;
 
-  if (fs->distro == OS_DISTRO_RHEL) {
-    if (fs->major_version <= 4)
-      max_size = 66000;
-    else
-      max_size = 17000;
-  }
+  if (fs->major_version >= 5 && fs->major_version <= 6)
+    max_size = 17000;
+  else
+    max_size = 66000;
+
+  if (fs->major_version <= 6)
+    shadowman = "/usr/share/pixmaps/redhat/shadowman-transparent.png";
+  else
+    shadowman = "/usr/share/pixmaps/fedora-logo-sprite.png";
 
-  return get_png (g, fs, SHADOWMAN_ICON, size_r, max_size);
+  return get_png (g, fs, shadowman, size_r, max_size);
 }
 
 #define DEBIAN_ICON "/usr/share/pixmaps/debian-logo.png"

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git



More information about the Pkg-libvirt-commits mailing list