From 44dcfe820185590f04c9f5f18579d08532fc1a4b Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Fri, 9 May 2008 15:42:34 -0700 Subject: Change formatting of u32 back to default Don't break scripts that depend on previous offset/value format. Introduce a new -pretty flag for decoding, and (*gasp*) document the formatting arguments. --- tc/tc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tc/tc.c') diff --git a/tc/tc.c b/tc/tc.c index 6126c712..aabeac85 100644 --- a/tc/tc.c +++ b/tc/tc.c @@ -33,6 +33,8 @@ int show_stats = 0; int show_details = 0; int show_raw = 0; +int show_pretty = 0; + int resolve_hosts = 0; int use_iec = 0; int force = 0; @@ -182,7 +184,7 @@ static void usage(void) fprintf(stderr, "Usage: tc [ OPTIONS ] OBJECT { COMMAND | help }\n" " tc [-force] -batch file\n" "where OBJECT := { qdisc | class | filter | action | monitor }\n" - " OPTIONS := { -s[tatistics] | -d[etails] | -r[aw] | -b[atch] [file] }\n"); + " OPTIONS := { -s[tatistics] | -d[etails] | -r[aw] | -p[retty] | -b[atch] [file] }\n"); } static int do_cmd(int argc, char **argv) @@ -273,6 +275,8 @@ int main(int argc, char **argv) ++show_details; } else if (matches(argv[1], "-raw") == 0) { ++show_raw; + } else if (matches(argv[1], "-pretty") == 0) { + ++show_pretty; } else if (matches(argv[1], "-Version") == 0) { printf("tc utility, iproute2-ss%s\n", SNAPSHOT); return 0; -- cgit v1.2.3