From: Anthony Liguori <anthony@codemonkey.ws>
To: "Andreas Färber" <andreas.faerber@web.de>
Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] vl.c: Fail gracefully if no machine is found
Date: Fri, 11 Nov 2011 13:45:50 -0600 [thread overview]
Message-ID: <4EBD7B6E.70308@codemonkey.ws> (raw)
In-Reply-To: <1320939332-31871-1-git-send-email-andreas.faerber@web.de>
On 11/10/2011 09:35 AM, Andreas Färber wrote:
> machine defaults to find_default_machine(),
> then gets overridden via -M and machine_parse().
>
> If no -M is specified and find_default_machine() returns NULL
> (when no machine compiled in), exit with an error.
>
> Avoids a segfault when setting machine->max_cpus.
>
> Signed-off-by: Andreas Färber<andreas.faerber@web.de>
Applied. Thanks.
Regards,
Anthony Liguori
> ---
> vl.c | 5 +++++
> 1 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/vl.c b/vl.c
> index f169aac..16fa222 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -3089,6 +3089,11 @@ int main(int argc, char **argv, char **envp)
> data_dir = CONFIG_QEMU_DATADIR;
> }
>
> + if (machine == NULL) {
> + fprintf(stderr, "No machine found.\n");
> + exit(1);
> + }
> +
> /*
> * Default to max_cpus = smp_cpus, in case the user doesn't
> * specify a max_cpus value.
prev parent reply other threads:[~2011-11-11 19:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-10 15:35 [Qemu-devel] [PATCH] vl.c: Fail gracefully if no machine is found Andreas Färber
2011-11-11 19:45 ` Anthony Liguori [this message]
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=4EBD7B6E.70308@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=andreas.faerber@web.de \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@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).