[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 14/45] hw/mips/loongson3_virt: use pci_init_nic_devices(), (continued)
- [PATCH 14/45] hw/mips/loongson3_virt: use pci_init_nic_devices(), David Woodhouse, 2023/10/22
- [PATCH 01/45] net: add qemu_{configure, create}_nic_device(), qemu_find_nic_info(), David Woodhouse, 2023/10/22
- [PATCH 44/45] net: remove qemu_show_nic_models(), qemu_find_nic_model(), David Woodhouse, 2023/10/22
- [PATCH 21/45] hw/arm/allwinner: use qemu_configure_nic_device(), David Woodhouse, 2023/10/22
- [PATCH 13/45] hw/mips/malta: use pci_init_nic_devices(), David Woodhouse, 2023/10/22
- [PATCH 31/45] hw/net/etraxfs-eth: use qemu_configure_nic_device(), David Woodhouse, 2023/10/22
- [PATCH 12/45] hw/mips/fuloong2e: use pci_init_nic_devices(), David Woodhouse, 2023/10/22
- [PATCH 26/45] hw/net/lan9118: use qemu_configure_nic_device(), David Woodhouse, 2023/10/22
- [PATCH 42/45] net: remove qemu_check_nic_model(), David Woodhouse, 2023/10/22
- [PATCH 10/45] hw/hppa: 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 17/45] hw/ppc: use pci_init_nic_devices(), David Woodhouse, 2023/10/22
- [PATCH 11/45] hw/loongarch: use pci_init_nic_devices(), David Woodhouse, 2023/10/22
- [PATCH 23/45] hw/arm/exynos4: use qemu_create_nic_device(), David Woodhouse, 2023/10/22
- [PATCH 43/45] hw/pci: remove pci_nic_init_nofail(), David Woodhouse, 2023/10/22
- [PATCH 03/45] net: add qemu_create_nic_bus_devices(), David Woodhouse, 2023/10/22
- [PATCH 15/45] hw/ppc/prep: use pci_init_nic_devices(), David Woodhouse, 2023/10/22
- [PATCH 09/45] hw/arm/virt: use pci_init_nic_devices(), David Woodhouse, 2023/10/22