On 26.01.2009 05:41, Pavel Roskin wrote: > I'll appreciate if you write your Changelog entries according to the GNU > coding standards. In particular, please don't abbreviate function > names. Ok, second try.
> We have a very similar function search_fs_uuid() in disk/fs_uuid.c, and
> it still uses grub_strcmp(). Should it be using grub_strcasecmp() as
> well? Can we export that function to reuse it in commands/search.c?
Yes it should use grub_strcasecmp, thanks for noticing. I don't know
exactly if we can reuse that function at another place. I leave that to
someone who knows where this code is executed. :-)
--
Mierswa, Daniel
If you still don't like it, that's ok: that's why I'm boss. I simply
know better than you do.
--- Linus Torvalds, comp.os.linux.advocacy, 1996/07/22
Index: commands/search.c
===================================================================
--- commands/search.c (revision 1954)
+++ commands/search.c (working copy)
@@ -115,7 +115,7 @@
(fs->uuid) (dev, &uuid);
if (grub_errno == GRUB_ERR_NONE && uuid)
{
- if (grub_strcmp (uuid, key) == 0)
+ if (grub_strcasecmp (uuid, key) == 0)
{
/* Found! */
count++;
Index: disk/fs_uuid.c
===================================================================
--- disk/fs_uuid.c (revision 1954)
+++ disk/fs_uuid.c (working copy)
@@ -52,7 +52,7 @@
{
(*count)++;
- if (grub_strcmp (uuid, key) == 0)
+ if (grub_strcasecmp (uuid, key) == 0)
{
ret = dev;
grub_free (uuid);
2009-01-23 Daniel Mierswa <[email protected]> * kern/misc.c: add grub_strcasecmp for consistency reasons, use grub_size_t instead of int for str-functions, fix grub_strncasecmp return values, use the same algorithm in both str-functions * include/grub/misc.h: add grub_strcasecmp, use grub_size_t for grub_strncasecmp 2009-01-23 Daniel Mierswa <[email protected]> * commands/search.c: caseless UUID comparing
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Grub-devel mailing list [email protected] http://lists.gnu.org/mailman/listinfo/grub-devel
