[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1363125827-14129-1-git-send-email-roopa@cumulusnetworks.com>
Date: Tue, 12 Mar 2013 15:03:47 -0700
From: roopa@...ulusnetworks.com
To: roopa@...ulusnetworks.com
Cc: netdev@...r.kernel.org, roopa <roopa@...ulusnetworks.com>
Subject: [PATCH iproute2] Fix -oneline output when alias present
From: roopa <roopa@...ulusnetworks.com>
This patch removes '\n' in -oneline output when alias
present on interface
Signed-off-by: Roopa Prabhu <roopa@...ulusnetworks.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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists