]> www.infradead.org Git - users/dwmw2/qemu.git/commitdiff
net: make nb_nics and nd_table[] static in net/net.c nic-config.for-upstream nic-config.for-upstream.for-upstream pull-nic-config.for-upstream-20240201
authorDavid Woodhouse <dwmw@amazon.co.uk>
Mon, 23 Oct 2023 08:38:01 +0000 (09:38 +0100)
committerDavid Woodhouse <dwmw@amazon.co.uk>
Thu, 1 Feb 2024 16:21:52 +0000 (16:21 +0000)
Also remove the stale declaration of host_net_devices; the actual
definition was removed long ago in commit 7cc28cb06104 ("net: Remove
the deprecated 'host_net_add' and 'host_net_remove' HMP commands")

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Thomas Huth <thuth@redhat.com>
include/net/net.h
net/net.c
system/globals.c

index 588ee55f28602480bb0347f1b060ac7a9439da06..b1f9b35fcca1619e84037cdad05b14bb9481767d 100644 (file)
@@ -301,10 +301,6 @@ struct NICInfo {
     int nvectors;
 };
 
-extern int nb_nics;
-extern NICInfo nd_table[MAX_NICS];
-extern const char *host_net_devices[];
-
 /* from net.c */
 extern NetClientStateList net_clients;
 bool netdev_is_modern(const char *optstr);
index d705e9b0fd5c9b92308ed765f01b77b01a8976e7..a2f0c828bbf2f55f4226f561b95da4f2519df03a 100644 (file)
--- a/net/net.c
+++ b/net/net.c
@@ -77,6 +77,9 @@ static NetdevQueue nd_queue = QSIMPLEQ_HEAD_INITIALIZER(nd_queue);
 
 static GHashTable *nic_model_help;
 
+static int nb_nics;
+static NICInfo nd_table[MAX_NICS];
+
 /***********************************************************/
 /* network device redirectors */
 
index e83b5428d122f1b4bbc0a542547de31d2e3058c8..b6d4e72530ed187646c8619deee13a017c1fbfc9 100644 (file)
@@ -36,8 +36,6 @@ int display_opengl;
 const char* keyboard_layout;
 bool enable_mlock;
 bool enable_cpu_pm;
-int nb_nics;
-NICInfo nd_table[MAX_NICS];
 int autostart = 1;
 int vga_interface_type = VGA_NONE;
 bool vga_interface_created;