Merge pull request #16519 from yuwata/networkctl-altnames
networkctl: tiny cleanups about alternative names
This commit is contained in:
commit
2e3e2750bb
|
@ -380,7 +380,7 @@ static int decode_link(sd_netlink_message *m, LinkInfo *info, char **patterns, b
|
||||||
return r;
|
return r;
|
||||||
|
|
||||||
r = sd_netlink_message_read_strv(m, IFLA_PROP_LIST, IFLA_ALT_IFNAME, &altnames);
|
r = sd_netlink_message_read_strv(m, IFLA_PROP_LIST, IFLA_ALT_IFNAME, &altnames);
|
||||||
if (r < 0 && !IN_SET(r, -EOPNOTSUPP, -ENODATA))
|
if (r < 0 && r != -ENODATA)
|
||||||
return r;
|
return r;
|
||||||
|
|
||||||
if (patterns) {
|
if (patterns) {
|
||||||
|
@ -1486,6 +1486,7 @@ static int link_status_one(
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return table_log_add_error(r);
|
return table_log_add_error(r);
|
||||||
|
|
||||||
|
strv_sort(info->alternative_names);
|
||||||
r = dump_list(table, "Alternative Names:", info->alternative_names);
|
r = dump_list(table, "Alternative Names:", info->alternative_names);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return r;
|
return r;
|
||||||
|
|
Loading…
Reference in a new issue