From: roopa Date: Tue, 12 Mar 2013 22:04:02 +0000 (-0700) Subject: Fix -oneline output when alias present X-Git-Tag: v3.9.0~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=263c894fd114c489ca29290d24b088556a85e73d;p=thirdparty%2Fiproute2.git Fix -oneline output when alias present This patch removes '\n' in -oneline output when alias present on interface Signed-off-by: Roopa Prabhu --- diff --git a/ip/ipaddress.c b/ip/ipaddress.c index cff503fe2..fdd2a74dd 100644 --- a/ip/ipaddress.c +++ b/ip/ipaddress.c @@ -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])