qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Marcel Apfelbaum <marcel@redhat.com>
To: Eduardo Habkost <ehabkost@redhat.com>, qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	lersek@redhat.com, armbru@redhat.com
Subject: Re: [Qemu-devel] [PATCH v2 4/4] vl: Set error location when parsing memory options
Date: Fri, 12 Feb 2016 21:35:18 +0200	[thread overview]
Message-ID: <56BE33F6.9050901@redhat.com> (raw)
In-Reply-To: <1455303747-19776-5-git-send-email-ehabkost@redhat.com>

On 02/12/2016 09:02 PM, Eduardo Habkost wrote:
> Set error location so the error_report() calls will show
> appropriate command-line argument or config file info.
>
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> ---
>   vl.c | 6 ++++++
>   1 file changed, 6 insertions(+)
>
> diff --git a/vl.c b/vl.c
> index 50cd018..8fe79dd 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -2907,6 +2907,10 @@ static void set_memory_options(uint64_t *ram_slots, ram_addr_t *maxram_size,
>       const char *maxmem_str, *slots_str;
>       const ram_addr_t default_ram_size = mc->default_ram_size;
>       QemuOpts *opts = qemu_find_opts_singleton("memory");
> +    Location loc;
> +
> +    loc_push_none(&loc);
> +    qemu_opts_loc_restore(opts);
>
>       sz = 0;
>       mem_str = qemu_opt_get(opts, "size");
> @@ -2981,6 +2985,8 @@ static void set_memory_options(uint64_t *ram_slots, ram_addr_t *maxram_size,
>                   "'%s' option", slots_str ? "maxmem" : "slots");
>           exit(EXIT_FAILURE);
>       }
> +
> +    loc_pop(&loc);
>   }
>
>   int main(int argc, char **argv, char **envp)
>

Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>


Thanks,
Marcel

  reply	other threads:[~2016-02-12 19:35 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-12 19:02 [Qemu-devel] [PATCH v2 0/4] Error location reporting fixes Eduardo Habkost
2016-02-12 19:02 ` [Qemu-devel] [PATCH v2 1/4] vl.c: Fix regression in machine error message Eduardo Habkost
2016-02-15 10:20   ` Markus Armbruster
2016-02-15 10:54     ` Marcel Apfelbaum
2016-02-15 11:53       ` Laszlo Ersek
2016-02-15 14:30       ` Markus Armbruster
2016-02-16 12:46         ` Markus Armbruster
2016-02-12 19:02 ` [Qemu-devel] [PATCH v2 2/4] vl: Reset location after handling command-line arguments Eduardo Habkost
2016-02-12 19:34   ` Marcel Apfelbaum
2016-02-15 10:29   ` Markus Armbruster
2016-02-15 15:22     ` Eduardo Habkost
2016-02-12 19:02 ` [Qemu-devel] [PATCH v2 3/4] replay: Set error location properly when parsing options Eduardo Habkost
2016-02-12 19:34   ` Marcel Apfelbaum
2016-02-12 19:02 ` [Qemu-devel] [PATCH v2 4/4] vl: Set error location when parsing memory options Eduardo Habkost
2016-02-12 19:35   ` Marcel Apfelbaum [this message]
2016-02-15 10:33 ` [Qemu-devel] [PATCH v2 0/4] Error location reporting fixes Markus Armbruster
2016-02-16 14:57 ` [Qemu-devel] [PATCH 5/4] vl: Clean up machine selection in main() Markus Armbruster
2016-02-16 15:34   ` Laszlo Ersek
2016-02-16 19:56     ` Markus Armbruster
2016-02-16 16:27   ` Marcel Apfelbaum
2016-02-16 19:52     ` Markus Armbruster
2016-02-16 20:03 ` [Qemu-devel] [PATCH v2 0/4] Error location reporting fixes Markus Armbruster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56BE33F6.9050901@redhat.com \
    --to=marcel@redhat.com \
    --cc=armbru@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=lersek@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).