[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 45/45] net: make nb_nics and nd_table[] static in net/net.c
From: |
David Woodhouse |
Subject: |
[PATCH 45/45] net: make nb_nics and nd_table[] static in net/net.c |
Date: |
Sun, 22 Oct 2023 16:52:00 +0100 |
From: David Woodhouse <dwmw@amazon.co.uk>
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
---
include/net/net.h | 4 ----
net/net.c | 3 +++
system/globals.c | 2 --
3 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/include/net/net.h b/include/net/net.h
index 290e604f03..5a38766942 100644
--- a/include/net/net.h
+++ b/include/net/net.h
@@ -245,10 +245,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);
diff --git a/net/net.c b/net/net.c
index ed0d638454..9043566abf 100644
--- 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 */
diff --git a/system/globals.c b/system/globals.c
index e83b5428d1..b6d4e72530 100644
--- a/system/globals.c
+++ b/system/globals.c
@@ -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;
--
2.40.1
- [PATCH 0/45] Rework matching of network devices to -nic options, David Woodhouse, 2023/10/22
- [PATCH 32/45] hw/m68k/mcf5208: use qemu_create_nic_device(), David Woodhouse, 2023/10/22
- [PATCH 33/45] hw/m68k/q800: use qemu_configure_nic_device(), David Woodhouse, 2023/10/22
- [PATCH 18/45] hw/sh4/r2d: use pci_init_nic_devices(), David Woodhouse, 2023/10/22
- [PATCH 20/45] hw/xtensa/virt: use pci_init_nic_devices(), David Woodhouse, 2023/10/22
- [PATCH 07/45] hw/alpha/dp264: use pci_init_nic_devices(), David Woodhouse, 2023/10/22
- [PATCH 06/45] hw/xen: use qemu_create_nic_bus_devices() to instantiate Xen NICs, David Woodhouse, 2023/10/22
- [PATCH 22/45] hw/arm/aspeed: use qemu_configure_nic_device(), David Woodhouse, 2023/10/22
- [PATCH 19/45] hw/sparc64/sun4u: use pci_init_nic_devices(), David Woodhouse, 2023/10/22
- [PATCH 45/45] net: make nb_nics and nd_table[] static in net/net.c,
David Woodhouse <=
- [PATCH 24/45] hw/arm/fsl: use qemu_configure_nic_device(), David Woodhouse, 2023/10/22
- [PATCH 04/45] hw/pci: add pci_init_nic_devices(), pci_init_nic_in_slot(), David Woodhouse, 2023/10/22
- [PATCH 41/45] hw/xtensa/xtfpga: use qemu_create_nic_device(), David Woodhouse, 2023/10/22
- [PATCH 40/45] hw/sparc/sun4m: use qemu_configure_nic_device(), David Woodhouse, 2023/10/22
- [PATCH 27/45] hw/arm/highbank: use qemu_create_nic_device(), David Woodhouse, 2023/10/22
- [PATCH 08/45] hw/arm/sbsa-ref: use pci_init_nic_devices(), David Woodhouse, 2023/10/22
- [PATCH 30/45] hw/arm: use qemu_configure_nic_device(), David Woodhouse, 2023/10/22
- [PATCH 39/45] hw/s390x/s390-virtio-ccw: use qemu_create_nic_device(), David Woodhouse, 2023/10/22
- [PATCH 31/45] hw/net/etraxfs-eth: use qemu_configure_nic_device(), David Woodhouse, 2023/10/22