public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iproute: show metrics as an unsigned value
@ 2012-04-10 15:20 Jorge Boncompte [DTI2]
  2012-04-10 15:48 ` Stephen Hemminger
  0 siblings, 1 reply; 2+ messages in thread
From: Jorge Boncompte [DTI2] @ 2012-04-10 15:20 UTC (permalink / raw)
  To: netdev; +Cc: shemminger, Jorge Boncompte [DTI2]

From: "Jorge Boncompte [DTI2]" <jorge@dti2.net>

Avoids showing negative metrics.

Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
---
 ip/iproute.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/ip/iproute.c b/ip/iproute.c
index c97f979..2d15c01 100644
--- a/ip/iproute.c
+++ b/ip/iproute.c
@@ -404,7 +404,7 @@ int print_route(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
 				    abuf, sizeof(abuf)));
 	}
 	if (tb[RTA_PRIORITY])
-		fprintf(fp, " metric %d ", *(__u32*)RTA_DATA(tb[RTA_PRIORITY]));
+		fprintf(fp, " metric %u ", *(__u32*)RTA_DATA(tb[RTA_PRIORITY]));
 	if (r->rtm_flags & RTNH_F_DEAD)
 		fprintf(fp, "dead ");
 	if (r->rtm_flags & RTNH_F_ONLINK)
-- 
1.7.8.3

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

end of thread, other threads:[~2012-04-10 15:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-10 15:20 [PATCH] iproute: show metrics as an unsigned value Jorge Boncompte [DTI2]
2012-04-10 15:48 ` Stephen Hemminger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox