Fix -oneline output when alias present

This patch removes '\n' in -oneline output when alias
present on interface

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
This commit is contained in:
roopa 2013-03-12 15:04:02 -07:00 committed by Stephen Hemminger
parent f480917486
commit 263c894fd1
1 changed files with 4 additions and 2 deletions

View File

@ -468,9 +468,11 @@ int print_linkinfo(const struct sockaddr_nl *who,
if (do_link && tb[IFLA_LINKINFO] && show_details)
print_linktype(fp, tb[IFLA_LINKINFO]);
if (do_link && tb[IFLA_IFALIAS])
fprintf(fp,"\n alias %s",
if (do_link && tb[IFLA_IFALIAS]) {
fprintf(fp, "%s", _SL_);
fprintf(fp," alias %s",
rta_getattr_str(tb[IFLA_IFALIAS]));
}
if (do_link && show_stats) {
if (tb[IFLA_STATS64])