Thread (4 messages) flat view 4 messages, 3 authors, 2015-02-05

Re: [Patch iproute2] skbedit: print action too

From: Stephen Hemminger <stephen@networkplumber.org>
Date: 2015-02-05 18:09:32

On Wed, 28 Jan 2015 14:52:42 -0800
Cong Wang [off-list ref] wrote:
quoted hunk ↗ jump to hunk
Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Cong Wang <redacted>
---
 tc/m_skbedit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tc/m_skbedit.c b/tc/m_skbedit.c
index 36323a9..c5deee0 100644
--- a/tc/m_skbedit.c
+++ b/tc/m_skbedit.c
@@ -193,7 +193,7 @@ static int print_skbedit(struct action_util *au, FILE *f, struct rtattr *arg)
 		fprintf(f, " mark %d", *mark);
 	}
 
-	fprintf(f, "\n\t index %d ref %d bind %d", p->index, p->refcnt, p->bindcnt);
+	fprintf(f, " %s\n\t index %d ref %d bind %d", action_n2a(p->action, b1, sizeof (b1)), p->index, p->refcnt, p->bindcnt);
 
 	if (show_stats) {
 		if (tb[TCA_SKBEDIT_TM]) {
It is good to show everything that is set.

The output of tc show commands should match the arguments used
to create. In this case you are printing does not match the input.

Also, I would rather see this in a separate fprintf rather than
overloading existing call.

Please cleanup and resubmit.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help