[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 13/16] vl.c: Reword -machine help error messa
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH v2 13/16] vl.c: Reword -machine help error messages |
Date: |
Thu, 29 Oct 2015 18:27:57 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Eduardo Habkost <address@hidden> writes:
> * Use "\n" consistently in both error messages.
> * Simplify error message.
>
> Signed-off-by: Eduardo Habkost <address@hidden>
> ---
> vl.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/vl.c b/vl.c
> index 61e474b..55521a0 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -2634,8 +2634,8 @@ static gint machine_class_cmp(gconstpointer a,
> gconstpointer b)
> return mc;
> }
> if (name && !is_help_option(name)) {
> - error_report("unsupported machine type");
> - error_printf("Use -machine help to list supported machines!\n");
> + error_report("unsupported machine type\n"
> + "Use -machine help to list supported machines");
error_report()'s contract:
/*
* Print an error message to current monitor if we have one, else to stderr.
* Format arguments like sprintf(). The result should not contain
* newlines.
* Prepend the current location and append a newline.
* It's wrong to call this in a QMP monitor. Use error_setg() there.
*/
The old code gets it right.
You could squash the removal of '!' into PATCH 03.
> } else {
> printf("Supported machines are:\n");
> machines = g_slist_sort(machines, machine_class_cmp);
> @@ -3994,8 +3994,8 @@ int main(int argc, char **argv, char **envp)
> }
>
> if (machine_class == NULL) {
> - error_report("No machine specified, and there is no default.\n"
> - "Use -machine help to list supported machines!");
> + error_report("no machine specified\n"
> + "Use -machine help to list supported machines");
> exit(1);
> }
Likewise.
- [Qemu-devel] [PATCH v2 07/16] vl.c: Use "%s support disabled" error messages consistently, (continued)
- [Qemu-devel] [PATCH v2 07/16] vl.c: Use "%s support disabled" error messages consistently, Eduardo Habkost, 2015/10/28
- [Qemu-devel] [PATCH v2 09/16] vl.c: Reword -no-kvm-pit-reinjection deprecation warning, Eduardo Habkost, 2015/10/28
- [Qemu-devel] [PATCH v2 10/16] vl.c: Convert error sentences to simpler phrases, Eduardo Habkost, 2015/10/28
- [Qemu-devel] [PATCH v2 11/16] vl.c: Remove unnecessary uppercase in error messages, Eduardo Habkost, 2015/10/28
- [Qemu-devel] [PATCH v2 12/16] vl.c: trivial: Don't wrap lines unnecessarily, Eduardo Habkost, 2015/10/28
- [Qemu-devel] [PATCH v2 14/16] vl.c: Simplify date format error message, Eduardo Habkost, 2015/10/28
- [Qemu-devel] [PATCH v2 13/16] vl.c: Reword -machine help error messages, Eduardo Habkost, 2015/10/28
- Re: [Qemu-devel] [PATCH v2 13/16] vl.c: Reword -machine help error messages,
Markus Armbruster <=
- [Qemu-devel] [PATCH v2 15/16] vl.c: Use US spelling for "unrecognized", Eduardo Habkost, 2015/10/28
- [Qemu-devel] [PATCH v2 16/16] vl.c: Reword fw_cfg name prefix warning, Eduardo Habkost, 2015/10/28