From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:35786) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uhns2-0002qT-Kn for qemu-devel@nongnu.org; Wed, 29 May 2013 17:25:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uhnry-0007lu-2o for qemu-devel@nongnu.org; Wed, 29 May 2013 17:25:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52580) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uhnrx-0007lq-R1 for qemu-devel@nongnu.org; Wed, 29 May 2013 17:25:18 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r4TLPGi2011620 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 29 May 2013 17:25:16 -0400 Message-ID: <51A6723B.8020107@redhat.com> Date: Wed, 29 May 2013 15:25:15 -0600 From: Eric Blake MIME-Version: 1.0 References: <1369754856-30036-1-git-send-email-kwolf@redhat.com> <1369754856-30036-9-git-send-email-kwolf@redhat.com> In-Reply-To: <1369754856-30036-9-git-send-email-kwolf@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="----enig2ALPLEHPSGBHRSCSITSSM" Subject: Re: [Qemu-devel] [PATCH 08/16] qemu-io: Move 'help' function List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: pbonzini@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com, lcapitulino@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2ALPLEHPSGBHRSCSITSSM Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 05/28/2013 09:27 AM, Kevin Wolf wrote: > No reason to treat it different from other commands. Move it to > qemu-io-cmds.c, adapt the coding style and register it like any other > command. >=20 > Signed-off-by: Kevin Wolf > --- > cmd.c | 79 --------------------------------------------------= -------- > cmd.h | 1 - > qemu-io-cmds.c | 67 ++++++++++++++++++++++++++++++++++++++++++++++++- > 3 files changed, 66 insertions(+), 81 deletions(-) > -void > -help_init(void) > -{ > - help_cmd.name =3D _("help"); > - help_cmd.altname =3D _("?"); > - help_cmd.cfunc =3D help_f; > - help_cmd.argmin =3D 0; > - help_cmd.argmax =3D 1; > - help_cmd.flags =3D CMD_FLAG_GLOBAL; > - help_cmd.args =3D _("[command]"); > - help_cmd.oneline =3D _("help for one or all commands"); The old code marked strings for translation with _(), ... > +static const cmdinfo_t help_cmd =3D { > + .name =3D "help", > + .altname =3D "?", > + .cfunc =3D help_f, > + .argmin =3D 0, > + .argmax =3D 1, > + .flags =3D CMD_FLAG_GLOBAL, > + .args =3D "[command]", > + .oneline =3D "help for one or all commands", =2E..whereas the new code uses fixed literals. Then again, po/messages.p= o doesn't contain any mention of cmd.c, so it's not like we were actually translating the strings, even if they were marked for translation. So no real change. Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org ------enig2ALPLEHPSGBHRSCSITSSM 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.13 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJRpnI7AAoJEKeha0olJ0NqrzMH/0YeR0Wb5e68aJCjYMZ1Q0GC mHIHp1L8kVC8UQMGOgs1CqyLCXTrtNxMBuvn+6VaqWiRpdZDwwYB+ASGBacFLSm/ NOwW938H56z031U7YrFjS5lnAT/YXde/yCMcSehYHMvuRKolRrIgoHpEJkWQ2tIq iIxqpK4olWw7evNrkp7wb+62CTzdBUJQmLGM/+gRPux5H9SNc+uO0dl/H9YD482B Ejr6MGftnKEnLLX89wOZvWaZ6cZBfk+HlqZPmXc85HKVxJZssQ/9gSDqyYv95b4A 4ekbip50XFLKOR70ZVgh2U+lvYTDPZwNG12FLntR5zQ62e6UqlKcuv8kJPKhVHo= =6X+R -----END PGP SIGNATURE----- ------enig2ALPLEHPSGBHRSCSITSSM--