[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 08/16] qemu-io: Move 'help' function
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH 08/16] qemu-io: Move 'help' function |
Date: |
Wed, 29 May 2013 15:25:15 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130514 Thunderbird/17.0.6 |
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.
>
> Signed-off-by: Kevin Wolf <address@hidden>
> ---
> 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 = _("help");
> - help_cmd.altname = _("?");
> - help_cmd.cfunc = help_f;
> - help_cmd.argmin = 0;
> - help_cmd.argmax = 1;
> - help_cmd.flags = CMD_FLAG_GLOBAL;
> - help_cmd.args = _("[command]");
> - help_cmd.oneline = _("help for one or all commands");
The old code marked strings for translation with _(), ...
> +static const cmdinfo_t help_cmd = {
> + .name = "help",
> + .altname = "?",
> + .cfunc = help_f,
> + .argmin = 0,
> + .argmax = 1,
> + .flags = CMD_FLAG_GLOBAL,
> + .args = "[command]",
> + .oneline = "help for one or all commands",
...whereas the new code uses fixed literals. Then again, po/messages.po
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 <address@hidden>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH 02/16] cutils: Support 'P' and 'E' suffixes in strtosz(), (continued)
- [Qemu-devel] [PATCH 02/16] cutils: Support 'P' and 'E' suffixes in strtosz(), Kevin Wolf, 2013/05/28
- [Qemu-devel] [PATCH 03/16] qemu-io: Make cvtnum() a wrapper around strtosz_suffix(), Kevin Wolf, 2013/05/28
- [Qemu-devel] [PATCH 04/16] qemu-io: Handle cvtnum() errors in 'alloc', Kevin Wolf, 2013/05/28
- [Qemu-devel] [PATCH 05/16] qemu-io: Don't use global bs in command implementations, Kevin Wolf, 2013/05/28
- [Qemu-devel] [PATCH 08/16] qemu-io: Move 'help' function, Kevin Wolf, 2013/05/28
- Re: [Qemu-devel] [PATCH 08/16] qemu-io: Move 'help' function,
Eric Blake <=
- [Qemu-devel] [PATCH 07/16] qemu-io: Factor out qemuio_command, Kevin Wolf, 2013/05/28
- [Qemu-devel] [PATCH 09/16] qemu-io: Move 'quit' function, Kevin Wolf, 2013/05/28
- [Qemu-devel] [PATCH 06/16] qemu-io: Split off commands to qemu-io-cmds.c, Kevin Wolf, 2013/05/28
- [Qemu-devel] [PATCH 10/16] qemu-io: Move qemu_strsep() to cutils.c, Kevin Wolf, 2013/05/28
- [Qemu-devel] [PATCH 11/16] qemu-io: Move functions for registering and running commands, Kevin Wolf, 2013/05/28