Commit 263c894f authored by roopa's avatar roopa Committed by Stephen Hemminger

Fix -oneline output when alias present

This patch removes '\n' in -oneline output when alias
present on interface
Signed-off-by: default avatarRoopa Prabhu <roopa@cumulusnetworks.com>
parent f4809174
...@@ -468,9 +468,11 @@ int print_linkinfo(const struct sockaddr_nl *who, ...@@ -468,9 +468,11 @@ int print_linkinfo(const struct sockaddr_nl *who,
if (do_link && tb[IFLA_LINKINFO] && show_details) if (do_link && tb[IFLA_LINKINFO] && show_details)
print_linktype(fp, tb[IFLA_LINKINFO]); print_linktype(fp, tb[IFLA_LINKINFO]);
if (do_link && tb[IFLA_IFALIAS]) if (do_link && tb[IFLA_IFALIAS]) {
fprintf(fp,"\n alias %s", fprintf(fp, "%s", _SL_);
fprintf(fp," alias %s",
rta_getattr_str(tb[IFLA_IFALIAS])); rta_getattr_str(tb[IFLA_IFALIAS]));
}
if (do_link && show_stats) { if (do_link && show_stats) {
if (tb[IFLA_STATS64]) if (tb[IFLA_STATS64])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment