summaryrefslogtreecommitdiffstats
path: root/debian/patches/udev-network-drop-unused-parent_driver-argument-from-net_.patch
blob: 92a74a54db5824848993c174753c39615d7e82fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
From: Yu Watanabe <watanabe.yu+github@gmail.com>
Date: Sun, 17 Feb 2019 00:47:45 +0900
Subject: udev,network: drop unused parent_driver argument from
 net_match_config()

The argument has never been used.

(cherry picked from commit 4f4daf418f2e750caae6bc26cd49daafc23ad4de)
---
 src/libsystemd-network/network-internal.c | 1 -
 src/libsystemd-network/network-internal.h | 1 -
 src/network/netdev/netdev.c               | 2 +-
 src/network/networkd-network.c            | 9 ++-------
 src/udev/net/link-config.c                | 6 +-----
 5 files changed, 4 insertions(+), 15 deletions(-)

diff --git a/src/libsystemd-network/network-internal.c b/src/libsystemd-network/network-internal.c
index 0348e7f..34fac34 100644
--- a/src/libsystemd-network/network-internal.c
+++ b/src/libsystemd-network/network-internal.c
@@ -102,7 +102,6 @@ bool net_match_config(Set *match_mac,
                       Condition *match_arch,
                       const struct ether_addr *dev_mac,
                       const char *dev_path,
-                      const char *dev_parent_driver,
                       const char *dev_driver,
                       const char *dev_type,
                       const char *dev_name) {
diff --git a/src/libsystemd-network/network-internal.h b/src/libsystemd-network/network-internal.h
index 0c8da84..944fd2c 100644
--- a/src/libsystemd-network/network-internal.h
+++ b/src/libsystemd-network/network-internal.h
@@ -25,7 +25,6 @@ bool net_match_config(Set *match_mac,
                       Condition *match_arch,
                       const struct ether_addr *dev_mac,
                       const char *dev_path,
-                      const char *dev_parent_driver,
                       const char *dev_driver,
                       const char *dev_type,
                       const char *dev_name);
diff --git a/src/network/netdev/netdev.c b/src/network/netdev/netdev.c
index 0263917..ecd6cf4 100644
--- a/src/network/netdev/netdev.c
+++ b/src/network/netdev/netdev.c
@@ -673,7 +673,7 @@ int netdev_load_one(Manager *manager, const char *filename) {
                              netdev_raw->match_host, netdev_raw->match_virt,
                              netdev_raw->match_kernel_cmdline, netdev_raw->match_kernel_version,
                              netdev_raw->match_arch,
-                             NULL, NULL, NULL, NULL, NULL, NULL) <= 0)
+                             NULL, NULL, NULL, NULL, NULL) <= 0)
                 return 0;
 
         if (netdev_raw->kind == _NETDEV_KIND_INVALID) {
diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c
index 12344ec..9d08874 100644
--- a/src/network/networkd-network.c
+++ b/src/network/networkd-network.c
@@ -424,8 +424,7 @@ int network_get_by_name(Manager *manager, const char *name, Network **ret) {
 int network_get(Manager *manager, sd_device *device,
                 const char *ifname, const struct ether_addr *address,
                 Network **ret) {
-        const char *path = NULL, *parent_driver = NULL, *driver = NULL, *devtype = NULL;
-        sd_device *parent;
+        const char *path = NULL, *driver = NULL, *devtype = NULL;
         Network *network;
 
         assert(manager);
@@ -434,9 +433,6 @@ int network_get(Manager *manager, sd_device *device,
         if (device) {
                 (void) sd_device_get_property_value(device, "ID_PATH", &path);
 
-                if (sd_device_get_parent(device, &parent) >= 0)
-                        (void) sd_device_get_driver(parent, &parent_driver);
-
                 (void) sd_device_get_property_value(device, "ID_NET_DRIVER", &driver);
 
                 (void) sd_device_get_devtype(device, &devtype);
@@ -448,8 +444,7 @@ int network_get(Manager *manager, sd_device *device,
                                      network->match_name, network->match_host,
                                      network->match_virt, network->match_kernel_cmdline,
                                      network->match_kernel_version, network->match_arch,
-                                     address, path, parent_driver, driver,
-                                     devtype, ifname)) {
+                                     address, path, driver, devtype, ifname)) {
                         if (network->match_name && device) {
                                 const char *attr;
                                 uint8_t name_assign_type = NET_NAME_UNKNOWN;
diff --git a/src/udev/net/link-config.c b/src/udev/net/link-config.c
index eb2477c..62830ae 100644
--- a/src/udev/net/link-config.c
+++ b/src/udev/net/link-config.c
@@ -243,13 +243,10 @@ int link_config_get(link_config_ctx *ctx, sd_device *device, link_config **ret)
         assert(ret);
 
         LIST_FOREACH(links, link, ctx->links) {
-                const char *address = NULL, *id_path = NULL, *parent_driver = NULL, *id_net_driver = NULL, *devtype = NULL, *sysname = NULL;
-                sd_device *parent;
+                const char *address = NULL, *id_path = NULL, *id_net_driver = NULL, *devtype = NULL, *sysname = NULL;
 
                 (void) sd_device_get_sysattr_value(device, "address", &address);
                 (void) sd_device_get_property_value(device, "ID_PATH", &id_path);
-                if (sd_device_get_parent(device, &parent) >= 0)
-                        (void) sd_device_get_driver(parent, &parent_driver);
                 (void) sd_device_get_property_value(device, "ID_NET_DRIVER", &id_net_driver);
                 (void) sd_device_get_devtype(device, &devtype);
                 (void) sd_device_get_sysname(device, &sysname);
@@ -260,7 +257,6 @@ int link_config_get(link_config_ctx *ctx, sd_device *device, link_config **ret)
                                      link->match_kernel_version, link->match_arch,
                                      address ? ether_aton(address) : NULL,
                                      id_path,
-                                     parent_driver,
                                      id_net_driver,
                                      devtype,
                                      sysname)) {