Message ID | 1282592696.2378.193.camel@edumazet-laptop |
---|---|
State | Accepted, archived |
Delegated to: | stephen hemminger |
Headers | show |
> @@ -563,8 +563,6 @@ static void usage(void) > " -s, --noupdate don;t update history\n" > " -t, --interval=SECS report average over the last SECS\n" > " -V, --version output version information\n" > -" -z, --zeros show entries with zero activity\n" > -" -e, --errors show errors\n" > " -z, --zeros show entries with zero activity\n"); > > exit(-1); > @@ -581,8 +579,6 @@ static const struct option longopts[] = { > { "interval", 1, 0, 't' }, > { "version", 0, 0, 'V' }, > { "zeros", 0, 0, 'z' }, > - { "errors", 0, 0, 'e' }, > - { "zeros", 0, 0, 'z' }, > { 0 } > }; > > > Did you mean to break --errors? -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Le lundi 23 août 2010 à 13:06 -0700, Stephen Hemminger a écrit : > > @@ -563,8 +563,6 @@ static void usage(void) > > " -s, --noupdate don;t update history\n" > > " -t, --interval=SECS report average over the last SECS\n" > > " -V, --version output version information\n" > > -" -z, --zeros show entries with zero activity\n" > > -" -e, --errors show errors\n" > > " -z, --zeros show entries with zero activity\n"); > > > > exit(-1); > > @@ -581,8 +579,6 @@ static const struct option longopts[] = { > > { "interval", 1, 0, 't' }, > > { "version", 0, 0, 'V' }, > > { "zeros", 0, 0, 'z' }, > > - { "errors", 0, 0, 'e' }, > > - { "zeros", 0, 0, 'z' }, > > { 0 } > > }; > > > > > > > > Did you mean to break --errors? I dont think so. These options are already handled, unless I am wrong. Do you want a separate patch for this trivial fix ? -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Mon, 23 Aug 2010 22:28:31 +0200 Eric Dumazet <eric.dumazet@gmail.com> wrote: > Le lundi 23 août 2010 à 13:06 -0700, Stephen Hemminger a écrit : > > > @@ -563,8 +563,6 @@ static void usage(void) > > > " -s, --noupdate don;t update history\n" > > > " -t, --interval=SECS report average over the last SECS\n" > > > " -V, --version output version information\n" > > > -" -z, --zeros show entries with zero activity\n" > > > -" -e, --errors show errors\n" > > > " -z, --zeros show entries with zero activity\n"); > > > > > > exit(-1); > > > @@ -581,8 +579,6 @@ static const struct option longopts[] = { > > > { "interval", 1, 0, 't' }, > > > { "version", 0, 0, 'V' }, > > > { "zeros", 0, 0, 'z' }, > > > - { "errors", 0, 0, 'e' }, > > > - { "zeros", 0, 0, 'z' }, > > > { 0 } > > > }; > > > > > > > > > > > > > Did you mean to break --errors? > > I dont think so. > > These options are already handled, unless I am wrong. > > Do you want a separate patch for this trivial fix ? I'll tweak your previous patch
diff --git a/misc/ifstat.c b/misc/ifstat.c index 5cf2e01..5b229e7 100644 --- a/misc/ifstat.c +++ b/misc/ifstat.c @@ -49,7 +49,7 @@ int npatterns; char info_source[128]; int source_mismatch; -#define MAXS (sizeof(struct rtnl_link_stats)/sizeof(unsigned long)) +#define MAXS (sizeof(struct rtnl_link_stats)/sizeof(__u32)) struct ifstat_ent { @@ -58,7 +58,7 @@ struct ifstat_ent int ifindex; unsigned long long val[MAXS]; double rate[MAXS]; - unsigned long ival[MAXS]; + __u32 ival[MAXS]; }; struct ifstat_ent *kern_db; @@ -187,7 +187,7 @@ void load_raw_table(FILE *fp) *next++ = 0; if (sscanf(p, "%llu", n->val+i) != 1) abort(); - n->ival[i] = (unsigned long)n->val[i]; + n->ival[i] = (__u32)n->val[i]; p = next; if (!(next = strchr(p, ' '))) abort(); @@ -563,8 +563,6 @@ static void usage(void) " -s, --noupdate don;t update history\n" " -t, --interval=SECS report average over the last SECS\n" " -V, --version output version information\n" -" -z, --zeros show entries with zero activity\n" -" -e, --errors show errors\n" " -z, --zeros show entries with zero activity\n"); exit(-1); @@ -581,8 +579,6 @@ static const struct option longopts[] = { { "interval", 1, 0, 't' }, { "version", 0, 0, 'V' }, { "zeros", 0, 0, 'z' }, - { "errors", 0, 0, 'e' }, - { "zeros", 0, 0, 'z' }, { 0 } };