diff options
author | Patrick McHardy <kaber@trash.net> | 2008-01-23 23:34:28 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:11:19 -0500 |
commit | 57e1c487a4f5754cb77abeb00adb21faa88c484f (patch) | |
tree | e9fdf7529f3992b761648a850d68ad76b5856eab /net | |
parent | 4b3550ef530cfc153fa91f0b37cbda448bad11c6 (diff) |
[NET_SCHED]: Use NLA_PUT_STRING for string dumping
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/sched/act_api.c | 4 | ||||
-rw-r--r-- | net/sched/act_ipt.c | 2 | ||||
-rw-r--r-- | net/sched/cls_api.c | 2 | ||||
-rw-r--r-- | net/sched/cls_fw.c | 2 | ||||
-rw-r--r-- | net/sched/cls_u32.c | 2 | ||||
-rw-r--r-- | net/sched/sch_api.c | 4 |
6 files changed, 8 insertions, 8 deletions
diff --git a/net/sched/act_api.c b/net/sched/act_api.c index 36022605fc16..e33e43abe969 100644 --- a/net/sched/act_api.c +++ b/net/sched/act_api.c | |||
@@ -121,7 +121,7 @@ static int tcf_del_walker(struct sk_buff *skb, struct tc_action *a, | |||
121 | nest = nla_nest_start(skb, a->order); | 121 | nest = nla_nest_start(skb, a->order); |
122 | if (nest == NULL) | 122 | if (nest == NULL) |
123 | goto nla_put_failure; | 123 | goto nla_put_failure; |
124 | NLA_PUT(skb, TCA_KIND, IFNAMSIZ, a->ops->kind); | 124 | NLA_PUT_STRING(skb, TCA_KIND, a->ops->kind); |
125 | for (i = 0; i < (hinfo->hmask + 1); i++) { | 125 | for (i = 0; i < (hinfo->hmask + 1); i++) { |
126 | p = hinfo->htab[tcf_hash(i, hinfo->hmask)]; | 126 | p = hinfo->htab[tcf_hash(i, hinfo->hmask)]; |
127 | 127 | ||
@@ -423,7 +423,7 @@ tcf_action_dump_1(struct sk_buff *skb, struct tc_action *a, int bind, int ref) | |||
423 | if (a->ops == NULL || a->ops->dump == NULL) | 423 | if (a->ops == NULL || a->ops->dump == NULL) |
424 | return err; | 424 | return err; |
425 | 425 | ||
426 | NLA_PUT(skb, TCA_KIND, IFNAMSIZ, a->ops->kind); | 426 | NLA_PUT_STRING(skb, TCA_KIND, a->ops->kind); |
427 | if (tcf_action_copy_stats(skb, a, 0)) | 427 | if (tcf_action_copy_stats(skb, a, 0)) |
428 | goto nla_put_failure; | 428 | goto nla_put_failure; |
429 | nest = nla_nest_start(skb, TCA_OPTIONS); | 429 | nest = nla_nest_start(skb, TCA_OPTIONS); |
diff --git a/net/sched/act_ipt.c b/net/sched/act_ipt.c index 12693347d56a..ecda51da9c14 100644 --- a/net/sched/act_ipt.c +++ b/net/sched/act_ipt.c | |||
@@ -257,7 +257,7 @@ static int tcf_ipt_dump(struct sk_buff *skb, struct tc_action *a, int bind, int | |||
257 | NLA_PUT(skb, TCA_IPT_INDEX, 4, &ipt->tcf_index); | 257 | NLA_PUT(skb, TCA_IPT_INDEX, 4, &ipt->tcf_index); |
258 | NLA_PUT(skb, TCA_IPT_HOOK, 4, &ipt->tcfi_hook); | 258 | NLA_PUT(skb, TCA_IPT_HOOK, 4, &ipt->tcfi_hook); |
259 | NLA_PUT(skb, TCA_IPT_CNT, sizeof(struct tc_cnt), &c); | 259 | NLA_PUT(skb, TCA_IPT_CNT, sizeof(struct tc_cnt), &c); |
260 | NLA_PUT(skb, TCA_IPT_TABLE, IFNAMSIZ, ipt->tcfi_tname); | 260 | NLA_PUT_STRING(skb, TCA_IPT_TABLE, ipt->tcfi_tname); |
261 | tm.install = jiffies_to_clock_t(jiffies - ipt->tcf_tm.install); | 261 | tm.install = jiffies_to_clock_t(jiffies - ipt->tcf_tm.install); |
262 | tm.lastuse = jiffies_to_clock_t(jiffies - ipt->tcf_tm.lastuse); | 262 | tm.lastuse = jiffies_to_clock_t(jiffies - ipt->tcf_tm.lastuse); |
263 | tm.expires = jiffies_to_clock_t(ipt->tcf_tm.expires); | 263 | tm.expires = jiffies_to_clock_t(ipt->tcf_tm.expires); |
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index 5584e7cd4b9f..3377ca0d0a0c 100644 --- a/net/sched/cls_api.c +++ b/net/sched/cls_api.c | |||
@@ -337,7 +337,7 @@ static int tcf_fill_node(struct sk_buff *skb, struct tcf_proto *tp, | |||
337 | tcm->tcm_ifindex = tp->q->dev->ifindex; | 337 | tcm->tcm_ifindex = tp->q->dev->ifindex; |
338 | tcm->tcm_parent = tp->classid; | 338 | tcm->tcm_parent = tp->classid; |
339 | tcm->tcm_info = TC_H_MAKE(tp->prio, tp->protocol); | 339 | tcm->tcm_info = TC_H_MAKE(tp->prio, tp->protocol); |
340 | NLA_PUT(skb, TCA_KIND, IFNAMSIZ, tp->ops->kind); | 340 | NLA_PUT_STRING(skb, TCA_KIND, tp->ops->kind); |
341 | tcm->tcm_handle = fh; | 341 | tcm->tcm_handle = fh; |
342 | if (RTM_DELTFILTER != event) { | 342 | if (RTM_DELTFILTER != event) { |
343 | tcm->tcm_handle = 0; | 343 | tcm->tcm_handle = 0; |
diff --git a/net/sched/cls_fw.c b/net/sched/cls_fw.c index e3dfbb3046c0..31074735d1bd 100644 --- a/net/sched/cls_fw.c +++ b/net/sched/cls_fw.c | |||
@@ -352,7 +352,7 @@ static int fw_dump(struct tcf_proto *tp, unsigned long fh, | |||
352 | NLA_PUT(skb, TCA_FW_CLASSID, 4, &f->res.classid); | 352 | NLA_PUT(skb, TCA_FW_CLASSID, 4, &f->res.classid); |
353 | #ifdef CONFIG_NET_CLS_IND | 353 | #ifdef CONFIG_NET_CLS_IND |
354 | if (strlen(f->indev)) | 354 | if (strlen(f->indev)) |
355 | NLA_PUT(skb, TCA_FW_INDEV, IFNAMSIZ, f->indev); | 355 | NLA_PUT_STRING(skb, TCA_FW_INDEV, f->indev); |
356 | #endif /* CONFIG_NET_CLS_IND */ | 356 | #endif /* CONFIG_NET_CLS_IND */ |
357 | if (head->mask != 0xFFFFFFFF) | 357 | if (head->mask != 0xFFFFFFFF) |
358 | NLA_PUT(skb, TCA_FW_MASK, 4, &head->mask); | 358 | NLA_PUT(skb, TCA_FW_MASK, 4, &head->mask); |
diff --git a/net/sched/cls_u32.c b/net/sched/cls_u32.c index b51c2c324abc..7a1502553b30 100644 --- a/net/sched/cls_u32.c +++ b/net/sched/cls_u32.c | |||
@@ -732,7 +732,7 @@ static int u32_dump(struct tcf_proto *tp, unsigned long fh, | |||
732 | 732 | ||
733 | #ifdef CONFIG_NET_CLS_IND | 733 | #ifdef CONFIG_NET_CLS_IND |
734 | if(strlen(n->indev)) | 734 | if(strlen(n->indev)) |
735 | NLA_PUT(skb, TCA_U32_INDEV, IFNAMSIZ, n->indev); | 735 | NLA_PUT_STRING(skb, TCA_U32_INDEV, n->indev); |
736 | #endif | 736 | #endif |
737 | #ifdef CONFIG_CLS_U32_PERF | 737 | #ifdef CONFIG_CLS_U32_PERF |
738 | NLA_PUT(skb, TCA_U32_PCNT, | 738 | NLA_PUT(skb, TCA_U32_PCNT, |
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index 7abb028dd96b..8db554d54854 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c | |||
@@ -834,7 +834,7 @@ static int tc_fill_qdisc(struct sk_buff *skb, struct Qdisc *q, u32 clid, | |||
834 | tcm->tcm_parent = clid; | 834 | tcm->tcm_parent = clid; |
835 | tcm->tcm_handle = q->handle; | 835 | tcm->tcm_handle = q->handle; |
836 | tcm->tcm_info = atomic_read(&q->refcnt); | 836 | tcm->tcm_info = atomic_read(&q->refcnt); |
837 | NLA_PUT(skb, TCA_KIND, IFNAMSIZ, q->ops->id); | 837 | NLA_PUT_STRING(skb, TCA_KIND, q->ops->id); |
838 | if (q->ops->dump && q->ops->dump(q, skb) < 0) | 838 | if (q->ops->dump && q->ops->dump(q, skb) < 0) |
839 | goto nla_put_failure; | 839 | goto nla_put_failure; |
840 | q->qstats.qlen = q->q.qlen; | 840 | q->qstats.qlen = q->q.qlen; |
@@ -1080,7 +1080,7 @@ static int tc_fill_tclass(struct sk_buff *skb, struct Qdisc *q, | |||
1080 | tcm->tcm_parent = q->handle; | 1080 | tcm->tcm_parent = q->handle; |
1081 | tcm->tcm_handle = q->handle; | 1081 | tcm->tcm_handle = q->handle; |
1082 | tcm->tcm_info = 0; | 1082 | tcm->tcm_info = 0; |
1083 | NLA_PUT(skb, TCA_KIND, IFNAMSIZ, q->ops->id); | 1083 | NLA_PUT_STRING(skb, TCA_KIND, q->ops->id); |
1084 | if (cl_ops->dump && cl_ops->dump(q, cl, skb, tcm) < 0) | 1084 | if (cl_ops->dump && cl_ops->dump(q, cl, skb, tcm) < 0) |
1085 | goto nla_put_failure; | 1085 | goto nla_put_failure; |
1086 | 1086 | ||