Skip to contentSkip to conversation

GRUB doesn't allow background images with upper case file extensions

PATCH Alexander Kurtz 1 participant 2 messages Jan 26, 2011 – Feb 6, 2011

lore
Share & tools
lore
#0 lore raw

Dear GRUB developers,

when I try to use background images with upper case file extensions (e.g. `foo.JPEG') it doesn't work. If I try to debug this manually from the grub shell, I get this:

grub> background_image /grub/comet.JPEG
error: unsupported bitmap format
grub>

This is unfortunate since most digital cameras produce images with upper case file extensions. FAT filesystems and Windows in general might be other sources of files with upper case file extensions.

I can confirm that the attached patch fixes the problem for me. If you have no objections, please include it in the next version.

Best regards

Alexander Kurtz

PS: I first reported this to the Debian BTS, see
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=611123

debian/changelog +7 -0
diff -Naur grub2-1.99~rc1.orig/debian/changelog grub2-1.99~rc1/debian/changelog
@@ -1,3 +1,10 @@
+grub2 (1.99~rc1-1.1) experimental; urgency=low
+
+  * Non-maintainer upload
+  * Ignore case of file extensions of background images (closes: #611123).
+  
+ -- Alexander Kurtz <[email protected]>  Tue, 25 Jan 2011 20:00:54 +0100
+
 grub2 (1.99~rc1-1) experimental; urgency=low
 
   [ Colin Watson ]
grub-core/video/bitmap.c +1 -1
diff -Naur grub2-1.99~rc1.orig/grub-core/video/bitmap.c grub2-1.99~rc1/grub-core/video/bitmap.c
@@ -177,7 +177,7 @@
 
   pos -= ext_len;
 
-  return grub_strcmp (filename + pos, ext) == 0;
+  return grub_strcasecmp (filename + pos, ext) == 0;
 }
 
 /* Loads bitmap using registered bitmap readers.  */
#1 lore raw

Am Mittwoch, den 26.01.2011, 11:20 +0100 schrieb Alexander Kurtz:

Quoted 2 lines

I can confirm that the attached patch fixes the problem for me. If you have no objections, please include it in the next version.

Ping?