mirror of
https://github.com/systemd/systemd.git
synced 2026-08-02 22:20:20 +00:00
save link activation policy to state file and display in networkctl
This commit is contained in:
@@ -1387,7 +1387,7 @@ static int link_status_one(
|
||||
|
||||
_cleanup_strv_free_ char **dns = NULL, **ntp = NULL, **sip = NULL, **search_domains = NULL, **route_domains = NULL;
|
||||
_cleanup_free_ char *t = NULL, *network = NULL, *iaid = NULL, *duid = NULL,
|
||||
*setup_state = NULL, *operational_state = NULL, *lease_file = NULL;
|
||||
*setup_state = NULL, *operational_state = NULL, *lease_file = NULL, *activation_policy = NULL;
|
||||
const char *driver = NULL, *path = NULL, *vendor = NULL, *model = NULL, *link = NULL,
|
||||
*on_color_operational, *off_color_operational, *on_color_setup, *off_color_setup;
|
||||
_cleanup_free_ int *carrier_bound_to = NULL, *carrier_bound_by = NULL;
|
||||
@@ -2062,6 +2062,16 @@ static int link_status_one(
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
r = sd_network_link_get_activation_policy(info->ifindex, &activation_policy);
|
||||
if (r >= 0) {
|
||||
r = table_add_many(table,
|
||||
TABLE_EMPTY,
|
||||
TABLE_STRING, "Activation Policy:",
|
||||
TABLE_STRING, activation_policy);
|
||||
if (r < 0)
|
||||
return table_log_add_error(r);
|
||||
}
|
||||
|
||||
if (lease) {
|
||||
const void *client_id;
|
||||
size_t client_id_len;
|
||||
|
||||
Reference in New Issue
Block a user