udev,network: drop unused parent_driver argument from net_match_config()
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 16 Feb 2019 15:47:45 +0000 (00:47 +0900)
committerMichael Biebl <biebl@debian.org>
Wed, 16 Oct 2019 13:24:54 +0000 (14:24 +0100)
The argument has never been used.

(cherry picked from commit 4f4daf418f2e750caae6bc26cd49daafc23ad4de)

Gbp-Pq: Name udev-network-drop-unused-parent_driver-argument-from-net_.patch

src/libsystemd-network/network-internal.c
src/libsystemd-network/network-internal.h
src/network/netdev/netdev.c
src/network/networkd-network.c
src/udev/net/link-config.c

index 0348e7fa9dabe93ce39f2bddc8c5f1c5300afa8b..34fac348f3c9a9990c32a9cc7be2dc3658854617 100644 (file)
@@ -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) {
index 0c8da848c16a09bbe5e97c3121292f570e54c943..944fd2ca61ce58978732c7586c8e51692fbbc5f9 100644 (file)
@@ -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);
index 0263917468789f8884b3393d7325a3eaa60ab6f6..ecd6cf4105ec567aba5d57f40853de048158a350 100644 (file)
@@ -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) {
index 12344ec695b7a923a4a8d8b2abda34f8358a0e0a..9d088740e6fba400c6164048ca4b67ce17e59dfb 100644 (file)
@@ -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;
index eb2477cea418b37c07bcda5d7d3b6a079741cf15..62830ae13f537c8001929145f4294d49f1ba146e 100644 (file)
@@ -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)) {