[Pkg-libvirt-commits] [libguestfs] 10/26: inspection: lift size limit for RHEL icons
Hilko Bengen
bengen at moszumanska.debian.org
Sun Nov 1 17:11:26 UTC 2015
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to annotated tag upstream/1.28.12
in repository libguestfs.
commit 7581b7ade2afe9eed8fa7a1122662397f21a5465
Author: Pino Toscano <ptoscano at redhat.com>
Date: Fri May 29 16:01:25 2015 +0200
inspection: lift size limit for RHEL icons
In RHEL-based distros, the provided icons have (obviously) different
sizes than the RHEL ones, used in icon_rhel as reference.
Since 100K should be a reasonable threshold for avoid keeping a
per-distro list of limits, just use it as only size limit.
(cherry picked from commit a50af9e14875a6e8d447c4e7f75447c31f00bd0c)
---
src/inspect-icon.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/src/inspect-icon.c b/src/inspect-icon.c
index b1b3adf..952cfce 100644
--- a/src/inspect-icon.c
+++ b/src/inspect-icon.c
@@ -316,24 +316,21 @@ icon_fedora (guestfs_h *g, struct inspect_fs *fs, size_t *size_r)
*
* Conveniently the RHEL clones also have the same file with the
* same name, but containing their own logos. Sense prevails!
+ *
+ * Use a generic 100K limit for all the images, as logos in the
+ * RHEL clones have different sizes.
*/
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->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, size_r, max_size);
+ return get_png (g, fs, shadowman, size_r, 102400);
}
#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