[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 2.0.0.19 (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! */
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 <address@hidden>
* 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 <address@hidden>
* commands/search.c: caseless UUID comparing
signature.asc
Description: OpenPGP digital signature
- [PATCH] caseless uuid detection, fixed wrong behaviour for strncasecmp, added strcasecmp, Daniel Mierswa, 2009/01/21
- Re: [PATCH] caseless uuid detection, fixed wrong behaviour for strncasecmp, added strcasecmp, Pavel Roskin, 2009/01/21
- Re: [PATCH] caseless uuid detection, fixed wrong behaviour for strncasecmp, added strcasecmp, Daniel Mierswa, 2009/01/23
- Re: [PATCH] caseless uuid detection, fixed wrong behaviour for strncasecmp, added strcasecmp, Pavel Roskin, 2009/01/26
- Re: [PATCH] caseless uuid detection, fixed wrong behaviour for strncasecmp, added strcasecmp,
Daniel Mierswa <=
- Re: [PATCH] caseless uuid detection, fixed wrong behaviour for strncasecmp, added strcasecmp, Pavel Roskin, 2009/01/27
- Re: [PATCH] caseless uuid detection, fixed wrong behaviour for strncasecmp, added strcasecmp, Pavel Roskin, 2009/01/27
- Re: [PATCH] caseless uuid detection, fixed wrong behaviour for strncasecmp, added strcasecmp, ebik, 2009/01/28