mirror of
https://github.com/Dasharo/systemd.git
synced 2026-03-06 15:02:31 -08:00
network: de-duplicate logging in bridge_vlan_append_info() and the caller
The remaining message is changed, because the user would most likely not understand that "append VLANs" is just talking about the netlink message.
This commit is contained in:
@@ -65,11 +65,9 @@ int bridge_vlan_append_info(
|
||||
for (int k = 0; k < BRIDGE_VLAN_BITMAP_LEN; k++) {
|
||||
uint32_t untagged_map = br_untagged_bitmap[k];
|
||||
uint32_t vid_map = br_vid_bitmap[k];
|
||||
unsigned base_bit;
|
||||
int i;
|
||||
unsigned base_bit = k * 32;
|
||||
int i = -1;
|
||||
|
||||
base_bit = k * 32;
|
||||
i = -1;
|
||||
done = false;
|
||||
do {
|
||||
int j = find_next_bit(i, vid_map);
|
||||
@@ -106,14 +104,14 @@ int bridge_vlan_append_info(
|
||||
|
||||
r = sd_netlink_message_append_data(req, IFLA_BRIDGE_VLAN_INFO, &br_vlan, sizeof(br_vlan));
|
||||
if (r < 0)
|
||||
return log_link_error_errno(link, r, "Could not append IFLA_BRIDGE_VLAN_INFO attribute: %m");
|
||||
return r;
|
||||
} else {
|
||||
br_vlan.vid = begin;
|
||||
br_vlan.flags |= BRIDGE_VLAN_INFO_RANGE_BEGIN;
|
||||
|
||||
r = sd_netlink_message_append_data(req, IFLA_BRIDGE_VLAN_INFO, &br_vlan, sizeof(br_vlan));
|
||||
if (r < 0)
|
||||
return log_link_error_errno(link, r, "Could not append IFLA_BRIDGE_VLAN_INFO attribute: %m");
|
||||
return r;
|
||||
|
||||
br_vlan.vid = end;
|
||||
br_vlan.flags &= ~BRIDGE_VLAN_INFO_RANGE_BEGIN;
|
||||
@@ -121,7 +119,7 @@ int bridge_vlan_append_info(
|
||||
|
||||
r = sd_netlink_message_append_data(req, IFLA_BRIDGE_VLAN_INFO, &br_vlan, sizeof(br_vlan));
|
||||
if (r < 0)
|
||||
return log_link_error_errno(link, r, "Could not append IFLA_BRIDGE_VLAN_INFO attribute: %m");
|
||||
return r;
|
||||
}
|
||||
|
||||
if (done)
|
||||
|
||||
@@ -422,7 +422,7 @@ static int link_configure(
|
||||
|
||||
r = bridge_vlan_append_info(link, req, link->network->pvid, link->network->br_vid_bitmap, link->network->br_untagged_bitmap);
|
||||
if (r < 0)
|
||||
return log_link_debug_errno(link, r, "Could not append VLANs: %m");
|
||||
return log_link_debug_errno(link, r, "Could not append VLAN information to netlink message: %m");
|
||||
|
||||
r = sd_netlink_message_close_container(req);
|
||||
if (r < 0)
|
||||
|
||||
Reference in New Issue
Block a user