]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
Fix -oneline output when alias present
authorroopa <roopa@cumulusnetworks.com>
Tue, 12 Mar 2013 22:04:02 +0000 (15:04 -0700)
committerStephen Hemminger <stephen@networkplumber.org>
Tue, 12 Mar 2013 22:50:13 +0000 (15:50 -0700)
This patch removes '\n' in -oneline output when alias
present on interface

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
ip/ipaddress.c

index cff503fe24a4551823135c9b7588508789469c9f..fdd2a74ddb46c4545be8d34d81212785c4a4e9cf 100644 (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])