qemu-devel
[Top][All Lists]
Advanced

[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

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]