From: Thomas Huth <thuth@redhat.com>
To: Like Xu <like.xu@linux.intel.com>, qemu-trivial@nongnu.org
Cc: qemu-devel@nongnu.org, Peter Maydell <peter.maydell@linaro.org>,
Eduardo Habkost <ehabkost@redhat.com>,
Igor Mammedov <imammedo@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] vl.c: make current_machine as non-global variable
Date: Tue, 2 Apr 2019 09:16:06 +0200 [thread overview]
Message-ID: <63b183f2-9876-7c2c-d4b4-1e27aecd4869@redhat.com> (raw)
In-Reply-To: <1554184537-35011-1-git-send-email-like.xu@linux.intel.com>
On 02/04/2019 07.55, Like Xu wrote:
> This patch makes the remaining dozen or so uses of the global
> current_machine outside vl.c use qdev_get_machine() instead,
> and then make current_machine local to vl.c instead of global.
>
> Signed-off-by: Like Xu <like.xu@linux.intel.com>
> ---
[...]
> --- a/vl.c
> +++ b/vl.c
> @@ -1265,6 +1265,8 @@ static QemuOptsList qemu_smp_opts = {
> },
> };
>
> +MachineState *current_machine;
To be sure that it is only used here, could you please also make the
variable "static"?
Thanks,
Thomas
> +
> static void smp_parse(QemuOpts *opts)
> {
> if (opts) {
> @@ -1462,8 +1464,6 @@ static int usb_parse(const char *cmdline)
> /***********************************************************/
> /* machine registration */
>
> -MachineState *current_machine;
> -
> static MachineClass *find_machine(const char *name)
> {
> GSList *el, *machines = object_class_get_list(TYPE_MACHINE, false);
>
prev parent reply other threads:[~2019-04-02 7:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-02 5:55 [Qemu-devel] [PATCH] vl.c: make current_machine as non-global variable Like Xu
2019-04-02 7:16 ` Thomas Huth [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=63b183f2-9876-7c2c-d4b4-1e27aecd4869@redhat.com \
--to=thuth@redhat.com \
--cc=ehabkost@redhat.com \
--cc=imammedo@redhat.com \
--cc=like.xu@linux.intel.com \
--cc=peter.maydell@linaro.org \
--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).