qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Cc: Mark McLoughlin <markmc@redhat.com>
Subject: [Qemu-devel] [PATCH 2/6] net: net_check_clients() runs too early to see -device, fix
Date: Thu, 11 Feb 2010 14:44:58 +0100	[thread overview]
Message-ID: <1265895902-15664-3-git-send-email-armbru@redhat.com> (raw)
In-Reply-To: <1265895902-15664-1-git-send-email-armbru@redhat.com>

Call it right after -device devices get created.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 net.c |    4 +---
 net.h |    1 +
 vl.c  |    2 ++
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/net.c b/net.c
index f51d376..38b65f4 100644
--- a/net.c
+++ b/net.c
@@ -1275,7 +1275,7 @@ void net_cleanup(void)
     }
 }
 
-static void net_check_clients(void)
+void net_check_clients(void)
 {
     VLANState *vlan;
 
@@ -1323,8 +1323,6 @@ int net_init_clients(void)
         return -1;
     }
 
-    net_check_clients();
-
     return 0;
 }
 
diff --git a/net.h b/net.h
index ecbd812..3467c10 100644
--- a/net.h
+++ b/net.h
@@ -165,6 +165,7 @@ extern const char *legacy_bootp_filename;
 int net_client_init(Monitor *mon, QemuOpts *opts, int is_netdev);
 int net_client_parse(QemuOptsList *opts_list, const char *str);
 int net_init_clients(void);
+void net_check_clients(void);
 void net_cleanup(void);
 void net_set_boot_mask(int boot_mask);
 void net_host_device_add(Monitor *mon, const QDict *qdict);
diff --git a/vl.c b/vl.c
index 98918ac..084604f 100644
--- a/vl.c
+++ b/vl.c
@@ -5897,6 +5897,8 @@ int main(int argc, char **argv, char **envp)
     if (qemu_opts_foreach(&qemu_device_opts, device_init_func, NULL, 1) != 0)
         exit(1);
 
+    net_check_clients();
+
     if (!display_state)
         dumb_display_init();
     /* just use the first displaystate for the moment */
-- 
1.6.6

  parent reply	other threads:[~2010-02-11 13:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-11 13:44 [Qemu-devel] [PATCH 0/6] Assorted netdev fixes Markus Armbruster
2010-02-11 13:44 ` [Qemu-devel] [PATCH 1/6] net: Remove unused net_client_uninit() Markus Armbruster
2010-02-19 20:55   ` Anthony Liguori
2010-02-19 20:55   ` Anthony Liguori
2010-02-11 13:44 ` Markus Armbruster [this message]
2010-02-11 13:44 ` [Qemu-devel] [PATCH 3/6] net: Fix bogus "Warning: vlan 0 with no nics" with -device Markus Armbruster
2010-02-11 13:45 ` [Qemu-devel] [PATCH 4/6] net: net_check_clients() checks only VLAN clients, fix Markus Armbruster
2010-02-11 13:45 ` [Qemu-devel] [PATCH 5/6] net: info network shows " Markus Armbruster
2010-02-11 13:45 ` [Qemu-devel] [PATCH 6/6] net: Monitor command set_link finds " Markus Armbruster
2010-02-11 13:58 ` [Qemu-devel] Re: [PATCH 0/6] Assorted netdev fixes Mark McLoughlin

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=1265895902-15664-3-git-send-email-armbru@redhat.com \
    --to=armbru@redhat.com \
    --cc=markmc@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).