[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] caseless uuid detection, fixed wrong behaviour for strncasec

From: Daniel Mierswa
Subject: Re: [PATCH] caseless uuid detection, fixed wrong behaviour for strncasecmp, added strcasecmp
Date: Mon, 26 Jan 2009 19:28:01 +0100
User-agent: Thunderbird (X11/20090103)

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!  */
Index: disk/fs_uuid.c
--- disk/fs_uuid.c      (revision 1954)
+++ disk/fs_uuid.c      (working copy)
@@ -52,7 +52,7 @@
-                 if (grub_strcmp (uuid, key) == 0)
+                 if (grub_strcasecmp (uuid, key) == 0)
                      ret = dev;
                      grub_free (uuid);
2009-01-23  Daniel Mierswa <address@hidden>
        * kern/misc.c: add grub_strcasecmp for consistency reasons, use 
                       instead of int for str-functions, fix grub_strncasecmp
                       return values, use the same algorithm in both 
        * include/grub/misc.h: add grub_strcasecmp, use grub_size_t for

2009-01-23  Daniel Mierswa <address@hidden>
        * commands/search.c: caseless UUID comparing

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]