From db6b0cfa518de3b27c05bdf3efe05a7f77c4d97d Mon Sep 17 00:00:00 2001 From: Gerrit Renker Date: Fri, 25 Feb 2011 12:54:37 -0800 Subject: [PATCH] iproute: rename 'get_jiffies' since it uses msecs The get_jiffies() function retrieves rtt-type values in units of milliseconds. This patch updates the function name accordingly, following the pattern given by dst_metric() <=> dst_metric_rtt(). --- include/utils.h | 2 +- ip/iproute.c | 6 +++--- lib/utils.c | 19 +++++++++---------- 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/include/utils.h b/include/utils.h index 6cb3e42e8..ee09ee567 100644 --- a/include/utils.h +++ b/include/utils.h @@ -79,7 +79,7 @@ extern int mask2bits(__u32 netmask); extern int get_integer(int *val, const char *arg, int base); extern int get_unsigned(unsigned *val, const char *arg, int base); -extern int get_jiffies(unsigned *val, const char *arg, int *raw); +extern int get_time_rtt(unsigned *val, const char *arg, int *raw); #define get_byte get_u8 #define get_ushort get_u16 #define get_short get_s16 diff --git a/ip/iproute.c b/ip/iproute.c index d48e743bf..06d2507ca 100644 --- a/ip/iproute.c +++ b/ip/iproute.c @@ -835,7 +835,7 @@ int iproute_modify(int cmd, unsigned flags, int argc, char **argv) mxlock |= (1<= 1 */ - *jiffies = t; - if (*jiffies < t) - *jiffies += 1; + *val = t; + if (*val < t) + *val += 1; return 0; -- 2.47.2