* [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
* Re: [PATCH] iproute: show metrics as an unsigned value
2012-04-10 15:20 [PATCH] iproute: show metrics as an unsigned value Jorge Boncompte [DTI2]
@ 2012-04-10 15:48 ` Stephen Hemminger
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Hemminger @ 2012-04-10 15:48 UTC (permalink / raw)
To: jorge; +Cc: netdev
On Tue, 10 Apr 2012 17:20:26 +0200
"Jorge Boncompte [DTI2]" <jorge@dti2.net> wrote:
> 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)
Applied
^ permalink raw reply [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