[2397] 2009-07-06 Daniel Mierswa <[email protected]>

Pavel Roskin <[email protected]> Mon, 06 Jul 2009 20:07:58 +0000
Newsgroups gmane.comp.boot-loaders.grub.cvs
Message-ID <[email protected]>
Revision: 2397
          http://svn.sv.gnu.org/viewvc/?view=rev&root=grub&revision=2397
Author:   proski
Date:     2009-07-06 20:07:58 +0000 (Mon, 06 Jul 2009)
Log Message:
-----------
2009-07-06  Daniel Mierswa  <[email protected]>

	* commands/search.c (search_fs): Use grub_strcasecmp() for UUID
	comparison.

Modified Paths:
--------------
    trunk/grub2/ChangeLog
    trunk/grub2/commands/search.c

Modified: trunk/grub2/ChangeLog
===================================================================
--- trunk/grub2/ChangeLog	2009-07-06 02:10:57 UTC (rev 2396)
+++ trunk/grub2/ChangeLog	2009-07-06 20:07:58 UTC (rev 2397)
@@ -1,3 +1,8 @@
+2009-07-06  Daniel Mierswa  <[email protected]>
+
+	* commands/search.c (search_fs): Use grub_strcasecmp() for UUID
+	comparison.
+
 2009-07-05  Pavel Roskin  <[email protected]>
 
 	* include/grub/i386/linux.h (struct linux_kernel_params):

Modified: trunk/grub2/commands/search.c
===================================================================
--- trunk/grub2/commands/search.c	2009-07-06 02:10:57 UTC (rev 2396)
+++ trunk/grub2/commands/search.c	2009-07-06 20:07:58 UTC (rev 2397)
@@ -67,8 +67,10 @@
       if (dev)
 	{
 	  grub_fs_t fs;
+	  int (*compare_fn) (const char *, const char *);
 
 	  fs = grub_fs_probe (dev);
+	  compare_fn = is_uuid ? grub_strcasecmp : grub_strcmp;
 
 #define QUID(x)	(is_uuid ? (x)->uuid : (x)->label)
 
@@ -79,7 +81,7 @@
 	      (QUID(fs)) (dev, &quid);
 	      if (grub_errno == GRUB_ERR_NONE && quid)
 		{
-		  if (grub_strcmp (quid, key) == 0)
+		  if (compare_fn (quid, key) == 0)
 		    {
 		      /* Found!  */
 		      count++;