From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1LRWIy-0001A3-4F for mharc-grub-devel@gnu.org; Mon, 26 Jan 2009 13:35:28 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LRWIw-000198-AY for grub-devel@gnu.org; Mon, 26 Jan 2009 13:35:26 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LRWIu-00018G-KA for grub-devel@gnu.org; Mon, 26 Jan 2009 13:35:25 -0500 Received: from [199.232.76.173] (port=35696 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LRWIu-000184-D4 for grub-devel@gnu.org; Mon, 26 Jan 2009 13:35:24 -0500 Received: from eta-ori.net ([91.121.142.51]:46673 helo=orion.eta-ori.net) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LRWIs-0004C0-RQ for grub-devel@gnu.org; Mon, 26 Jan 2009 13:35:23 -0500 Received: by orion.eta-ori.net (Postfix, from userid 1006) id 9EE1F2FB574; Mon, 26 Jan 2009 19:35:05 +0100 (CET) Received: from [IPv6:2001:6f8:10ae:0:217:31ff:fe81:8c8] (istari.kleinerfeigling.org [IPv6:2001:6f8:10ae:0:217:31ff:fe81:8c8]) by orion.eta-ori.net (Postfix) with ESMTPSA id A1A552FB51D for ; Mon, 26 Jan 2009 19:35:04 +0100 (CET) Message-ID: <497E00B1.3090001@impulze.org> Date: Mon, 26 Jan 2009 19:28:01 +0100 From: Daniel Mierswa User-Agent: Thunderbird 2.0.0.19 (X11/20090103) MIME-Version: 1.0 To: grub-devel@gnu.org References: <49771040.7010509@impulze.org> <1232559057.17462.2.camel@dv> <49799320.1000300@impulze.org> <1232944909.1604.18.camel@dv> In-Reply-To: <1232944909.1604.18.camel@dv> X-Enigmail-Version: 0.95.7 OpenPGP: id=ADF32F97 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigFD5AC7C8A94BA7E3B91B96E1" X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Re: [PATCH] caseless uuid detection, fixed wrong behaviour for strncasecmp, added strcasecmp X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2009 18:35:26 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigFD5AC7C8A94BA7E3B91B96E1 Content-Type: multipart/mixed; boundary="------------040900080007010006030204" This is a multi-part message in MIME format. --------------040900080007010006030204 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 26.01.2009 05:41, Pavel Roskin wrote: > I'll appreciate if you write your Changelog entries according to the GN= U > 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. :-) --=20 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 --------------040900080007010006030204 Content-Type: text/plain; name="grub2_caseless_uuid.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline; filename="grub2_caseless_uuid.patch" Index: commands/search.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- commands/search.c (revision 1954) +++ commands/search.c (working copy) @@ -115,7 +115,7 @@ (fs->uuid) (dev, &uuid); if (grub_errno =3D=3D GRUB_ERR_NONE && uuid) { - if (grub_strcmp (uuid, key) =3D=3D 0) + if (grub_strcasecmp (uuid, key) =3D=3D 0) { /* Found! */ count++; Index: disk/fs_uuid.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- disk/fs_uuid.c (revision 1954) +++ disk/fs_uuid.c (working copy) @@ -52,7 +52,7 @@ { (*count)++; =20 - if (grub_strcmp (uuid, key) =3D=3D 0) + if (grub_strcasecmp (uuid, key) =3D=3D 0) { ret =3D dev; grub_free (uuid); --------------040900080007010006030204 Content-Type: text/plain; name="ChangeLog" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline; filename="ChangeLog" 2009-01-23 Daniel Mierswa * kern/misc.c: add grub_strcasecmp for consistency reasons, use grub_siz= e_t instead of int for str-functions, fix grub_strncasecmp return values, use the same algorithm in both str-functio= ns * include/grub/misc.h: add grub_strcasecmp, use grub_size_t for grub_strncasecmp 2009-01-23 Daniel Mierswa * commands/search.c: caseless UUID comparing --------------040900080007010006030204-- --------------enigFD5AC7C8A94BA7E3B91B96E1 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.10 (GNU/Linux) iEYEARECAAYFAkl+ALcACgkQm9l44K3zL5daAACfZw/dURR68k3e00QGM5zXwfEr HYUAni6i5DGLjVYMpR7yjB1SoI/F/6Z3 =1rsl -----END PGP SIGNATURE----- --------------enigFD5AC7C8A94BA7E3B91B96E1--