From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1VqAai-0005MZ-3C for mharc-grub-devel@gnu.org; Mon, 09 Dec 2013 18:50:20 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44691) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VqAaX-00058f-6Y for grub-devel@gnu.org; Mon, 09 Dec 2013 18:50:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VqAaM-0005WT-J6 for grub-devel@gnu.org; Mon, 09 Dec 2013 18:50:09 -0500 Received: from mail-ee0-x22b.google.com ([2a00:1450:4013:c00::22b]:44162) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VqAaM-0005WO-Bt for grub-devel@gnu.org; Mon, 09 Dec 2013 18:49:58 -0500 Received: by mail-ee0-f43.google.com with SMTP id c13so1882137eek.30 for ; Mon, 09 Dec 2013 15:49:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type; bh=Qw4IIURYPJ9nKxx/C7tKXN4Clnf4Fe+GAp3DBP+F41g=; b=lQMgUwDEZc4ljfYJAEoTu28asHIbRecsH4gzTKcUd7HkbMC0UoQt2kFRfAuBFu5JAE T6Pbx4r4PqiFrb2oiGnc9JC3oEVSyto1Ake5L8wxK0vm2uWLbpAxlFAKRL7cfa3Nrhcv Zt/iGwVb8/7sNrtIqz+QPm7jWGoQNmOCG532IxW7sB4hQQagdHEQcgcsGZdZNCV5gmBk 4alFh2BY+4PGAFSsO3u6LHlA7ChZdBsYOPyBS8+zmjOhwIAJkhx7aXJWLFKzwECJ6xK3 +/MvZhJbh/zOYuX4QvltB3c0y0MKnLyKIsxnry1GkzH5LcqrphKfOGQj11cgVTAnftlW w+rQ== X-Received: by 10.15.41.140 with SMTP id s12mr14886459eev.50.1386632997471; Mon, 09 Dec 2013 15:49:57 -0800 (PST) Received: from [192.168.1.16] (85-188.196-178.cust.bluewin.ch. [178.196.188.85]) by mx.google.com with ESMTPSA id o1sm34396638eea.10.2013.12.09.15.49.55 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 09 Dec 2013 15:49:56 -0800 (PST) Message-ID: <52A65723.3020107@gmail.com> Date: Tue, 10 Dec 2013 00:49:55 +0100 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131103 Icedove/17.0.10 MIME-Version: 1.0 To: The development of GNU GRUB Subject: Re: [PATCH] sort target list in grub-mkimage help output to make it easier to read References: <1386422873-20547-1-git-send-email-arvidjaar@gmail.com> In-Reply-To: <1386422873-20547-1-git-send-email-arvidjaar@gmail.com> X-Enigmail-Version: 1.6 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="vKNafS5plIIi13vUfrwCJGl98CtOpXNPK" X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4013:c00::22b X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Dec 2013 23:50:17 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --vKNafS5plIIi13vUfrwCJGl98CtOpXNPK Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable What about similar architectures with dissimilar name? Like i386-efi and x86_64-efi ? And do we really want arm to come first with most common platforms ending somewhere in the middle? On 07.12.2013 14:27, Andrey Borzenkov wrote: > --- > util/mkimage.c | 12 +++++++++--- > 1 file changed, 9 insertions(+), 3 deletions(-) >=20 > diff --git a/util/mkimage.c b/util/mkimage.c > index ad12f8a..94f7edb 100644 > --- a/util/mkimage.c > +++ b/util/mkimage.c > @@ -959,21 +959,27 @@ grub_util_get_target_name (const struct grub_inst= all_image_target_desc *t) > char * > grub_install_get_image_targets_string (void) > { > + const char **arr =3D xmalloc (sizeof (char *) * ARRAY_SIZE (image_ta= rgets)); > int format_len =3D 0; > char *formats; > char *ptr; > unsigned i; > for (i =3D 0; i < ARRAY_SIZE (image_targets); i++) > - format_len +=3D strlen (image_targets[i].names[0]) + 2; > + { > + arr[i] =3D image_targets[i].names[0]; > + format_len +=3D strlen (image_targets[i].names[0]) + 2; > + } > ptr =3D formats =3D xmalloc (format_len); > + qsort (arr, ARRAY_SIZE (image_targets), sizeof (char *), grub_qsort_= strcmp); > for (i =3D 0; i < ARRAY_SIZE (image_targets); i++) > { > - strcpy (ptr, image_targets[i].names[0]); > - ptr +=3D strlen (image_targets[i].names[0]); > + strcpy (ptr, arr[i]); > + ptr +=3D strlen (arr[i]); > *ptr++ =3D ','; > *ptr++ =3D ' '; > } > ptr[-2] =3D 0; > + free (arr); > =20 > return formats; > } >=20 --vKNafS5plIIi13vUfrwCJGl98CtOpXNPK Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.15 (GNU/Linux) Comment: Using GnuPG with Icedove - http://www.enigmail.net/ iF4EAREKAAYFAlKmVyMACgkQmBXlbbo5nOv8FQD/co4Nmf8PQthuqZ+dIJdQUxnp F2TexnrpvRucebl94b0A/i+ZA7S+gBQVsvPFYPc3RaIUDOZJatn/KbLAtlS14N1p =h16z -----END PGP SIGNATURE----- --vKNafS5plIIi13vUfrwCJGl98CtOpXNPK--