From ff51134c93a748524b75b4fd492f9c03cb02f65c Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Sat, 26 Feb 2022 15:56:39 +0900 Subject: network: make request_process_address() and friends take Link and corresponding object This also renames e.g. request_process_address() -> address_process_request(). Also, this drops type checks such as `assert(req->type == REQUEST_TYPE_ADDRESS)`, as in the later commits, the function of processing request, e.g. `address_process_request()`, will be assigned to the Request object when it is created. And the request type will be used to distinguish and to avoid deduplicating requests which do not have any assigned objects, like REQUEST_TYPE_DHCP4_CLIENT. Hence, the type checks in process functions are mostly not necessary and redundant. This is mostly cleanups and preparation for later commits, and should not change any behavior. --- src/network/networkd-setlink.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/network/networkd-setlink.h') diff --git a/src/network/networkd-setlink.h b/src/network/networkd-setlink.h index e943f2012a..3c9853e3ad 100644 --- a/src/network/networkd-setlink.h +++ b/src/network/networkd-setlink.h @@ -42,10 +42,10 @@ int link_configure_mtu(Link *link); int request_process_set_link(Request *req); -int request_process_activation(Request *req); +int link_process_activation(Request *req, Link *link, void *userdata); int link_request_to_activate(Link *link); -int request_process_link_up_or_down(Request *req); +int link_process_up_or_down(Request *req, Link *link, void *userdata); int link_request_to_bring_up_or_down(Link *link, bool up); int link_down_now(Link *link); -- cgit v1.2.1