netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH iproute2] Fix -oneline output when alias present
@ 2013-03-12 22:03 roopa
  2013-03-13  9:48 ` [iproute2] " Andreas Henriksson
  0 siblings, 1 reply; 3+ messages in thread
From: roopa @ 2013-03-12 22:03 UTC (permalink / raw)
  To: shemminger, roopa; +Cc: netdev, roopa

From: roopa <roopa@cumulusnetworks.com>

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

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
---
 ip/ipaddress.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/ip/ipaddress.c b/ip/ipaddress.c
index cff503f..fdd2a74 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])
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-03-13 12:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-12 22:03 [PATCH iproute2] Fix -oneline output when alias present roopa
2013-03-13  9:48 ` [iproute2] " Andreas Henriksson
2013-03-13 12:20   ` Roopa Prabhu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).