From e110f4dea79c5f1e934b9686e39ada893608d876 Mon Sep 17 00:00:00 2001 From: proski Date: Mon, 6 Jul 2009 20:07:58 +0000 Subject: [PATCH] 2009-07-06 Daniel Mierswa * commands/search.c (search_fs): Use grub_strcasecmp() for UUID comparison. --- ChangeLog | 5 +++++ commands/search.c | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index db77c5d6b..521a32c54 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-07-06 Daniel Mierswa + + * commands/search.c (search_fs): Use grub_strcasecmp() for UUID + comparison. + 2009-07-05 Pavel Roskin * include/grub/i386/linux.h (struct linux_kernel_params): diff --git a/commands/search.c b/commands/search.c index 647f40839..d749bca11 100644 --- a/commands/search.c +++ b/commands/search.c @@ -67,8 +67,10 @@ search_fs (const char *key, const char *var, int no_floppy, int is_uuid) 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 @@ search_fs (const char *key, const char *var, int no_floppy, int is_uuid) (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++;